Use scopes from provider for OIDC token generation if present #1150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows the provider to specify custom scopes that should be used when generating OIDC tokens. This is useful when, for example, when using the OIDC provider with Dex and Github in that it allows the preferred_username or federated_claims.user_id fields to be returned with the token for use in SSH certificate templates (ie. to identify a Github user via extensions:[email protected]).
Note that this feature depends on smallstep/certificates#1796 being merged to provide the
Scopes
field onproviders.OIDC
.Example usage:
ca.json:
SSH template:
Name of feature:
Custom scopes for OIDC providers.
Pain or issue this feature alleviates:
Same as smallstep/certificates#1796.
Why is this important to the project (if not answered above):
Same as smallstep/certificates#1796.
Is there documentation on how to use this feature? If so, where?
Same as smallstep/certificates#1796.
In what environments or workflows is this feature supported?
Same as smallstep/certificates#1796.
In what environments or workflows is this feature explicitly NOT supported (if any)?
Same as smallstep/certificates#1796.
Supporting links/other PRs/issues:
Requires smallstep/certificates#1796.