admin管理员组文章数量:1421921
I need some recommendations for a multi-tenant project I'm working on, and I'm facing an issue with our Keycloak setup.
Our backend is a .NET API and our frontend is built with Angular. Currently, we have a dedicated realm called "prod," and we differentiate clients (companies) using a CompanyId attribute in Keycloak, which is sent as a claim with every request. This approach has worked well so far.
However, the problem arises when I need to enable SSO (using OpenID, Microsoft, or another provider) for specific companies and have it available only to them. Is there a way to avoid creating a new realm—perhaps by using multiple subdomains?
There’s also the possibility that two different clients might require distinct configurations with the Microsoft SSO provider (for example, allowing login only through their own Azure anization). If I use multiple realms, I would be forced to deploy multiple instances of both the API and the Angular application since our API project currently has a hardcoded Authority server URL with the "prod" realm, and the same applies to the Angular app.
What is the best solution for these scenarios? I would like to maintain a single database and, if possible, only one instance for the backend and one for the frontend.
I have also noticed that starting with version 26, Keycloak supports Organizations, which might be relevant here.
本文标签: Keycloak SSO with multitenant NET api amp AngularStack Overflow
版权声明:本文标题:Keycloak SSO with multi-tenant .NET api & Angular - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744679073a2619288.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论