Allow OIDC user to query user info if policies permit (#13882)

This commit is contained in:
Aditya Manthramurthy
2021-12-10 15:03:39 -08:00
committed by GitHub
parent 518612492c
commit f2bd026d0e
3 changed files with 28 additions and 24 deletions
+8
View File
@@ -844,6 +844,14 @@ func (c *check) mustCreateIAMUser(ctx context.Context, admClnt *madmin.AdminClie
}
}
func (c *check) mustGetIAMUserInfo(ctx context.Context, admClnt *madmin.AdminClient, accessKey string) madmin.UserInfo {
ui, err := admClnt.GetUserInfo(ctx, accessKey)
if err != nil {
c.Fatalf("should be able to get user info: %v", err)
}
return ui
}
func (c *check) mustNotCreateIAMUser(ctx context.Context, admClnt *madmin.AdminClient) {
randUser := mustGetUUID()
randPass := mustGetUUID()