Skip to content

Commit

Permalink
Second Attempt at Key IDs (#117)
Browse files Browse the repository at this point in the history
So according to the node jwks stuff, it requires a single candidate key,
and it doesn't match on the embedded key at all, just the KID, so we
need to inject this into the headers to disambiguate.
  • Loading branch information
spjmurray authored Sep 19, 2024
1 parent e32e02e commit eff37c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/identity/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A Helm chart for deploying Unikorn's IdP

type: application

version: v0.2.37
appVersion: v0.2.37
version: v0.2.38
appVersion: v0.2.38

icon: https://raw.githubusercontent.com/unikorn-cloud/assets/main/images/logos/dark-on-light/icon.png

Expand Down
4 changes: 2 additions & 2 deletions charts/identity/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ issuer:
# are applied to the organization, regardless of project scoping etc.
roles:
# A platform-admin can do anything anywhere.
platform-adminstrator:
platform-administrator:
description: Platform administrator
scopes:
global:
Expand All @@ -99,7 +99,7 @@ roles:
physicalnetworks: [read,delete]
quotas: [read,update]
# An administrator can do anything within an organization.
adminstrator:
administrator:
description: Organization administrator
scopes:
organization:
Expand Down
4 changes: 3 additions & 1 deletion pkg/jose/jose.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ func (i *JWTIssuer) EncodeJWT(ctx context.Context, claims interface{}) (string,
}

options := &jose.SignerOptions{
EmbedJWK: true,
ExtraHeaders: map[jose.HeaderKey]interface{}{
"kid": getKeyID(keyPair.Cert),
},
}

signer, err := jose.NewSigner(signingKey, options)
Expand Down

0 comments on commit eff37c1

Please sign in to comment.