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

Some fixes / improvements for Keycloak integration #310

Merged
merged 6 commits into from
Mar 20, 2017
Merged

Conversation

mayorova
Copy link
Contributor

This PR fixes the issue with getting the configuration by Keycloak when running with APICAST_CONFIGURATION_LOADER=boot.

@@ -128,7 +128,11 @@ end
function boot.init_worker(configuration)
local interval = ttl() or 0

configuration.keycloak = keycloak.load_configuration()
local keycloak_config = _M.run_external_command("keycloak")
Copy link
Contributor

Choose a reason for hiding this comment

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

We should move this to the .init function. init_worker is executed for each worker, but init just once.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, in fact it's already in the .init. I guess should be just removed from here, as Keycloak configuration is not something that will change with automatic reload. Right?

Copy link
Contributor

Choose a reason for hiding this comment

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

And it is already loaded. Init_worker is executed right after. So it should be removed.

@mikz
Copy link
Contributor

mikz commented Mar 17, 2017

And of course, if this was broken there was no test so this should be covered by a new test.

@mayorova mayorova changed the title Some fixes / improvements for Keycloak integration [WIP] Some fixes / improvements for Keycloak integration Mar 17, 2017
@mayorova mayorova changed the title [WIP] Some fixes / improvements for Keycloak integration Some fixes / improvements for Keycloak integration Mar 17, 2017
@mikz mikz merged commit b6aef2a into master Mar 20, 2017
@mikz mikz deleted the fixes-keycloak branch March 20, 2017 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants