Skip to content
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

"The Azure Key Vault url is malformed" exception #41

Open
abitgcp opened this issue Feb 20, 2023 · 1 comment
Open

"The Azure Key Vault url is malformed" exception #41

abitgcp opened this issue Feb 20, 2023 · 1 comment

Comments

@abitgcp
Copy link

abitgcp commented Feb 20, 2023

Steps to reproduce:
Clone Git repo in local eclipse. Update keyvalue_base_url to a valid value in web.xml.
Add Tomcat server and run the partnerconsent app.

Expected behavior

No exception

Share the expected output

Actual behavior

SEVERE: Exception starting filter [AuthenticationFilter]
java.lang.IllegalArgumentException: The Azure Key Vault url is malformed.
    at com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(SecretClientBuilder.java:177)
    at com.microsoft.store.samples.partnerconsent.security.KeyVaultProvider.getKeyVaultClient(KeyVaultProvider.java:68)
    at com.microsoft.store.samples.partnerconsent.security.KeyVaultProvider.<init>(KeyVaultProvider.java:33)
    at com.microsoft.store.samples.partnerconsent.security.AuthenticationFilter.init(AuthenticationFilter.java:236)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:272)
    ...

I have used a valid value of format - https://some-name.vault.azure.net/ as keyvault_base_url but still facing the exception.

@abitgcp
Copy link
Author

abitgcp commented Feb 21, 2023

@msftgits and other repository owners/contributors - I have identified the bug

the arrowed statement (in the image) should come above the below statement because getKeyVaultClient method is using the variable vaultBaseUrl.
client = getKeyVaultClient();

Screenshot 2023-02-21 at 8 42 17 PM

Please make this change in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant