Not sure it’s my configuration mistake or bug but I can’t get managed groups to get proper permissions.
Here’s my oidc auth and managed group config
resource "boundary_auth_method_oidc" "auth0" {
name = "Auth0"
description = "OIDC auth method for Auth0"
scope_id = var.org_scope
issuer = var.issuer
client_id = var.client_id
client_secret = var.client_secret
signing_algorithms = ["RS256"]
api_url_prefix = var.addr
is_primary_for_scope = true
state = "active-public"
max_age = 0
}
resource "boundary_managed_group" "admins" {
name = "Auth0"
description = "OIDC admin managed group for Auth0"
auth_method_id = boundary_auth_method_oidc.auth0.id
filter = "\"admin\" in \"/userinfo/boundary_login/group\""
}
I can see that users that logged through oidc become members of the managed group
Here’s the boundary roles that I create with admin grant on organization and project scopes.
resource "boundary_role" "oidc_org_admin_role" {
principal_ids = [boundary_managed_group.admins.id]
grant_strings = ["id=*;type=*;actions=*"]
scope_id = var.org_scope
}
resource "boundary_role" "oidc_project_admin_role" {
principal_ids = [boundary_managed_group.admins.id]
grant_strings = ["id=*;type=*;actions=*"]
scope_id = boundary_scope.dev.id
}
Both roles are created and have managed group as principal
$ boundary roles read -id r_3F3ZzyeqYe -addr="https://boundary-adress"
Role information:
Created Time: Sun, 04 Sep 2022 08:12:11 IDT
Grant Scope ID: o_aJizYHMHQc
ID: r_3F3ZzyeqYe
Updated Time: Sun, 04 Sep 2022 08:20:53 IDT
Version: 5
Scope:
ID: o_aJizYHMHQc
Name: company_name
Parent Scope ID: global
Type: org
Authorized Actions:
no-op
read
update
delete
add-principals
set-principals
remove-principals
add-grants
set-grants
remove-grants
Principals:
ID: mgoidc_D1T8Aauvd9
Type: managed group
Scope ID: o_aJizYHMHQc
Canonical Grants:
id=*;type=*;actions=*
$ boundary roles read -id r_Zvx9AN5eGN -addr="https://boundary-adress"
Role information:
Created Time: Sun, 04 Sep 2022 08:12:11 IDT
Grant Scope ID: p_SpLDKW7fBK
ID: r_Zvx9AN5eGN
Updated Time: Sun, 04 Sep 2022 08:20:53 IDT
Version: 5
Scope:
ID: p_SpLDKW7fBK
Name: Dev
Parent Scope ID: o_aJizYHMHQc
Type: project
Authorized Actions:
no-op
read
update
delete
add-principals
set-principals
remove-principals
add-grants
set-grants
remove-grants
Principals:
ID: mgoidc_D1T8Aauvd9
Type: managed group
Scope ID: o_aJizYHMHQc
Canonical Grants:
id=*;type=*;actions=*
However when logged in as an OIDC user I cannot see expected admin permissions here’s a screenshot.
When I explicitly add the user principal to same role everything starts to work properly.
boundary roles read -id r_Zvx9AN5eGN -addr="https://boundary-adress"
Role information:
Created Time: Sun, 04 Sep 2022 08:12:11 IDT
Grant Scope ID: p_SpLDKW7fBK
ID: r_Zvx9AN5eGN
Updated Time: Sun, 04 Sep 2022 08:52:49 IDT
Version: 6
Scope:
ID: p_SpLDKW7fBK
Name: Dev
Parent Scope ID: o_aJizYHMHQc
Type: project
Authorized Actions:
no-op
read
update
delete
add-principals
set-principals
remove-principals
add-grants
set-grants
remove-grants
Principals:
ID: mgoidc_D1T8Aauvd9
Type: managed group
Scope ID: o_aJizYHMHQc
ID: u_YqY7ABrOJy
Type: user
Scope ID: o_aJizYHMHQc
Canonical Grants:
id=*;type=*;actions=*
Here’s a screenshot