Skip to content

Commit

Permalink
feat: add stored attributes for generic OIDC
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Delicata <[email protected]>
  • Loading branch information
lbenguigui and sdelicata committed Jun 28, 2024
1 parent 241482e commit f709691
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
8 changes: 6 additions & 2 deletions pkg/apis/hub/v1alpha1/api_portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ type OIDCConfigStatus struct {
// +optional
Scopes string `json:"scopes,omitempty"`

// ExternalIDClaim is the name of the JWT claim containing the user external ID.
// UserIDClaim is the name of the JWT claim containing the user ID.
// +optional
ExternalIDClaim string `json:"externalIdClaim,omitempty"`
UserIDClaim string `json:"userIdClaim,omitempty"`

// FirstnameClaim is the name of the JWT claim containing the user firstname.
// +optional
Expand All @@ -111,6 +111,10 @@ type OIDCConfigStatus struct {
// CompanyClaim is the name of the JWT claim containing the user company.
// +optional
CompanyClaim string `json:"companyClaim,omitempty"`

// SyncedAttributes configure the user attributes to sync.
// +optional
SyncedAttributes []string `json:"syncedAttributes,omitempty"`
}

// APIPortalStatus is the status of an APIPortal.
Expand Down
14 changes: 10 additions & 4 deletions pkg/apis/hub/v1alpha1/crd/hub.traefik.io_apiportals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ spec:
description: EmailClaim is the name of the JWT claim containing
the user email.
type: string
externalIdClaim:
description: ExternalIDClaim is the name of the JWT claim containing
the user external ID.
type: string
firstnameClaim:
description: FirstnameClaim is the name of the JWT claim containing
the user firstname.
Expand Down Expand Up @@ -121,6 +117,16 @@ spec:
description: SecretName is the name of the secret containing the
OIDC ClientSecret for accessing the exposed APIPortal WebUI.
type: string
syncedAttributes:
description: SyncedAttributes configure the user attributes to
sync.
items:
type: string
type: array
userIdClaim:
description: UserIDClaim is the name of the JWT claim containing
the user ID.
type: string
type: object
syncedAt:
format: date-time
Expand Down
7 changes: 6 additions & 1 deletion pkg/apis/hub/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f709691

Please sign in to comment.