mirror of
https://github.com/minio/minio
synced 2024-11-05 17:34:01 +00:00
Add canned diagnostics
policy for admin users (#8937)
This commit is contained in:
parent
e9c111c8d0
commit
301c50b721
2 changed files with 17 additions and 0 deletions
|
@ -1392,6 +1392,10 @@ func setDefaultCannedPolicies(policies map[string]iampolicy.Policy) {
|
|||
if !ok {
|
||||
policies["readwrite"] = iampolicy.ReadWrite
|
||||
}
|
||||
_, ok = policies["diagnostics"]
|
||||
if !ok {
|
||||
policies["diagnostics"] = iampolicy.AdminDiagnostics
|
||||
}
|
||||
}
|
||||
|
||||
// buildUserGroupMemberships - builds the memberships map. IMPORTANT:
|
||||
|
|
|
@ -64,3 +64,16 @@ var WriteOnly = Policy{
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
// AdminDiagnostics - provides admin diagnostics access.
|
||||
var AdminDiagnostics = Policy{
|
||||
Version: DefaultVersion,
|
||||
Statements: []Statement{
|
||||
{
|
||||
SID: policy.ID(""),
|
||||
Effect: policy.Allow,
|
||||
Actions: NewActionSet(PerfInfoAdminAction, ProfilingAdminAction, TraceAdminAction, ConsoleLogAdminAction, ServerInfoAdminAction, ServerHardwareInfoAdminAction),
|
||||
Resources: NewResourceSet(NewResource("*", "")),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue