test(e2e): Add multi-scope grants test (#4446)
This commit is contained in:
1 parent
d5ae3d8dc6
commit
41d3dffa9b
12 files changed
+262
-21
No files matched your search
@@ -155,7 +155,8 @@ func TestCliLdap(t *testing.T) {
|
||||
require.Contains(t, managedGroupReadResult.Item.MemberIds, newAccountId)
|
||||
|
||||
// Add managed group as a principal to a role with permissions to read auth methods
|
||||
newRoleId := boundary.CreateNewRoleCli(t, ctx, newOrgId)
|
||||
newRoleId, err := boundary.CreateRoleCli(t, ctx, newOrgId)
|
||||
require.NoError(t, err)
|
||||
boundary.AddPrincipalToRoleCli(t, ctx, newRoleId, managedGroupId)
|
||||
boundary.AddGrantToRoleCli(t, ctx, newRoleId, "ids=*;type=auth-method;actions=read")
|
||||
|
||||
|
||||
@@ -171,7 +171,8 @@ func TestHttpRateLimit(t *testing.T) {
|
||||
require.NoError(t, output.Err, string(output.Stderr))
|
||||
})
|
||||
boundary.SetAccountToUserCli(t, ctx, newUserId, newAccountId)
|
||||
newRoleId := boundary.CreateNewRoleCli(t, ctx, newProjectId)
|
||||
newRoleId, err := boundary.CreateRoleCli(t, ctx, newProjectId)
|
||||
require.NoError(t, err)
|
||||
boundary.AddGrantToRoleCli(t, ctx, newRoleId, "ids=*;type=*;actions=*")
|
||||
boundary.AddPrincipalToRoleCli(t, ctx, newRoleId, newUserId)
|
||||
|
||||
@@ -306,7 +307,8 @@ func TestCliRateLimit(t *testing.T) {
|
||||
require.NoError(t, output.Err, string(output.Stderr))
|
||||
})
|
||||
boundary.SetAccountToUserCli(t, ctx, newUserId, newAccountId)
|
||||
newRoleId := boundary.CreateNewRoleCli(t, ctx, newProjectId)
|
||||
newRoleId, err := boundary.CreateRoleCli(t, ctx, newProjectId)
|
||||
require.NoError(t, err)
|
||||
boundary.AddGrantToRoleCli(t, ctx, newRoleId, "ids=*;type=*;actions=*")
|
||||
boundary.AddPrincipalToRoleCli(t, ctx, newRoleId, newUserId)
|
||||
|
||||
|
||||
Reference in new issue
Block a user