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

Add support for setting an Alias' name from the k8s namespace and serviceaccount #110

Merged
merged 19 commits into from Sep 13, 2021

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Sep 2, 2021

Overview

This PR is a continuation of #103. Which added a new role configuration to store the Alias.Name in the form of namespace/serviceaccount. Prior to this change the Alias.Name would always be derived from the service account's token uid.

Design of Change

Add a new roles configuration alias_name_source to allow for setting one of the following naming formats:

  • <token.uid> e.g. 53f8253e-6df4-4be7-adae-f566c524c02c (remains the default)
  • <namespace>/<serviceaccount> e.g. kube-system/coredns

Related Issues/Pull Requests

[ ] PR #103

Contributor Checklist

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

@benashz benashz requested a review from calvn September 2, 2021 22:16
backend.go Outdated Show resolved Hide resolved
path_login.go Outdated Show resolved Hide resolved
path_login.go Outdated Show resolved Hide resolved
@benashz benashz requested a review from tomhjp September 3, 2021 13:22
@benashz benashz changed the title Config name fork Add support for setting an Alias' name from the k8s namespace and serviceaccount Sep 3, 2021
@benashz benashz requested a review from calvn September 3, 2021 19:37
path_login.go Outdated Show resolved Hide resolved
path_role.go Outdated Show resolved Hide resolved
@benashz benashz requested a review from calvn September 7, 2021 14:51
@benashz benashz requested a review from tvoran September 10, 2021 20:02
Copy link
Member

@calvn calvn left a comment

Choose a reason for hiding this comment

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

A few nits, otherwise looks good!

path_login.go Outdated Show resolved Hide resolved
path_login_test.go Show resolved Hide resolved
backend.go Outdated Show resolved Hide resolved
@benashz benashz merged commit 79c7586 into master Sep 13, 2021
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

3 participants