mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Add canned diagnostics
policy for admin users (#8937)
This commit is contained in:
parent
e9c111c8d0
commit
301c50b721
@ -1392,6 +1392,10 @@ func setDefaultCannedPolicies(policies map[string]iampolicy.Policy) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
policies["readwrite"] = iampolicy.ReadWrite
|
policies["readwrite"] = iampolicy.ReadWrite
|
||||||
}
|
}
|
||||||
|
_, ok = policies["diagnostics"]
|
||||||
|
if !ok {
|
||||||
|
policies["diagnostics"] = iampolicy.AdminDiagnostics
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// buildUserGroupMemberships - builds the memberships map. IMPORTANT:
|
// 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 New Issue
Block a user