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: Allow a Cloud Foundry endpoint to be connected with SSO login #2928

Merged
merged 4 commits into from
Sep 10, 2018

Conversation

nwmac
Copy link
Contributor

@nwmac nwmac commented Aug 30, 2018

No description provided.

@nwmac nwmac self-assigned this Aug 30, 2018
@cfdreddbot
Copy link

Hey nwmac!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@codecov
Copy link

codecov bot commented Aug 30, 2018

Codecov Report

Merging #2928 into v2-master will decrease coverage by 0.02%.
The diff coverage is 60.71%.

@@              Coverage Diff              @@
##           v2-master    #2928      +/-   ##
=============================================
- Coverage      71.34%   71.32%   -0.03%     
=============================================
  Files            604      604              
  Lines          25868    25919      +51     
  Branches        5861     5870       +9     
=============================================
+ Hits           18455    18486      +31     
- Misses          7413     7433      +20

@andrewghobrial
Copy link
Contributor

I just tried this locally. They should be asked to enter in the UI the cliendid and secret for the endpoint they are trying to add. And they should be given the redirect uri that needs to be set on that clientid e.g. https://localhost:4200/pp/v1/auth/sso_login_callback

@andrewghobrial
Copy link
Contributor

Or I guess once you have client id and secret you could automatically add the necessary redirect_uri

@nwmac
Copy link
Contributor Author

nwmac commented Aug 31, 2018

@andrewghobrial When an endpoint is registered, the user/admin will specify the client id and secret - this PR: #2920 adds this into the UI.

I am just making a change, so that they will also have a check box to allow the UI to use SSO for the endpoint - when they check this, we will show a note to let them know that they must configure the client's redirect uri.

We'll only allow users to connect using SSO to endpoints that have been flagged as safe for SSO - i.e. where the admin/user who registered them checked the box to indicate that the redirect uri had been configured.

Does that make sense?

@nwmac nwmac removed the blocked-pr label Sep 10, 2018
Copy link
Contributor

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

Two v minor things that aren't blockers. Will merge once gates pass

@@ -242,6 +254,65 @@ func (p *portalProxy) doLoginToUAA(c echo.Context) (*interfaces.LoginRes, error)
return resp, nil
}

// Start SSO flow for an Endpoint
func (p *portalProxy) ssoLoginToCNSI(c echo.Context) error {
log.Debug("loginToCNSI")
Copy link
Contributor

Choose a reason for hiding this comment

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

log.Debug("ssoLoginToCNSI")

@@ -52,6 +52,12 @@ export class ConnectEndpointDialogComponent implements OnDestroy {
},
types: new Array<EndpointType>('cf', 'metrics')
},
{
name: 'Single sign-on',
Copy link
Contributor

Choose a reason for hiding this comment

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

It's Single Sign-On in the text below, while Single sign-on here

@richard-cox richard-cox merged commit 70a8458 into v2-master Sep 10, 2018
@richard-cox richard-cox deleted the sso-endpoints branch September 10, 2018 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants