backport of commit 6b2d5718b2 (#5902)

Co-authored-by: Sorawis Nilparuk <sorawis.nilparuk@hashicorp.com>
pull/5906/head
hc-github-team-secure-boundary 10 months ago committed by GitHub
parent 8a4c84ded3
commit 48a36a3dbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -516,7 +516,17 @@ func TestGrants_ReadActions(t *testing.T) {
user, account := iam.TestUserManagedGroupGrantsFunc(t, conn, kmsCache, globals.GlobalPrefix, ldap.TestAuthMethodWithAccountInManagedGroup, []iam.TestRoleGrantsRequest{
{
RoleScopeId: globals.GlobalPrefix,
Grants: []string{"ids=*;type=*;actions=*"},
Grants: []string{"ids=*;type=host-catalog;actions=*"},
GrantScopes: []string{globals.GrantScopeThis, globals.GrantScopeDescendants},
},
{
RoleScopeId: globals.GlobalPrefix,
Grants: []string{"ids=*;type=host;actions=*"},
GrantScopes: []string{globals.GrantScopeThis, globals.GrantScopeDescendants},
},
{
RoleScopeId: globals.GlobalPrefix,
Grants: []string{"ids=*;type=host-set;actions=*"},
GrantScopes: []string{globals.GrantScopeThis, globals.GrantScopeDescendants},
},
})()

@ -701,7 +701,7 @@ func (s Service) authResult(ctx context.Context, id string, a action.Type, isRec
res := auth.VerifyResults{}
var parentId string
opts := []auth.Option{auth.WithAction(a), auth.WithRecursive(isRecursive)}
opts := []auth.Option{auth.WithAction(a), auth.WithRecursive(isRecursive), auth.WithFetchAdditionalResourceGrants(additionalResourceGrants...)}
switch a {
case action.List, action.Create:
parentId = id

Loading…
Cancel
Save