Handle grant string id to ids
This commit is contained in:
1 parent
069032103e
commit
417bad5d36
10 files changed
+17
-17
No files matched your search
@@ -163,7 +163,7 @@ resource "boundary_role" "organization_readonly" {
|
|||||||
name = "readonly"
|
name = "readonly"
|
||||||
description = "Read-only role"
|
description = "Read-only role"
|
||||||
principal_ids = [boundary_group.readonly_users.id]
|
principal_ids = [boundary_group.readonly_users.id]
|
||||||
grant_strings = ["id=*;type=*;actions=read"]
|
grant_strings = ["ids=*;type=*;actions=read"]
|
||||||
scope_id = boundary_scope.corp.id
|
scope_id = boundary_scope.corp.id
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ resource "boundary_role" "organization_admin" {
|
|||||||
principal_ids = concat(
|
principal_ids = concat(
|
||||||
[for user in boundary_user.user: user.id]
|
[for user in boundary_user.user: user.id]
|
||||||
)
|
)
|
||||||
grant_strings = ["id=*;type=*;actions=create,read,update,delete"]
|
grant_strings = ["ids=*;type=*;actions=create,read,update,delete"]
|
||||||
scope_id = boundary_scope.corp.id
|
scope_id = boundary_scope.corp.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ resource "boundary_role" "readonly" {
|
|||||||
name = "readonly"
|
name = "readonly"
|
||||||
description = "A readonly role"
|
description = "A readonly role"
|
||||||
principal_ids = [boundary_user.readonly.id]
|
principal_ids = [boundary_user.readonly.id]
|
||||||
grant_strings = ["id=*;type=*;actions=read"]
|
grant_strings = ["ids=*;type=*;actions=read"]
|
||||||
scope_id = boundary_scope.org.id
|
scope_id = boundary_scope.org.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -112,7 +112,7 @@ resource "boundary_role" "readonly" {
|
|||||||
name = "readonly"
|
name = "readonly"
|
||||||
description = "A readonly role"
|
description = "A readonly role"
|
||||||
principal_ids = [boundary_user.readonly.id]
|
principal_ids = [boundary_user.readonly.id]
|
||||||
grant_strings = ["id=*;type=*;actions=read"]
|
grant_strings = ["ids=*;type=*;actions=read"]
|
||||||
scope_id = boundary_scope.project.id
|
scope_id = boundary_scope.project.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ resource "boundary_scope" "org" {
|
|||||||
resource "boundary_role" "org_admin" {
|
resource "boundary_role" "org_admin" {
|
||||||
scope_id = boundary_scope.global.id
|
scope_id = boundary_scope.global.id
|
||||||
grant_scope_id = boundary_scope.org.id
|
grant_scope_id = boundary_scope.org.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ resource "boundary_role" "readonly" {
|
|||||||
name = "readonly"
|
name = "readonly"
|
||||||
description = "A readonly role"
|
description = "A readonly role"
|
||||||
principal_ids = [boundary_user.readonly.id]
|
principal_ids = [boundary_user.readonly.id]
|
||||||
grant_strings = ["id=*;type=*;actions=read"]
|
grant_strings = ["ids=*;type=*;actions=read"]
|
||||||
scope_id = boundary_scope.project.id
|
scope_id = boundary_scope.project.id
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,6 @@ resource "boundary_role" "readonly" {
|
|||||||
name = "readonly"
|
name = "readonly"
|
||||||
description = "A readonly role"
|
description = "A readonly role"
|
||||||
principal_ids = [boundary_user.readonly.id]
|
principal_ids = [boundary_user.readonly.id]
|
||||||
grant_strings = ["id=*;type=*;actions=read"]
|
grant_strings = ["ids=*;type=*;actions=read"]
|
||||||
scope_id = boundary_scope.org.id
|
scope_id = boundary_scope.org.id
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,6 @@ resource "boundary_scope" "org" {
|
|||||||
resource "boundary_role" "org_admin" {
|
resource "boundary_role" "org_admin" {
|
||||||
scope_id = boundary_scope.global.id
|
scope_id = boundary_scope.global.id
|
||||||
grant_scope_id = boundary_scope.org.id
|
grant_scope_id = boundary_scope.org.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ resource "boundary_scope" "project" {
|
|||||||
resource "boundary_role" "org_admin" {
|
resource "boundary_role" "org_admin" {
|
||||||
scope_id = "global"
|
scope_id = "global"
|
||||||
grant_scope_id = boundary_scope.org.id
|
grant_scope_id = boundary_scope.org.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ resource "boundary_user" "alice" {
|
|||||||
resource "boundary_role" "ldap_principal" {
|
resource "boundary_role" "ldap_principal" {
|
||||||
scope_id = boundary_scope.global.id
|
scope_id = boundary_scope.global.id
|
||||||
grant_scope_id = boundary_scope.global.id
|
grant_scope_id = boundary_scope.global.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = [boundary_user.alice.id]
|
principal_ids = [boundary_user.alice.id]
|
||||||
}`
|
}`
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -146,9 +146,9 @@ resource "boundary_role" "with_groups" {
|
|||||||
depends_on = [boundary_role.proj1_admin]
|
depends_on = [boundary_role.proj1_admin]
|
||||||
}`
|
}`
|
||||||
|
|
||||||
readonlyGrant = "id=*;type=*;actions=read"
|
readonlyGrant = "ids=*;type=*;actions=read"
|
||||||
readonlyGrantUpdate = "id=*;type=*;actions=read,create"
|
readonlyGrantUpdate = "ids=*;type=*;actions=read,create"
|
||||||
invalidGrant = "id=*;type=*;actions=badaction"
|
invalidGrant = "ids=*;type=*;actions=badaction"
|
||||||
|
|
||||||
projRoleWithGrants = fmt.Sprintf(`
|
projRoleWithGrants = fmt.Sprintf(`
|
||||||
resource "boundary_role" "with_grants" {
|
resource "boundary_role" "with_grants" {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ resource "boundary_scope" "org1" {
|
|||||||
resource "boundary_role" "org1_admin" {
|
resource "boundary_role" "org1_admin" {
|
||||||
scope_id = boundary_scope.global.id
|
scope_id = boundary_scope.global.id
|
||||||
grant_scope_id = boundary_scope.org1.id
|
grant_scope_id = boundary_scope.org1.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
@@ -50,7 +50,7 @@ resource "boundary_scope" "proj1" {
|
|||||||
resource "boundary_role" "proj1_admin" {
|
resource "boundary_role" "proj1_admin" {
|
||||||
scope_id = boundary_scope.org1.id
|
scope_id = boundary_scope.org1.id
|
||||||
grant_scope_id = boundary_scope.proj1.id
|
grant_scope_id = boundary_scope.proj1.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
@@ -66,7 +66,7 @@ resource "boundary_scope" "proj1" {
|
|||||||
resource "boundary_role" "proj1_admin" {
|
resource "boundary_role" "proj1_admin" {
|
||||||
scope_id = boundary_scope.org1.id
|
scope_id = boundary_scope.org1.id
|
||||||
grant_scope_id = boundary_scope.proj1.id
|
grant_scope_id = boundary_scope.proj1.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
@@ -81,7 +81,7 @@ resource "boundary_scope" "proj2" {
|
|||||||
resource "boundary_role" "proj2_admin" {
|
resource "boundary_role" "proj2_admin" {
|
||||||
scope_id = boundary_scope.org1.id
|
scope_id = boundary_scope.org1.id
|
||||||
grant_scope_id = boundary_scope.proj2.id
|
grant_scope_id = boundary_scope.proj2.id
|
||||||
grant_strings = ["id=*;type=*;actions=*"]
|
grant_strings = ["ids=*;type=*;actions=*"]
|
||||||
principal_ids = ["u_auth"]
|
principal_ids = ["u_auth"]
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|||||||
Reference in new issue
Block a user