diff --git a/pkg/services/authn/clients/ext_jwt.go b/pkg/services/authn/clients/ext_jwt.go index 26f98338ec2..638101615a2 100644 --- a/pkg/services/authn/clients/ext_jwt.go +++ b/pkg/services/authn/clients/ext_jwt.go @@ -185,10 +185,10 @@ func (s *ExtendedJWT) authenticateAsService(accessTokenClaims authlib.Claims[aut return &authn.Identity{ ID: id, UID: id, + Name: id, Type: t, OrgID: s.cfg.DefaultOrgID(), AccessTokenClaims: &accessTokenClaims, - IDTokenClaims: nil, AuthenticatedBy: login.ExtendedJWTModule, AuthID: accessTokenClaims.Subject, AllowedKubernetesNamespace: accessTokenClaims.Rest.Namespace, diff --git a/pkg/services/authn/clients/ext_jwt_test.go b/pkg/services/authn/clients/ext_jwt_test.go index 6b61748dd03..3f9e9ee6197 100644 --- a/pkg/services/authn/clients/ext_jwt_test.go +++ b/pkg/services/authn/clients/ext_jwt_test.go @@ -228,6 +228,7 @@ func TestExtendedJWT_Authenticate(t *testing.T) { want: &authn.Identity{ ID: "this-uid", UID: "this-uid", + Name: "this-uid", Type: claims.TypeAccessPolicy, OrgID: 1, AccessTokenClaims: &validAccessTokenClaims, @@ -246,6 +247,7 @@ func TestExtendedJWT_Authenticate(t *testing.T) { want: &authn.Identity{ ID: "this-uid", UID: "this-uid", + Name: "this-uid", Type: claims.TypeAccessPolicy, OrgID: 1, AccessTokenClaims: &validAccessTokenClaimsWildcard, @@ -343,6 +345,7 @@ func TestExtendedJWT_Authenticate(t *testing.T) { want: &authn.Identity{ ID: "this-uid", UID: "this-uid", + Name: "this-uid", Type: claims.TypeAccessPolicy, OrgID: 1, AccessTokenClaims: &validAccessTokenClaimsWithStackSet, @@ -369,6 +372,7 @@ func TestExtendedJWT_Authenticate(t *testing.T) { want: &authn.Identity{ ID: "this-uid", UID: "this-uid", + Name: "this-uid", Type: claims.TypeAccessPolicy, OrgID: 1, AccessTokenClaims: &validAccessTokenClaimsWithDeprecatedStackClaimSet,