Skip to content
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
@vi-verrone

Description

@vi-verrone

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

Activity

vi-verrone

vi-verrone commented on Apr 7, 2020

@vi-verrone
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

revinjchalil commented on Apr 7, 2020

@revinjchalil
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

vi-verrone commented on Apr 14, 2020

@vi-verrone
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

revinjchalil commented on Apr 14, 2020

@revinjchalil
Collaborator
added a commit that references this issue on Apr 16, 2020
dea341d
vi-verrone

vi-verrone commented on Apr 20, 2020

@vi-verrone
Author

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

Let me know if something else it's needed.

Thanks & Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @revinjchalil@vi-verrone

      Issue actions

        add 'TokenResolver' property for CosmosDBConfig · Issue #363 · Azure/azure-cosmosdb-spark