-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add OpenRewrite recipes and samples for azure-security-keyvault-keys to automate migration to v2 #46964
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
Open
DoggyDoggyDoggy
wants to merge
15
commits into
Azure:main
Choose a base branch
from
DoggyDoggyDoggy:azure-security-keyvault-keys-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add OpenRewrite recipes and samples for azure-security-keyvault-keys to automate migration to v2 #46964
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
88f5c3f
azure-security-keyvault-certificates samples and recipes
DoggyDoggyDoggy b70cf75
Added dependency
DoggyDoggyDoggy d855830
DefaultAzureCredentialBuilder recipe
DoggyDoggyDoggy 3450f8b
CI setup
DoggyDoggyDoggy 0f9f509
CI fix
DoggyDoggyDoggy c3cfdb6
CI fix
DoggyDoggyDoggy bfbed66
Update checkstyle-suppressions.xml to use the new linting extensions …
srnagar 5c63fc4
fix checkstyle
srnagar 0a7208f
Samples and recipes for security-keyvault-keys
DoggyDoggyDoggy cfc8104
Dependencies for security-keyvault-keys
DoggyDoggyDoggy 35ae4dd
CI setup
DoggyDoggyDoggy fd44788
Merge branch 'main' into azure-security-keyvault-keys-pr
srnagar c0ced63
Merge branch 'main' into azure-security-keyvault-certificates-pr
DoggyDoggyDoggy 02bda29
Merge pull request #30 from DoggyDoggyDoggy/azure-security-keyvault-c…
DoggyDoggyDoggy 834d1d9
Merge branch 'main' into azure-security-keyvault-keys-pr
DoggyDoggyDoggy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...n/resources/META-INF/rewrite/migrationRecipes/security-keyvault-keys/LibraryMigration.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
# -------------------------------------------------------------------- | ||
# Migration Recipes for Azure security-keyvault-keys Library | ||
# -------------------------------------------------------------------- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: com.azure.openrewrite.migration.security.keyvault.keys | ||
displayName: Migrate from azure-security-keyvault-keys to next generation stack | ||
description: This recipe migrates the Azure keyvault-keys library to the next generation stack. | ||
recipeList: | ||
|
||
- com.azure.openrewrite.recipe.azure.security.keyvault.keys | ||
- com.azure.openrewrite.recipe.azure.security.keyvault.keys.models | ||
- com.azure.openrewrite.recipe.azure.security.keyvault.keys.cryptography | ||
- com.azure.openrewrite.recipe.azure.security.keyvault.keys.cryptography.models |
82 changes: 82 additions & 0 deletions
82
...urity-keyvault-keys/com.azure.recipe.azure.security.keyvault.keys.cryptography.models.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
# -------------------------------------------------------------------- | ||
# Migration Recipes for azure.security.keyvault.keys.cryptography.models | ||
# -------------------------------------------------------------------- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: com.azure.openrewrite.recipe.azure.security.keyvault.keys.cryptography.models | ||
displayName: Migrate from azure.security.keyvault.keys.cryptography.models to next generation stack | ||
description: This recipe migrates the azure.security.keyvault.keys.cryptography.models package to the next generation stack. | ||
recipeList: | ||
|
||
# -------------------------------------------------------------------- | ||
# DecryptResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.DecryptResult | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.DecryptResult | ||
|
||
# -------------------------------------------------------------------- | ||
# EncryptResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.EncryptResult | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.EncryptResult | ||
|
||
# -------------------------------------------------------------------- | ||
# EncryptionAlgorithm | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.EncryptionAlgorithm | ||
|
||
# -------------------------------------------------------------------- | ||
# EncryptResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm | ||
|
||
# -------------------------------------------------------------------- | ||
# UnwrapResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.UnwrapResult | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.UnwrapResult | ||
|
||
# -------------------------------------------------------------------- | ||
# WrapResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.WrapResult | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.WrapResult | ||
|
||
# -------------------------------------------------------------------- | ||
# SignResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.SignResult | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.SignResult | ||
|
||
# -------------------------------------------------------------------- | ||
# SignatureAlgorithm | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.SignatureAlgorithm | ||
|
||
# -------------------------------------------------------------------- | ||
# VerifyResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.models.VerifyResult | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.models.VerifyResult |
25 changes: 25 additions & 0 deletions
25
...pes/security-keyvault-keys/com.azure.recipe.azure.security.keyvault.keys.cryptography.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
# -------------------------------------------------------------------- | ||
# Migration Recipes for azure.security.keyvault.keys.cryptography | ||
# -------------------------------------------------------------------- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: com.azure.openrewrite.recipe.azure.security.keyvault.keys.cryptography | ||
displayName: Migrate from azure.security.keyvault.keys.cryptography to next generation stack | ||
description: This recipe migrates the azure.security.keyvault.keys.cryptography package to the next generation stack. | ||
recipeList: | ||
# -------------------------------------------------------------------- | ||
# DecryptResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.CryptographyClient | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.CryptographyClient | ||
|
||
# -------------------------------------------------------------------- | ||
# DecryptResult | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.cryptography.CryptographyClientBuilder | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.cryptography.CryptographyClientBuilder |
71 changes: 71 additions & 0 deletions
71
...write/migrationRecipes/security-keyvault-keys/com.azure.security.keyvault.keys.models.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: com.azure.openrewrite.recipe.azure.security.keyvault.keys.models | ||
displayName: Migrate from azure.security.keyvault.keys.models to next generation stack | ||
description: This recipe migrates the azure.security.keyvault.keys.models package to the next generation stack. | ||
recipeList: | ||
|
||
# -------------------------------------------------------------------- | ||
# CreateRsaKeyOptions | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.CreateRsaKeyOptions | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.CreateRsaKeyOptions | ||
|
||
# -------------------------------------------------------------------- | ||
# DeletedKey | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.DeletedKey | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.DeletedKey | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyVaultKey | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.KeyVaultKey | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.KeyVaultKey | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyRotationLifetimeAction | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.KeyRotationLifetimeAction | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.KeyRotationLifetimeAction | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyRotationPolicy | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.KeyRotationPolicy | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.KeyRotationPolicy | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyRotationPolicyAction | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.KeyRotationPolicyAction | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.KeyRotationPolicyAction | ||
|
||
# -------------------------------------------------------------------- | ||
# CreateEcKeyOptions | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.CreateEcKeyOptions | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.CreateEcKeyOptions | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyProperties | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.models.KeyProperties | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.models.KeyProperties |
27 changes: 27 additions & 0 deletions
27
...-INF/rewrite/migrationRecipes/security-keyvault-keys/com.azure.security.keyvault.keys.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: com.azure.openrewrite.recipe.azure.security.keyvault.keys | ||
displayName: Migrate from azure.security.keyvault.keys to next generation stack | ||
description: This recipe migrates the azure.security.keyvault.keys package to the next generation stack. | ||
recipeList: | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyClientBuilder | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeMethodName: | ||
methodPattern: com.azure.security.keyvault.keys.KeyClientBuilder vaultUrl(..) | ||
newMethodName: endpoint | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.KeyClientBuilder | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.KeyClientBuilder | ||
|
||
# -------------------------------------------------------------------- | ||
# KeyClient | ||
# -------------------------------------------------------------------- | ||
|
||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: com.azure.security.keyvault.keys.KeyClient | ||
newFullyQualifiedTypeName: com.azure.v2.security.keyvault.keys.KeyClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...zure-security-keyvault-keys/BackupAndRestoreOperations/v1/BackupAndRestoreOperations.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you add more details on what is the expected change for this recipe? Where should this be moved to?