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

Added htpasswd option to the OpenShift OAuth type #573

Merged

Conversation

jpkrohling
Copy link
Contributor

@jpkrohling jpkrohling commented Jul 31, 2019

Closes #572 by adding a new field to the oauth proxy struct.

Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de

@jpkrohling
Copy link
Contributor Author

jpkrohling commented Jul 31, 2019

@jwendell, would you be able to confirm that this fixes the issue for you? I'm still running some manual tests on this, and we'd be ready to merge once you confirm it works, Travis approves and @objectiser reviews.

This is the image that can be used for the test: jpkroehling/jaeger-operator:572-htpasswd-oauth-proxy. The correct image will report the Jaeger Operator version as v1.13.1-37-g5735cbb7 (5735cbb being the latest commit in this PR)

@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #573 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #573      +/-   ##
==========================================
+ Coverage   91.56%   91.57%   +0.01%     
==========================================
  Files          73       73              
  Lines        3615     3620       +5     
==========================================
+ Hits         3310     3315       +5     
  Misses        213      213              
  Partials       92       92
Impacted Files Coverage Δ
pkg/apis/jaegertracing/v1/jaeger_types.go 100% <ø> (ø) ⬆️
pkg/inject/oauth-proxy.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60f5ed6...1fe0103. Read the comment docs.

@jpkrohling
Copy link
Contributor Author

@objectiser, I tested this and when htpasswd is enabled, I cannot login to the Jaeger UI with OpenShift users such as kubeadmin, only with users specified in the htpasswd file. @jwendell, is this the expected behavior?

I could also not verify whether bearer tokens were issued at all, perhaps this is something that @rubenvp8510 could check.

@jpkrohling
Copy link
Contributor Author

I don't know how I missed the big blue button on the page, but it's indeed possible to login using kubeadmin (or other OpenShift users):

image

@jpkrohling
Copy link
Contributor Author

The newest image has just been published (version: v1.13.1-40-gb8330536): jpkroehling/jaeger-operator:572-htpasswd-oauth-proxy

@jpkrohling
Copy link
Contributor Author

For the record, this is how it looks like now:

image

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

LGTM -just need final approval from @jwendell to make sure it works for him.

@jwendell
Copy link

I confirm it works fine, thanks!

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
@jpkrohling
Copy link
Contributor Author

Alright, I just squashed the commits and updated the PR. Once Travis finishes, I'll merge it.

@objectiser objectiser merged commit 84f3c6c into jaegertracing:master Jul 31, 2019
@rubenvp8510
Copy link
Collaborator

@objectiser, I tested this and when htpasswd is enabled, I cannot login to the Jaeger UI with OpenShift users such as kubeadmin, only with users specified in the htpasswd file. @jwendell, is this the expected behavior?

I could also not verify whether bearer tokens were issued at all, perhaps this is something that @rubenvp8510 could check.

In my tests I see that oauth-proxy store the bearer token encrypted in the cookie, but you need to pass the following flags:

--pass-access-token=true
--pass-user-bearer-token=true
--pass-basic-auth=false

And a better secret.. (16 bytes )

You can see how I did my tests on rubenvp8510/jaeger@2f1ea29

I'm actually working on change it to a simpler test, but that worked for me to learn how the propagation works with openshift oauth-proxy

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.

Allow passthrough of htpasswd file location to the OAuth Proxy
4 participants