最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

authentication - How to Map Roles from OpenID Connect SSO Provider in a Multi-Tenant System? - Stack Overflow

programmeradmin5浏览0评论

I have implemented an OpenID Connect (OIDC) Single Sign-On (SSO) system for my platform. Users only need to configure their client ID, client secret, authorization URL, and token URL to enable authentication. Once a user logs in via the SSO provider, they are redirected to our backend, which creates a session and authenticates them.

My platform is a multi-tenant system, and within each tenant, a user can have one of the following roles:

  1. Admin
  2. User
  3. Org-Reader

I need to ensure that the role assigned by the SSO provider is correctly mapped within our platform. The challenges I am facing are:

  1. How do I retrieve and map roles from the OIDC authentication response?
  2. Is there a standard OIDC claim (e.g., roles claim) that should be used for this?

What I've Tried:

Looking into the ID token and access token but haven't found a clear way to structure tenant-specific roles. Checking the OpenID Connect specification, but I need guidance on best practices for multi-tenancy role assignment.

发布评论

评论列表(0)

  1. 暂无评论