Skip to content

Commit 1d06879

Browse files
authored
k8s-keystone-auth: properly handle token with no project scope (#2880)
1 parent 6ac0275 commit 1d06879

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/identity/keystone/authenticator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ func (k *Keystoner) GetTokenInfo(ctx context.Context, token string) (*tokenInfo,
6666
if err != nil {
6767
return nil, fmt.Errorf("failed to extract project information from Keystone response: %v", err)
6868
}
69+
if project == nil {
70+
return nil, fmt.Errorf("failed to extract project information from Keystone response")
71+
}
6972

7073
roles, err := ret.ExtractRoles()
7174
if err != nil {

0 commit comments

Comments
 (0)