-
Notifications
You must be signed in to change notification settings - Fork 66
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
Support a browser-based login flow for LDAP and Active Directory providers #1163
Conversation
To keep this backwards compatible, this PR changes how the cli deals with ambiguous flows. Previously, if there was more than one flow advertised, the cli would require users to set the flag --upstream-identity-provider-flow. Now it chooses the first one in the list. Signed-off-by: Margo Crawford <margaretc@vmware.com>
Also change state param to include IDP type
Also fix some test failures on the callback handler, register the new login handler in manager.go and add a (half baked) integration test Signed-off-by: Margo Crawford <margaretc@vmware.com>
The other handlers for GET and POST requests are not yet implemented in this commit. The shared handler code in login_handler.go takes care of things checking the method, checking the CSRF cookie, decoding the state param, and adding security headers on behalf of both the GET and POST handlers. Some code has been extracted from callback_handler.go to be shared.
also add more unit tests Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Also add autocomplete attribute and title element Signed-off-by: Margo Crawford <margaretc@vmware.com>
Also extract some helpers from auth_handler.go so they can be shared with the new handler.
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Also use more specific test assertions where security headers are expected. And run the unit tests for the login package in parallel.
Signed-off-by: Margo Crawford <margaretc@vmware.com>
Also: - Add CSS to login page - Refactor login page HTML and CSS into a new package - New custom CSP headers for the login page, because the requirements are different from the form_post page
Also do some refactoring to share more common test setup code in supervisor_login_test.go.
Also fix some comments that didn't fit onto one line in the yaml examples, be consistent about putting a blank line above `---` yaml separators, and some other small doc improvements.
Codecov Report
@@ Coverage Diff @@
## main #1163 +/- ##
==========================================
- Coverage 79.73% 79.30% -0.43%
==========================================
Files 136 141 +5
Lines 10055 10240 +185
==========================================
+ Hits 8017 8121 +104
- Misses 1767 1847 +80
- Partials 271 272 +1
Continue to review full report at Codecov.
|
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 am still looking through some of the tests.
site/content/docs/howto/configure-supervisor-with-workspace_one_access.md
Outdated
Show resolved
Hide resolved
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.
The change to internal/oidc/provider/manager/manager.go
looks incorrect?
Implements the LDAP/AD web UI proposal from #1116.
Note that this PR changes how the
pinniped get kubeconfig
cli deals with ambiguous flows. Previously, if there was more than one flow advertised for an IDP, the cli would require users to use the flag--upstream-identity-provider-flow
. Now it chooses a default flow based on the IDP type (by choosing the first flow type in the Supervisor's discovery response).Here's a screenshot of the new LDAP/AD login page, which is hosted by Supervisor:
When using the Pinniped CLI, a successful login takes the user to the regular form_post success page, just like the previously supported browser authcode flow for an OIDCIdentityProvider:
Release note: