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

Backport of refactor identity claims constructor to builder into release/1.8.x #23741

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #23708 to be assessed for backporting due to the inclusion of the label backport/1.8.x.

The below text is copied from the body of the original PR.


Upcoming work to add extensibility to identity claims for Vault (ref #23510) will require exposing server configuration and more objects from state to the process of creating an IdentityClaims struct.

Depending on how we inject these parameters into the constructor, we end up creating circular dependencies or a lot more logic in the setup in the plan applier and alloc endpoint. There are three contexts where we call NewIdentityClaims: the plan applier (where we only care about the default identity), signing task identities, and signing service identities. Each needs different parameters. So we'll refactor the constructor as a builder with methods that the caller can decide to use (or not) depending on context. I've pulled this work out of #23675 to make it easier to review separately.

Ref: #23510
Ref: #23675
Ref: https://hashicorp.atlassian.net/browse/NET-10372
Ref: https://hashicorp.atlassian.net/browse/NET-10387


Note for reviewers: #23675 has some new consumers of this API that'll make it a little more clear why a functional options approach wasn't desirable here. We don't necessarily have all the options ready at once unless we allocate a slice of function pointers to append to, and it makes the already "meh" ordering requirements here easier to mess up.


Overview of commits

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/refactor-identity-claim-constructor/hugely-able-walrus branch from 7e06374 to 968553b Compare August 5, 2024 18:33
@tgross tgross merged commit 3b1dc80 into release/1.8.x Aug 5, 2024
20 checks passed
@tgross tgross deleted the backport/refactor-identity-claim-constructor/hugely-able-walrus branch August 5, 2024 18:49
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Dec 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants