Skip to content

Ncamillucci/keys 2026 01 01 preview v4#47591

Open
ncamillucci wants to merge 4 commits into
mainfrom
ncamillucci/keys-2026-01-01-preview-v4
Open

Ncamillucci/keys 2026 01 01 preview v4#47591
ncamillucci wants to merge 4 commits into
mainfrom
ncamillucci/keys-2026-01-01-preview-v4

Conversation

@ncamillucci

Copy link
Copy Markdown
Member

Description

  • Added secure_wrap_key and secure_unwrap_key methods for wrap/unwrap operations on keys.
  • Added the KeySecureWrapAlgorithm enum, listing the algorithms supported by the secure wrap/unwrap operations.
  • Added the SecureWrapResult and SecureUnwrapResult model classes wrapping the results of secure_wrap_key and secure_unwrap_key, respectively.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@ncamillucci ncamillucci force-pushed the ncamillucci/keys-2026-01-01-preview-v4 branch from e10efe8 to 9417660 Compare June 22, 2026 13:08
@ncamillucci ncamillucci marked this pull request as ready for review June 22, 2026 13:11
@ncamillucci ncamillucci requested a review from a team as a code owner June 22, 2026 13:11
Copilot AI review requested due to automatic review settings June 22, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR adds support for the Secure Wrap and Secure Unwrap key operations (available in API version 2026-01-01-preview and newer) to the Azure Key Vault Keys library. It introduces new secure_wrap_key/secure_unwrap_key methods on both the sync and async CryptographyClient, the KeySecureWrapAlgorithm enum, and SecureWrapResult/SecureUnwrapResult result models, along with samples and tests.

Changes:

  • Added secure_wrap_key/secure_unwrap_key methods to sync and async CryptographyClient, plus the KeySecureWrapAlgorithm enum and SecureWrapResult/SecureUnwrapResult models, with public exports.
  • Added sync/async samples demonstrating the secure wrap/unwrap flow against a Managed HSM.
  • Added sync/async tests for the new operations and updated the CHANGELOG and recorded test assets.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crypto/_enums.py Adds KeySecureWrapAlgorithm enum.
crypto/_models.py Adds SecureWrapResult and SecureUnwrapResult models.
crypto/_client.py Adds sync secure_wrap_key/secure_unwrap_key.
crypto/aio/_client.py Adds async secure_wrap_key/secure_unwrap_key.
crypto/__init__.py Exports new enum and result models.
crypto/aio/__init__.py Lazy-loads new enum and result models in the aio namespace.
tests/test_crypto_client.py Adds sync secure wrap/unwrap test.
tests/test_crypto_client_async.py Adds async secure wrap/unwrap test and key_operations override.
tests/test_examples_crypto.py Adds sync sample-snippet test.
tests/test_examples_crypto_async.py Adds async sample-snippet test.
samples/secure_key_operations.py New sync sample.
samples/secure_key_operations_async.py New async sample.
assets.json Updates recorded test asset tag.
CHANGELOG.md Documents the new features.


### Features Added

- Added `secure_wrap_key` and `secure_unwrap_key` methods for wrap/unwrap operations on keys [#47200](https://github.com/Azure/azure-sdk-for-python/pull/47591).
@ncamillucci ncamillucci force-pushed the ncamillucci/keys-2026-01-01-preview-v4 branch from d3e4e28 to cb5ad5a Compare June 22, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants