Fix Zanzana Error "user field is malformed" (#107227)
Fix Authentication: Add UID field to Identity in render service
This commit is contained in:
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user