-
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
Getting InternalServerErrors returned when creating new roles in the engine #189
Comments
Additionally I can confirm that it is related to the latest version:
Vault version 1.14.8
I can confirm that it also still works in Vault version 1.15.6, where the secret engine runs on 0.16.3 |
I'm trying to find what might be the cause, what I can see is:
In this code you are using the clientID, but in the previous code:
The applicationObjectID is being used. So, I tried creating the role using the clientID instead of the application object ID. That results in a successfully created role, however, the subsequent API call to generate a token on the application doesn't work:
Which I am guessing is because here:
The application object id is again being used? Which is a total mismatch with the client id. |
I do not code in GO, but i asked chatgpt if it could write something. So maybe something like this:
?? |
So in summary: When configuring a role in the engine static service principals are specified by setting the application_object_id:
The old code (0.16.3) did the following:
The new validation code for this attribute does an msgraph search:
https://github.com/hashicorp/vault-plugin-secrets-azure/blob/main/api/applications.go#L77 But this is a search for an application_id - not an application_object_id. I've attempted to fix the issue in PR #196 |
I think this was fixed in #200 |
Does this effect Vault dedicated? I am seeing the same issue. |
Recently we upgraded the azure secrets engine from 0.16.1 to 0.17.0 when we upgraded our Vault from 1.14.8 to 1.16.1.
It seems there is now an issue when creating new roles:
I checked the validity of the token that's in the config for the engine, it's valid and working. Since the error is 'no application found'; I tested it by using the application id, subscription id, tenant id and client secret in the config and putting it in my Postman, and performing a GET API call like so:
I also tested the creation of a new application, and a secret on the application, using Postman: Those also work.
I tested the generation of a secret via the azure secrets engine: Works.
So there is nothing wrong with permissions on the identity used in the config. The issue seems to be scoped to just the creation of roles into the secrets engine.
The InternalServerError seems to be coming from the engine itself, or from Vault maybe, since it fails on doing the PUT command, but then is giving an error that suggests the issue is on the AAD side.
I also looked into the Vault logs, however those do not provide any more relevant information then is already listed here.
The text was updated successfully, but these errors were encountered: