Skip to content

Azure Vault Config Provider: reject empty secret name #194

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MouhsinElmajdouby
Copy link
Member

@MouhsinElmajdouby MouhsinElmajdouby commented Jun 16, 2025

Fixes: #193

Reject URLs ending in /secrets/ with no name by validating in AzureVaultURLParser and throwing a clear IllegalArgumentException.
Added a unit test to cover the empty‐name scenario.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 16, 2025
@@ -70,12 +70,15 @@ static void parseVaultSecretUri(

String path = urlBuilder.getPath();

if (!path.contains("/secrets"))
if (!path.contains("/secrets/"))
throw new IllegalArgumentException("The Vault Secret URI should " +
"contain \"/secrets\" following by the name of the Secret: " +
Copy link
Member

Choose a reason for hiding this comment

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

contain "/secrets" followed by the name of the Secret:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AZURE VAULT CONFIG PROVIDER] IF VAULT SECRET NAME IS EMPTY, THE EXCEPTION IS NOT USEFUL
2 participants