-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add Azure Key Vault Extension #218
Conversation
…ension requires real service for testing.
String dir = "QMETA-INF/services"; | ||
String hotspotLibName = "jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory"; |
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.
Add a comment explaining what the QMETA-INF/services
thing is.
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.
See 37c8dc9.
.filter(n -> n.startsWith("com.azure.security.keyvault.secrets.models.")) | ||
.sorted() |
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.
By loading the classes in this way, we are creating an implicit contract: All of the classes that start with this package are "safe" to load in this way. Do we know this will always be true?
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 safest approach is to load the exact classes, see 5fce42c.
.filter(s -> s.startsWith("com.azure.security.keyvault.secrets.implementation.models.")) | ||
.forEach(e -> { |
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.
This is safe to use a startsWith
approach here because we are pre-filtering with the getAllKnownImplementors
.
integration-tests/README.md
Outdated
### Creating Azure Key Vault | ||
|
||
Run the following commands to create an Azure Key Vault, set permission and export its connection string as an environment | ||
variable. | ||
|
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.
Mention that the steps listed here are also performed by the GitHub Actions workflows via the build-with-native.sh
file.
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.
Good catch, see 5fce42c.
az keyvault create \ | ||
--name ${KEY_VAULT_NAME} \ | ||
--resource-group ${RESOURCE_GROUP_NAME} \ | ||
--location eastus |
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.
Mention this duplicates code in integration-tests/README.md
.
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.
See 5fce42c.
``` | ||
KEY_VAULT_NAME=<unique-key-vault-name> | ||
az keyvault create --name ${KEY_VAULT_NAME} \ | ||
--resource-group ${RESOURCE_GROUP_NAME} \ | ||
--location eastus |
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.
Mention the GitHub Actions workflow.
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.
See 5fce42c.
LGTM now, approved. |
This PR is related to #63, including:
SecretClient
andSecretAsyncClient
bean with propertyquarkus.azure.keyvault.secret.endpoint
.Test: https://github.com/galiacheng/quarkus-azure-services/actions/runs/8829692524