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

Update KeycloakPolicyEnforcerAuthorizer to init in a PostConstruct method #15955

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

sberyozkin
Copy link
Member

@sberyozkin sberyozkin commented Mar 23, 2021

No description provided.

@quarkus-bot
Copy link

quarkus-bot bot commented Mar 23, 2021

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should not end up with ellipsis (make sure the title is complete)

This message is automatically generated by a bot.

@sberyozkin sberyozkin changed the title Update KeycloakPolicyEnforcerAuthorizer to init in a PostConstruct me… Update KeycloakPolicyEnforcerAuthorizer to init in a PostConstruct method Mar 23, 2021
@sberyozkin sberyozkin requested a review from pedroigor March 23, 2021 13:36
@sberyozkin
Copy link
Member Author

sberyozkin commented Mar 23, 2021

All the NPE guards are not needed really as this http policy implementation is not registered now if the oidc and policy enforcer configs are disabled - the problem has been is that the authorizer has been registered even if the oidc is disabled but initialized only if it is enabled.

And a minor update to use a synthetic bean

@sberyozkin sberyozkin requested a review from gastaldi March 23, 2021 14:59
@sberyozkin sberyozkin marked this pull request as ready for review March 23, 2021 15:01
@sberyozkin sberyozkin force-pushed the keycloak_authz_synthetic_bean branch from aa33322 to 5ad3f65 Compare March 23, 2021 15:01
@sberyozkin sberyozkin added this to the 1.14 - main milestone Mar 23, 2021
@sberyozkin
Copy link
Member Author

@pedroigor @gastaldi Making this PR now ready for review - it does not have to make it to 1.13.0.Final so please take your time to review

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

LGTM

@sberyozkin
Copy link
Member Author

@gastaldi Thanks, yeah, I recall your earlier comment where I had to check NPE at the policy check time and it just did not look right :-), so indeed, going the bean way should be safer and no NPE checks are needed

@sberyozkin
Copy link
Member Author

Hey @pedroigor I'm happy to go with George's @gastaldi approval since it is a pure structural update which I'm doing in this PR based on the earlier feedback, any concern - let us know please - I'll start with merging this PR as it will cause a conflict for another pending one which I will resolve next

@sberyozkin sberyozkin merged commit 1b5614a into quarkusio:main Mar 24, 2021
@sberyozkin sberyozkin deleted the keycloak_authz_synthetic_bean branch March 24, 2021 15:13
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.

2 participants