wso2 - 在 API manager 中创建的租户无法登录 ID 服务器的 carbon 控制台
问题描述
我使用 APIM 3.1.0 和 IS-KM 5.10.0 作为 APIM 的密钥管理器。我通过 APIM carbon 控制台创建了租户。为了为新创建的租户创建 XACML 策略,我尝试使用新创建的租户的凭据登录到 IS 的碳控制台。但我收到登录失败错误。同时,我可以使用新创建的租户的凭据登录 APIM 的 carbon 控制台。为什么通过 APIM carbon 控制台新创建的租户无法登录 IS 的 carbon 控制台,我缺少任何配置?
同时如果我通过IS的carbon控制台创建新租户,租户可以登录IS的carbon控制台,但不能登录APIM的carbon控制台。这样的限制是设计意图吗?但最终我需要创建租户并要求租户创建 API、订阅并且应该能够创建 XACML 策略
当通过 APIM 创建的租户尝试登录 IS carbon 控制台时,IS 日志中出现以下错误
[2020-06-23 16:53:46,796] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantIdCache} - TENANT_ID_CACHE which is under TENANT_ID_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantIdEntry@4da389f0 for the key : org.wso2.carbon.user.core.tenant.TenantDomainKey@d03947ad successfully
[2020-06-23 16:53:46,888] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,889] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,889] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,889] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,890] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantIdCache} - TENANT_ID_CACHE which is under TENANT_ID_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantIdEntry@4da389f0 for the key : org.wso2.carbon.user.core.tenant.TenantDomainKey@d03947ad successfully
[2020-06-23 16:53:46,890] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantCache} - TENANT_CACHE which is under TENANT_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantCacheEntry@3080dc47 for the key : org.wso2.carbon.user.core.tenant.TenantIdKey@9 successfully
[2020-06-23 16:53:46,890] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,890] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,890] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantDomainCache} - TENANT_DOMAIN_CACHE which is under TENANT_DOMAIN_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantDomainEntry@38942044 for the key : org.wso2.carbon.user.core.tenant.TenantIdKey@9 successfully
[2020-06-23 16:53:46,891] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantManager} - Tenant domain from cache: {api.com}
[2020-06-23 16:53:46,891] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.UserIdResolverCache} - Cache: user_id_from_user_name_cache which is under USER_ID_RESOLVER_CACHE_MANAGER, found the entry: 6160fac5-11d5-4061-a677-f8eb416ecf52 for the key: vinayak successfully.
[2020-06-23 16:53:46,891] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantDomainCache} - TENANT_DOMAIN_CACHE which is under TENANT_DOMAIN_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantDomainEntry@38942044 for the key : org.wso2.carbon.user.core.tenant.TenantIdKey@9 successfully
[2020-06-23 16:53:46,891] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantManager} - Tenant domain from cache: {api.com}
[2020-06-23 16:53:46,891] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantDomainCache} - TENANT_DOMAIN_CACHE which is under TENANT_DOMAIN_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantDomainEntry@38942044 for the key : org.wso2.carbon.user.core.tenant.TenantIdKey@9 successfully
[2020-06-23 16:53:46,891] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantManager} - Tenant domain from cache: {api.com}
[2020-06-23 16:53:46,892] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantIdCache} - TENANT_ID_CACHE which is under TENANT_ID_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantIdEntry@4da389f0 for the key : org.wso2.carbon.user.core.tenant.TenantDomainKey@d03947ad successfully
[2020-06-23 16:53:46,892] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantIdCache} - TENANT_ID_CACHE which is under TENANT_ID_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantIdEntry@4da389f0 for the key : org.wso2.carbon.user.core.tenant.TenantDomainKey@d03947ad successfully
[2020-06-23 16:53:46,892] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantDomainCache} - TENANT_DOMAIN_CACHE which is under TENANT_DOMAIN_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantDomainEntry@38942044 for the key : org.wso2.carbon.user.core.tenant.TenantIdKey@9 successfully
[2020-06-23 16:53:46,892] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantManager} - Tenant domain from cache: {api.com}
[2020-06-23 16:53:46,893] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.tenant.TenantIdCache} - TENANT_ID_CACHE which is under TENANT_ID_CACHE_MANAGER, found the entry : org.wso2.carbon.user.core.tenant.TenantIdEntry@4da389f0 for the key : org.wso2.carbon.user.core.tenant.TenantDomainKey@d03947ad successfully
[2020-06-23 16:53:46,893] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,893] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,893] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,893] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,894] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] DEBUG {org.wso2.carbon.user.core.common.RealmCache} - created authorization cache : org.wso2.carbon.caching.impl.CacheImpl@922bea56
[2020-06-23 16:53:46,897] [ee58cfbc-ccc7-497d-b51e-0f3eb941fa8a] ERROR {org.wso2.carbon.core.services.authentication.AuthenticationAdmin} - System error while Authenticating/Authorizing User : Error when handling event : PRE_AUTHENTICATION
我在 APIM 中配置了以下数据源。为什么有两个注册数据库?(一个是 wso2_shareddb,另一个是 wso2_carbondb)
解决方案
如果这是多租户设置,您需要在 API Manager 和 Key Manager 组件之间共享注册表数据库 (shared_db)。请检查它们是否共享。
推荐阅读
- c++ - 使用 Prim 算法计算最小生成树:如何让它变得简单?
- java - java - 如何创建一个循环以在java中的ArrayList中找到每个不同的数字?
- node.js - 找不到模块“猫鼬”
- javascript - 来自属性值的样式元素
- docker - Docker Compose Sql server 启动时自动创建数据库和表
- sql - SQL 连接和组问题
- python - 定义 Django 模型约束
- x86-64 - (.text+0x4e): 未定义的对 `printf' nasm 的引用
- python - 使用 Python 将漂亮的汤刮到 MySQL。坚持 if string contains do else do something else
- python - 使用 smtplib 和 python 发送电子邮件时设置发件人姓名