Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OIDC audience resolve protocol mapper #606

Merged
merged 6 commits into from
Oct 8, 2021

Conversation

thyming
Copy link
Contributor

@thyming thyming commented Oct 4, 2021

Closes #338.

@mrparkers
Copy link
Contributor

LGTM besides the commented out code, I'd like to get that taken care of before we merge.

Luke Rohde added 2 commits October 6, 2021 09:53
…/terraform-provider-keycloak into audience-resolve-protocol-mapper
@thyming
Copy link
Contributor Author

thyming commented Oct 6, 2021

Deleted that commented code out.
Is there a way to generate docs or do I need to write those up by hand?

@mrparkers
Copy link
Contributor

The docs are written by hand. I can write them if you don't want to.

Was there a particular issue that was preventing the update function from working? I'd prefer for this protocol mapper to support update like all of the other ones do.

@thyming
Copy link
Contributor Author

thyming commented Oct 6, 2021 via email

Copy link
Contributor

@mrparkers mrparkers left a comment

Choose a reason for hiding this comment

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

Ah, I see that now, thanks for clarifying. With that new (helpful) information, I have a couple of comments.

keycloak/openid_audience_resolve_protocol_mapper.go Outdated Show resolved Hide resolved
func (mapper *OpenIdAudienceResolveProtocolMapper) convertToGenericProtocolMapper() *protocolMapper {
return &protocolMapper{
Id: mapper.Id,
Name: AudienceResolveMapperName,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be up to the user to specify the name for this mapper, so it should be part of the schema instead of hardcoded to "audience resolve".

I realize that this isn't super importan, because 1) it isn't editable on the Keycloak side (which I just learned today 😄) and 2) there's no reason to attach two different audience resolve protocol mappers to the same client / client scope.

However, since Keycloak allows you to create two instances of this protocol mapper attached to the same client with different names, this provider should allow it too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okey doke, updated to have that behavior.

@thyming
Copy link
Contributor Author

thyming commented Oct 7, 2021

@mrparkers I believe I addressed all your feedback. I also added a docs page - not sure if anything else needs to happen for that to be put in the index on the docs site.

Copy link
Contributor

@mrparkers mrparkers left a comment

Choose a reason for hiding this comment

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

This looks great, thanks for making those changes.

For the docs, they're automatically synced with registry.terraform.io when a release is cut. I'll be cutting a release hopefully today once some other PRs get merged.

@mrparkers mrparkers merged commit 51479ea into keycloak:master Oct 8, 2021
@thyming thyming deleted the audience-resolve-protocol-mapper branch October 8, 2021 22:55
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.

add keycloak openid audience resolve protocol mapper
2 participants