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

support Azure AD App roles #137

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nbutton23
Copy link
Contributor

@nbutton23 nbutton23 commented Mar 14, 2023

Overview

Support assigning Azure AD App Roles to the created Service Principal. This can be used to grant Service Principals access to the Azure Graph API. GraphAPI is the only supported way to perform actions in AAD

Design of Change

Adds a new field app_roles that accepts an array of apps and the roles to be assigned. Using the Graph API appRoleAssignment the roles are added.

Roles are expected to be provided as a JSON formatted string in the format

"app_roles": “[
        {   
                \"app_id\": \"<uuid>\",
                \"roles\": [
                        {
                                \"role_name\": \"Directory.Read.All\"
                        }
                ]
        }
]”

I have been running a version of this plugin on our vault instance for a few months with no issues.

Related Issues/Pull Requests

[ ] Issue #92

Contributor Checklist

[x] Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet
My Docs PR Link
[x] Add output for any tests not ran in CI to the PR description (eg, acceptance tests)
[x] Backwards compatible

}{
DisplayName: to.StringPtr(displayName),
DisplayName: to.StringPtr(displayName),
SignInAudience: to.StringPtr("AzureADMyOrg"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed to fix an issue with persist_app since the default value will only allow 2 active tokens at a time.

If needed I can pull this into its own PR.

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

Successfully merging this pull request may close these issues.

None yet

1 participant