-
Notifications
You must be signed in to change notification settings - Fork 189
sso_proxy: update to use go-micro for configuration management
#279
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
Conversation
go-micro for configuration management.go-micro for configuration management
2e1df69 to
03bcb1f
Compare
Codecov Report
@@ Coverage Diff @@
## master #279 +/- ##
==========================================
+ Coverage 61.84% 62.73% +0.89%
==========================================
Files 57 58 +1
Lines 4188 4286 +98
==========================================
+ Hits 2590 2689 +99
+ Misses 1388 1382 -6
- Partials 210 215 +5
Continue to review full report at Codecov.
|
46341b9 to
63a5a1a
Compare
fc55d98 to
81b0d2d
Compare
fbc8357 to
337884d
Compare
|
Any thoughts on the naming and/or structure of configuration variables themselves would be appreciated. I've tried to migrate all config variables while maintaining a tidy, logical structure..but that's not always straight forward. |
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.
I'm going to approve although this was difficult for me to review.
I would personally have preferred mulitple PRs for the sake of the various refactoring work (e.g. one PR to move loads of code from one file to another, then a separate PR for the cookie renaming etc). That way focusing in on the actual meat of the changes would be easier.
That said I appreciated the effort put into the README.
3807a21 to
57bde86
Compare
af24c7b to
d5a7f80
Compare
Problem
sso_authwas migrated to usego-microin #212 to manage variable configuration.sso_proxyis still using the original outdated methods and should be updated to also usego-microSolution
Update
sso_proxyto usego-micro. No feature changes are intended to be part of this change, apart from the behaviour of the following two variables:SKIP_AUTH_PREFLIGHTandPASS_ACCESS_TOKENare now upstream specific and should be specified as part of upstream configs, not global/environment variables.In general, the patterns used in this pull request are the same ones used in #212
Review notes
Some notes to support reviewing:
The bulk of changes here consist of creating the new configuration structure, and altering functions and methods to reference that new structure.
Numerous functions have been moved out of
oauthproxy.goand intooptions.go:SetCookieStoreSetRequestSignerSetUpstreamConfigSetProxyHandlerSetValidatorsSetProviderA new function,
SetUpstreamConfigs, largely consists of some logic that was in theoptions.Validatemethod.The below table shows all old variables, and their new equivalent version.
LOGGING_LEVEL