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

Allow name template when login via auth method #19134

Closed
jorgemarey opened this issue Nov 20, 2023 · 4 comments · Fixed by #19135
Closed

Allow name template when login via auth method #19134

jorgemarey opened this issue Nov 20, 2023 · 4 comments · Fixed by #19135

Comments

@jorgemarey
Copy link
Contributor

Proposal

Allow setting a token name template so when someone makes login via a nomad auth method, the token has information about which user belongs to.

Currently, when making a login using JWT the token name is fixed to "JWT-<auth_name>" for every token generated by that auth method. As the token doesn't have any metadata, this has no information about the real user behind that token, when auditing requests it'll be very useful to have that information.

Possible Solutions

  1. provide a configuration option that states which claim to use for building the token name: This would be easier to implement as the user only need to provide the claim to build the token name, but wouldn't be as configurable.
  2. allow configuring a token name template: this would allow users to configure the name as they want.
@jrasell
Copy link
Member

jrasell commented Nov 20, 2023

Hi @jorgemarey and thanks for raising this feature request. This is something we would certainly like to support and is already being tracked by #18969. I will therefore close this out as a duplicate.

@jrasell jrasell closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@jorgemarey
Copy link
Contributor Author

Sorry @jrasell I didn't notice :(
I also made a PR for this. Would you mind taking a look at it?

@jrasell
Copy link
Member

jrasell commented Nov 20, 2023

No need to be sorry. I have assigned the PR to myself for review and will get an initial one done soon. Thanks for raising it; I'm very excited to see this addition and was about to work on it, so perfect timing!

Copy link

github-actions bot commented Jan 4, 2025

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants