Skip to content

Conversation

@alexashley
Copy link
Contributor

This came out of #67, as role values in Azure can't contain spaces. This PR strips spaces from the role values when configuring Keycloak, so that Rode doesn't have to transform role values or maintain a map for different providers.

realm_id = keycloak_realm.rode_demo.id
client_id = keycloak_openid_client.rode.id
name = each.key
name = replace(each.key, " ", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably just modify the local.roles variable instead of doing this, since it would reflect the actual strings that rode is expecting

Copy link
Contributor Author

@alexashley alexashley Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the local variable as-is since it's also used to create users and groups. We could keep have the user accounts all named after the role (PolicyAdministrator), but right now they're lower-case and hyphenated: policy-administrator.

I could go either way, but that's why I just changed the name in the role.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, it's probably fine then

@alexashley alexashley merged commit 8009eae into main Jul 15, 2021
@alexashley alexashley deleted the role-casing branch July 15, 2021 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants