I'm facing the following problem with wso2 IS: I'm trying to register a service provider for all the tenants to access.
If using SaaS app I will be able to use the flow defined by the tenant that registered the service provider. However I need to configure the flow for each tenant. (Just the local authentication, inbound is oidc/oauth2 for all of them)
I tried creating a service provider (SP) for each tenant. Problem is that I’ll have a different client_id (oidc/oauth2 code flow).
Shouldn’t client_id be modifiable?
I found out that I can set the client_id if creating the SP from a file. Then I discovered another problem. If I try to use the same client_id twice (on different tenants) I get an error creating the SP. I managed to overcome this issue by manually changing the H2 database. However it does not work. I specify tenanDomain url parameter but it’s ignored, it uses the first sp for that client_id found in the database.
Shouldn’t this selection be tenant dependent?
I’ve read that I can achieve this using SAML, however it’s not ideal for a SPA.
Finally, there are two solutions. But they are far from ideal, as both require manual steps:
Use adaptive authentication, then I need to register all tenant IdP in the SaaS app tenant and in the script.
Create a tenant/client_id relation in the app, then update it whenever there is a new service provider registration for that app on any tenant.
I think this is a valid use case. Am I right?
Is there any way to achieve this behavior without the proposed functional modifications?
Update: Full use case explanation
The use case is the following. I have a microservices application, I want to use wso2is to provide identity to the users of that application. In the application I have a customer (which has many users). A customer is assigned to a tenant. I want the customer admin (tenant admin) to be able to manage some aspects of its tenant identity, like password policies, users... However, I don't want the tenant to register applications (service providers), so I need to register the application so that any customer (tenant) can access it. I need the authentication flow for that application to be defined tenant-wise. I don't want to impose authentication policies on any tenant, they should be able to impose their own policies. To do that they'll have two ways:
- They can choose to use wso2is to define the flow they want (basic, risk based, fido...).
- To use a third party (federated IdP), therefore setting login policies there.
I'll also need the super-tenant (me, or a specific user created to assist a concrete tenant) to be able to access all other tenants, for example to provide assistance, fix mistakes, and disable functionality I don't want them to see like (e-mail templates).