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 http_proxy and https_proxy to params. #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kaitoy
Copy link

@kaitoy kaitoy commented Nov 14, 2019

This enhance enables to pass http_proxy and https_proxy options to lua-resty-openidc and use a proxy for communication with OIDC provider.

@coveralls
Copy link

coveralls commented Nov 14, 2019

Pull Request Test Coverage Report for Build 145

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 95.652%

Files with Coverage Reduction New Missed Lines %
./kong/plugins/oidc/utils.lua 1 98.55%
Totals Coverage Status
Change from base Build 134: -0.6%
Covered Lines: 132
Relevant Lines: 138

💛 - Coveralls

@fischerdr
Copy link

Are the above diffs all that is needed to get oidc plugin to go through a application proxy?

@kaitoy
Copy link
Author

kaitoy commented Jan 3, 2020

Yes, we're using these changes in our production environment.

@fischerdr
Copy link

So an issue that I have is if the proxy requires auth. when I add username and password into the proxy line it messes up the call.
for some reason it thinks the username is the short name of the host and fails
url : http://:@proxy.example.com:8080
I was looking thru the source of the lua-resty-openidc
and could not see where to add proxy auth variables

@kaitoy
Copy link
Author

kaitoy commented Jan 5, 2020

I think you can use http_proxy_authorization and https_proxy_authorization. (ref. https://github.com/ledgetech/lua-resty-http#set_proxy_options)
I will try it.

@fischerdr
Copy link

Thanks! That worked. now i need to figure how to if/then the variables so it doesn't alway include them

@kaitoy
Copy link
Author

kaitoy commented Jan 11, 2020

I'm creating a commit to add http_proxy_authorization and https_proxy_authorization options.

@kaitoy
Copy link
Author

kaitoy commented Jan 11, 2020

I added the options for proxy auth and confirmed they work as expected.

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.

3 participants