Skip to content

Task: custom IDP: Allow Connection to ManagedControlPlane via custom IDP #172

@GenosseOtt

Description

@GenosseOtt

(Edited to represent technical discussion from below)

Context

It is possible for an MCP admin to configure unlimited custom Identity Provider (in mcp.spec.authentication.identityProviders) and additionally enable/disable the default system idp (mcp.spec.authentication. enableSystemIdentityProvider).
This is reflected by mcp operators into the kubeconfig, that contains one user-entry per idp configured.
The user can decide which IDP to use when connecting. This is what we want to offer in the UI as well.

Description

Right now, when clicking the connect button, the user is authenticated via the default system idp.
This changes to let the user choose which IDP to use (use simple dropdown for now, more specified in other task).
The list of possible IDPs should be read and constructed in the frontend from the mcp.spec.authentication - as described above - mid term this information will be written in the mcp.status as described in [1]).
When the user chooses one IDP and want to connect, the /auth/mcp/me endpoint is triggered (with mcp and idp choice) to determine if an active session for this mcp and idp exist. If yes, we show the mcp detail page.
If not, we start a login oidc flow against /auth/mcp/login (with mcp and idp choice):

  • we only allow ONE active session per user per mcp. So if user chooses idp1 and next time idp2, we overwrite the idp1 session information
  • the BFF does not trust the user provided values. Instead it will query the mcp spec itself (with the user onboarding token) and reads the spec and extracts the required OIDC information.
    Now the BFF initiates the OIDC redirects as before.

All session related information can be stored in the BFF encrypted session storage we already have.

Step by Step

  • Change frontend button to dropdown and construct all posissble IDPs from spec
  • change /auth/mcp/me endpoint to also handle the idp information in its decision (define struct that is saved in the session - will include an identifier for the idp to handle it here)
  • modify /auth/mcp/login that it handles the idp identifier from the user, queries the mcp from onboarding api and extracts the right oidc information to start the OIDC flow as previously
  • Assume normal PKCE flow with client ID

Related

Acceptance Criteria

  • Have one custom IDP setup for Dev team to use and verify
  • Member from Non-Default IdP can authenticate to their MCP

Metadata

Metadata

Labels

area/mcp-uiAll ManagedControlPlane UI related issues

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions