Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 'TokenResolver' property for CosmosDBConfig #363

Open
vi-verrone opened this issue Mar 17, 2020 · 5 comments · May be fixed by #372
Open

add 'TokenResolver' property for CosmosDBConfig #363

vi-verrone opened this issue Mar 17, 2020 · 5 comments · May be fixed by #372

Comments

@vi-verrone
Copy link

Hi all,
I noticed that a 'TokenResolver' property is missing from CosmosDBConfig and for this reason is not possible to configure AsyncDocumentClient with this useful feature.

Having the chance to set a tokenResolver in configuration would help to develop long-running applications that follow strict policies about accessing CosmosDB collections (i.e. using a broker for resource tokens).

Is this feature planned to be added in next release of azure-cosmosdb-spark? If not, can I contribute to add this feature?

Thanks & Regards

@vi-verrone
Copy link
Author

Hi all,
almost 3 weeks passed, can someone clarify me if we have in backlog this feature for the next releases?

Thanks & Regards

@revinjchalil
Copy link
Collaborator

Would you provide bit more details on what exactly are you looking for? Just fyi, the change to honor ResourceToken in AsyncConnection has been added with #365 in version 2.11 and allows a static ResourceToken to work with AsyncConnection. Thanks.

@vi-verrone
Copy link
Author

Hi @revinjchalil ,
thanks for replying, my request is indeed to have the possibility to set dynamic resource token provisioning, by using custom logic (i.e. by calling a middle-tier service for token provisioning due security constraints) through the TokenResolver feature of AsyncDocumentClient.
For example when we're running streaming-mode jobs that need to write on Cosmos, once we set statically the Resource Token we can't change it after the job starts, and this would be a problem for streaming jobs that run over 5 hours (a resource token's max lifetime AFAIK) and this would let the job to fail at some point.
Having the chance to set a TokenResolver when configuring the CosmosDB Spark connector would help in this scenarios, where using a master key or static resource token is not an option.

@revinjchalil
Copy link
Collaborator

revinjchalil commented Apr 14, 2020 via email

vi-verrone pushed a commit to vi-verrone/azure-cosmosdb-spark that referenced this issue Apr 16, 2020
@vi-verrone
Copy link
Author

Hi @revinjchalil,
you can find the PR at the following link: #372

Let me know if something else it's needed.

Thanks & Regards,

@FabianMeiswinkel FabianMeiswinkel linked a pull request Jul 15, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants