-
Notifications
You must be signed in to change notification settings - Fork 123
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
Making http_ssl_module
optional
#110
Comments
Yes, sounds good -- can you submit a PR with that change? |
I ran into an issue during my testing I wanted to bring up before delivering a change that could lead to headaches for other users using this behind an SSL-terminating load balancer. In my test config, I have this: location /secured/token/redirect {
auth_jwt_location HEADER=Authorization;
auth_jwt_redirect on;
auth_jwt_loginurl /login;
} Next, in my test, I set both the
The issues are in the response
There are two issues here:
Next, I tried a more manual approach here by setting my config to use: Looking at the code for this module, it doesn't appear to me that it's in control of the the scheme, host, and port part of the This led me to discover a workaround: use My suggested patch as-is allows the module to be compiled without SSL and work great behind a load balancer as long as absolute redirects aren't used since the redirect values will be wrong. Having to switch-off absolute redirects as a workaround feels like a decently large caveat and that there's room for improvement here. For my particular use case, I've already worked-around all of this with a Do you think it's worth including this patch even though it comes with some downsides and caveats? |
Currently, nginx has to be compiled
--with-http_ssl_module
in order for this module to be compiled. There's just one line in the module that depends on this module being available:ngx-http-auth-jwt-module/src/ngx_http_auth_jwt_module.c
Line 498 in 05a3798
I took a whack at this locally, and this works:
Would this be an acceptable change to make to the module? I'm happy to open a PR if so.
My C skills are nearly nil and I've never developed an nginx module, so I wanted to check first.
The text was updated successfully, but these errors were encountered: