-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adding redirectParam to add custom callback url #39
Conversation
...sions-core/druid-pac4j/src/main/java/org/apache/druid/security/pac4j/Pac4jAuthenticator.java
Outdated
Show resolved
Hide resolved
@lokesh-lingarajan can you explain how someone would use this parameters? My understanding based on the examples you gave is that the redirectParam is something that specifies how to extract the redirect URL from the request, and pac4j already has |
I dont see this as a way to extract url from request rather specify the whole url in cases of setups like we have in our prod, where SSL is terminating at ELB and internal communication is HTTP. So we would use this as follows in our prod "druid.auth.pac4j.redirectParam=https://localhost:8888/druid-ext/druid-pac4j/callback" Where although our webserver is running on http, we are overriding the url to https, it also gives users more flexibility is redirecting the url to any custom service to do additional data gathering before hitting the service. |
45224e8
to
f283001
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but can we add a test to Pac4jCommonConfigTest to cover this?
I guess we can close this PR since we no longer need this change? |
Not required anymore, we need to use "druid.server.http.enableForwardedRequestCustomizer" to support druid behind a proxy. |
Issue:
apache#11437
Context:
https://www.pac4j.org/blog/understanding-the-callback-endpoint.html
While using Zeppelin + Knox, knox provides a parameter to add custom callback url
https://medium.com/data-collective/apache-zeppelin-oauth-integration-using-apache-knox-dea2362e3dda
"knoxJwtRealm.redirectParam = originalUrl"
I have used the same name for this new config and overrided the compute method in NoParameterCallbackUrlResolver class.
Works fine in local setup, next step is to test in lab.