Fix Zanzana Error "user field is malformed" (#107227)

Fix Authentication: Add UID field to Identity in render service
pull/107239/head^2
Mihai Turdean 4 weeks ago committed by GitHub
parent dd2ba2e816
commit 918c93ee4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      pkg/services/authn/clients/render.go
  2. 2
      pkg/services/authn/clients/render_test.go

@ -47,6 +47,7 @@ func (c *Render) Authenticate(ctx context.Context, r *authn.Request) (*authn.Ide
}
return &authn.Identity{
ID: "0",
UID: "0",
Type: identityType,
OrgID: renderUsr.OrgID,
OrgRoles: map[int64]org.RoleType{renderUsr.OrgID: org.RoleType(renderUsr.OrgRole)},

@ -38,6 +38,7 @@ func TestRender_Authenticate(t *testing.T) {
},
expectedIdentity: &authn.Identity{
ID: "0",
UID: "0",
Type: claims.TypeAnonymous,
OrgID: 1,
OrgRoles: map[int64]org.RoleType{1: org.RoleViewer},
@ -60,6 +61,7 @@ func TestRender_Authenticate(t *testing.T) {
},
expectedIdentity: &authn.Identity{
ID: "0",
UID: "0",
Type: claims.TypeRenderService,
OrgID: 1,
OrgRoles: map[int64]org.RoleType{1: org.RoleAdmin},

Loading…
Cancel
Save