mirror of
https://github.com/pgsty/minio.git
synced 2026-03-15 17:17:01 +01:00
Add New Accesskey Info and OpenID Accesskey List API endpoints (#21097)
This commit is contained in:
committed by
Harshavardhana
parent
3310f740f0
commit
eb33bc6bf5
14
cmd/iam.go
14
cmd/iam.go
@@ -1246,6 +1246,20 @@ func (sys *IAMSys) ListSTSAccounts(ctx context.Context, accessKey string) ([]aut
|
||||
}
|
||||
}
|
||||
|
||||
// ListAllAccessKeys - lists all access keys (sts/service accounts)
|
||||
func (sys *IAMSys) ListAllAccessKeys(ctx context.Context) ([]auth.Credentials, error) {
|
||||
if !sys.Initialized() {
|
||||
return nil, errServerNotInitialized
|
||||
}
|
||||
|
||||
select {
|
||||
case <-sys.configLoaded:
|
||||
return sys.store.ListAccessKeys(ctx)
|
||||
case <-ctx.Done():
|
||||
return nil, ctx.Err()
|
||||
}
|
||||
}
|
||||
|
||||
// GetServiceAccount - wrapper method to get information about a service account
|
||||
func (sys *IAMSys) GetServiceAccount(ctx context.Context, accessKey string) (auth.Credentials, *policy.Policy, error) {
|
||||
sa, embeddedPolicy, err := sys.getServiceAccount(ctx, accessKey)
|
||||
|
||||
Reference in New Issue
Block a user