Skip to content

Session Tags for AWS OIDC integration #62676

@taraspos

Description

@taraspos

What would you like Teleport to do?
I would like to be able to configure AWS IAM Session Tags when using AWS OIDC integration.
This can be achieved by adding custom JWT claims in the AWS OIDC token1:

# lib/jwt/jwt.go

// awsOIDCCustomClaims defines the require claims for the JWT token used in AWS OIDC Integration.
type awsOIDCCustomClaims struct {
	jwt.Claims

	// OnBehalfOf identifies the user that is started the request.
	OnBehalfOf string `json:"obo,omitempty"`
+	// SessionTags allows setting AWS IAM Session Tags in OIDC token.
+	SessionTags AWSOIDCCustomClaimTags `json:"https://aws.amazon.com/tags,omitempty"`
}

+ // AWSOIDCCustomClaimTags represents "https://aws.amazon.com/tags" key of AWS IAM Session Tags in OIDC token.
+ // https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp
+ type AWSOIDCCustomClaimTags struct {
+	PrincipalTags     map[string][]string `json:"principal_tags,omitempty"`
+	TransitiveTagKeys []string            `json:"transitive_tag_keys,omitempty"`
+}

What problem does this solve?

Session Tagging is an important AWS IAM feature which enhances access security and would allow enabling the following (but not limited to) use-cases:

If a workaround exists, please include it.
N/A

Related issues

Footnotes

  1. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp

Metadata

Metadata

Assignees

No one assigned

    Labels

    application-accessawsUsed for AWS Related Issues.feature-requestUsed for new features in Teleport, improvements to current should be #enhancements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions