Skip to content

support Azure AD App roles#137

Open
nbutton23 wants to merge 4 commits into
hashicorp:mainfrom
nbutton23:nbutton/support-app-roles
Open

support Azure AD App roles#137
nbutton23 wants to merge 4 commits into
hashicorp:mainfrom
nbutton23:nbutton/support-app-roles

Conversation

@nbutton23
Copy link
Copy Markdown
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
Copy Markdown
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.

1 participant