Skip to content

Commit

Permalink
Merge pull request #300 from fuller-inc/ignore-unknown-public-kyt
Browse files Browse the repository at this point in the history
ignore public keys that have unknown kyt
  • Loading branch information
shogo82148 authored Apr 1, 2022
2 parents aebb39a + ffadbf1 commit 6500b41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions provider/assume-role/github/jwk/jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ func ParseSet(data []byte) (*Set, error) {

list := make([]Key, 0, len(keys.Keys))
for _, raw := range keys.Keys {
key, err := ParseKey(raw)
if err != nil {
return nil, err
if key, err := ParseKey(raw); err == nil {
list = append(list, key)
// Ignore keys that cannot be parsed.
}
list = append(list, key)
}
return &Set{
Keys: list,
Expand Down
2 changes: 1 addition & 1 deletion provider/assume-role/github/oidc/jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *Client) GetJWKS(ctx context.Context, url string) (*jwk.Set, error) {

set, err := jwk.ParseSet(data)
if err != nil {

return nil, time.Time{}, err
}
return set, expiresAt, nil
})
Expand Down

0 comments on commit 6500b41

Please sign in to comment.