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

Remove the Key/KeyType parameters from all Data Plane functions and only use Context #481

Open
PlagueHO opened this issue May 17, 2024 · 0 comments
Labels
discussion The issue is a discussion. enhancement The issue is an enhancement request. on hold The issue or pull request has been put on hold by a maintainer.

Comments

@PlagueHO
Copy link
Owner

Allowing the Key and KeyType parameters to be passed to every data plane function directly (e.g., Get-CosmosDbCollection -Key ...) encourages users to use master keys for authentication rather than the more secure Entra ID authentication or resource authentication.

Both resource and Entra ID authentication must be performed by creating a context with New-CosmosDBContext and passing that to the functions.

Once Entra ID authentication is available via #479 then the Key and KeyType parameters should be phased out.

Phase 1 will just be putting in warnings when Key based authentication is being used, but still allow it.
Phase 2 will be to remove the parameters Key/KeyType from all functions (except New-CosmosDbContext and some internal util functions).

Important: It will still be possible to authenticate with master keys but will need to be performed via creation of a context and passing that through and we can include warnings about the lower security of using this method.

I'll leave this open for comment for a few weeks/months before making this change.

It will be a breaking change and result in a new major version.

@PlagueHO PlagueHO added enhancement The issue is an enhancement request. discussion The issue is a discussion. on hold The issue or pull request has been put on hold by a maintainer. labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion The issue is a discussion. enhancement The issue is an enhancement request. on hold The issue or pull request has been put on hold by a maintainer.
Projects
None yet
Development

No branches or pull requests

1 participant