p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
https://phasetwo.io
Other
417 stars 72 forks source link

Allow specifying a custom Post Login Flow for an organization-linked IdP #157

Closed xgp closed 9 months ago

xgp commented 10 months ago

By default, we set the postBrokerLoginFlowAlias to post org broker login when an IdP is linked to an Organization. If you have already set a custom value for that flow it will be overriden.

We need a way to allow this to be specified, and for a custom default to be set.

Ideas:

If we do the second one for the default, we should also consider allowing a custom default for syncMode, which we currently override to FORCE

pnzrr commented 9 months ago

longer term

xgp commented 9 months ago

New method. Link an existing IdP to an organization

POST /:realm/orgs/:orgId/idps/link

Path Parameters

Body

Example

{
  "alias": "azure-saml-1234",
  "post_broker_flow": "super duper post org broker login",
  "sync_mode": "IMPORT"
}

Responses

xgp commented 9 months ago

New method implemented here https://github.com/p2-inc/keycloak-orgs/pull/159

pnzrr commented 9 months ago

Code pushed up here: https://github.com/p2-inc/keycloak/commits/23.0.1_orgs_admin_ui/

Getting a 500 error whenever I hit the Link endpoint though. Somethings going on there.

xgp commented 9 months ago

It was how we were updating the IdP. Fixed now.