allow specification of parentId in customer_federation #325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow up of PR #270 and Issue #216
User Federations are internally represented by components. Those components are linked to its realm using the parent_id attribute which is the realms' id and not necessarily its name. Using solely this provider everything is fine because realm-name == realm-internald.
However, when existing realms are imported into the provider's state, the realm's internal_id can be different from the realm's name.
Since PR #270 we have the realms' internal id at hand. This PR extends the behavior of the userfederation resource, so it is possible to use the realm's internal id and not the realm name as
parent_id
. For this an additional attribute parent_id can be added to the respective resources if they need this feature. Unfortunately we need to specify both: realm name for the keycloak api calls and the parent_id to reference the realm's internal id.This PR uses the realm name as parent_id if it is not specified so nothing should break here.
Note: This should also be fixed similarly at least for the ldap user federation provider. if time permits I could have a look into that resource as well.