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

Fix Authentication: Add UID field to Identity in render service
This commit is contained in:
Mihai Turdean
2025-06-26 09:14:44 -06:00
committed by GitHub
parent dd2ba2e816
commit 918c93ee4e
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -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},