-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Key Vault] Implement 7.3-preview with secure key release #18055
[Key Vault] Implement 7.3-preview with secure key release #18055
Conversation
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
/check-enforcer reset |
/check-enforcer evaluate |
/azp run python - keyvault - ci |
Azure Pipelines failed to run 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments on the 32199ca commit. We should change the shape a little based on those comments, but overall it looks good. I think this is fine as-is for now to unblock the CLI/PS.
|
||
:param str name: The name of the key to export. | ||
:param str version: A specific version of the key to export. | ||
:param parameters: The parameters for the export operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to include the name and version in the parameters, rather than all three. In fact, in .NET we'd have to change the order anyway, since version
is optional and we can't have required parameters after optional parameters. But looking at similar cases, we tend to just consolidate into an "options" or "parameters" (in this case, since it's required, probably the latter) parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The remaining parameters are all optional according to the latest swagger changes so I think it makes the most sense to make them kwargs here and drop the class. For other languages that use a parameter object pattern, it might make more sense to move the key name/version into KeyExportParameters
, like you said.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually hoist up some optional parameters like version
because they are important and common. We do that in other APIs. Maybe not parameters
, but it's something to discuss further in the channel. For now, not blocking.
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py
Outdated
Show resolved
Hide resolved
# type: (str, **Any) -> None | ||
self.environment = environment | ||
self.algorithm = kwargs.get("algorithm", None) | ||
self.nonce = kwargs.get("nonce", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not passed, we probably should generate one.
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py
Outdated
Show resolved
Hide resolved
/azp run python - keyvault - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I left a few initial comments we can revisit later, none of them block a private preview.
Resolves #13562.
This implements the changes for service version 7.3-preview and makes this API version the default. Functional tests for the added key export and key release operations are pending service support and required resource configuration, respectively. Due to a behavior change with key import on vaults, tests that import keys are temporarily pinned to 7.2-preview.