Skip to content

Commit

Permalink
backport of commit d16505f
Browse files Browse the repository at this point in the history
  • Loading branch information
austingebauer committed Mar 17, 2022
1 parent f34492d commit 85686aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vault/identity_store_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1656,10 +1656,6 @@ func (i *IdentityStore) generatePublicJWKS(ctx context.Context, s logical.Storag
return nil, err
}

jwks := &jose.JSONWebKeySet{
Keys: make([]jose.JSONWebKey, 0),
}

// only return keys that are associated with a role
roleNames, err := s.List(ctx, roleConfigPath)
if err != nil {
Expand Down Expand Up @@ -1687,6 +1683,10 @@ func (i *IdentityStore) generatePublicJWKS(ctx context.Context, s logical.Storag
}
}

jwks := &jose.JSONWebKeySet{
Keys: make([]jose.JSONWebKey, 0, len(keyIDs)),
}

// load the JSON web key for each key ID
for keyID := range keyIDs {
key, err := loadOIDCPublicKey(ctx, s, keyID)
Expand Down

0 comments on commit 85686aa

Please sign in to comment.