Scope role grants (#913)
* Add scope read grant to default roles * Update CHANGELOG.md Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
1 parent
1afa3a4b6c
commit
628a02ad15
4 files changed
+9
-3
No files matched your search
@@ -54,7 +54,7 @@ func (b *Server) CreateInitialLoginRole(ctx context.Context) (*iam.Role, error)
|
||||
return nil, fmt.Errorf("error creating role for default generated grants: %w", err)
|
||||
}
|
||||
if _, err := iamRepo.AddRoleGrants(cancelCtx, role.PublicId, role.Version, []string{
|
||||
"type=scope;actions=list",
|
||||
"id=*;type=scope;actions=list,read",
|
||||
"id=*;type=auth-method;actions=authenticate,list",
|
||||
"id={{account.id}};actions=read,change-password",
|
||||
}); err != nil {
|
||||
|
||||
@@ -53,7 +53,7 @@ func generateScopeTableOutput(in *scopes.Scope) string {
|
||||
ret = append(ret, " Authorized Actions on Scope's Collections:")
|
||||
for _, key := range keys {
|
||||
ret = append(ret,
|
||||
fmt.Sprintf(" %ss:", key),
|
||||
fmt.Sprintf(" %s:", key),
|
||||
base.WrapSlice(6, in.AuthorizedCollectionActions[key]),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user