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

sso_*: move sign_in and sign_out HTML pages to sso_proxy #261

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Jusshersmith
Copy link
Contributor

@Jusshersmith Jusshersmith commented Oct 23, 2019

Problem

The current setup of html sign in and sign out pages causes some extra friction with implementing #252 - this change gives us some extra flexibility here. Also, having sso_proxy first send requests to sso_auth, which subsequently renders the sign in page (and redirects back) results in extra requests and extra complexity (for example, an extra layer of nested redirects needs to be specified).

Solution

Move the sign_in and sign_out HTML pages to be rendered by sso_proxy instead of sso_auth. In doing so, simplify the flow in part between sso_proxy and sso_authenticator.

Notes

This is a big change, so I'm working to add some more detailed descriptions of the changes (and going over any TODO's) to aid in better understanding them, as well as reviewing the PR in general.

template pkg
add static_files_test.go file
fix TestSecurityHeaders test
fix TestOAuthStart: replace template interface
fix TestHTTPSRedirect
partial but incomplete fix for test_provider GetSignInURL/GetSignOutURL
add initial TestSignOutPage function
fix sign out with no session workflow
some tidyings
sso_auth:additional redirect URI changes
sso_auth: authenticagtor test changes
sso_proxy: oauthproxy tests
@codecov
Copy link

codecov bot commented Jan 6, 2020

Codecov Report

Merging #261 into master will decrease coverage by 0.01%.
The diff coverage is 65.9%.

@@            Coverage Diff            @@
##           master    #261      +/-   ##
=========================================
- Coverage   62.51%   62.5%   -0.02%     
=========================================
  Files          54      55       +1     
  Lines        4199    4211      +12     
=========================================
+ Hits         2625    2632       +7     
- Misses       1385    1386       +1     
- Partials      189     193       +4
Impacted Files Coverage Δ
internal/proxy/providers/providers.go 0% <ø> (ø) ⬆️
internal/proxy/providers/sso.go 69.14% <0%> (+0.53%) ⬆️
internal/proxy/providers/test_provider.go 0% <0%> (ø) ⬆️
...nternal/proxy/providers/singleflight_middleware.go 0% <0%> (ø) ⬆️
internal/pkg/templates/templates.go 100% <100%> (ø) ⬆️
internal/proxy/static_files.go 73.33% <73.33%> (ø)
internal/auth/authenticator.go 83.85% <84.21%> (-2.33%) ⬇️
internal/proxy/oauthproxy.go 59.15% <86.27%> (+4.71%) ⬆️

@Jusshersmith Jusshersmith marked this pull request as ready for review January 6, 2020 17:01
@Jusshersmith
Copy link
Contributor Author

Marked as ready for review, but see Notes in description.

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.

1 participant