This repository was archived by the owner on Mar 10, 2025. It is now read-only.
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
add 'TokenResolver' property for CosmosDBConfig #363
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels
Activity
vi-verrone commentedon Apr 7, 2020
Hi all,
almost 3 weeks passed, can someone clarify me if we have in backlog this feature for the next releases?
Thanks & Regards
revinjchalil commentedon Apr 7, 2020
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 commentedon Apr 14, 2020
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 commentedon Apr 14, 2020
Resolves Azure#363
vi-verrone commentedon Apr 20, 2020
Hi @revinjchalil,
you can find the PR at the following link: #372
Let me know if something else it's needed.
Thanks & Regards,