【问题标题】:WSO2 Tenant authentication failedWSO2 租户身份验证失败
【发布时间】:2019-07-13 09:24:46
【问题描述】:

我无法在 WSO2 身份服务器 5.7.0 中的特定租户(域)中创建用户

首先我创建一个新域: 使用肥皂```/services/TenantMgtAdminService``

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.mgt.tenant.carbon.wso2.org" xmlns:xsd="http://beans.common.stratos.carbon.wso2.org/xsd">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:addTenant>
         <!--Optional:-->
         <ser:tenantInfoBean>
            <!--Optional:-->
            <xsd:active>true</xsd:active>
            <!--Optional:-->
            <xsd:admin>admin</xsd:admin>
            <!--Optional:-->
            <xsd:adminPassword>admin</xsd:adminPassword>
            <!--Optional:-->
            <xsd:createdDate>2019-07-01T00:00:00</xsd:createdDate>
            <!--Optional:-->
            <xsd:email>admin@test.com</xsd:email>
            <!--Optional:-->
            <xsd:firstname>admin</xsd:firstname>
            <!--Optional:-->
            <xsd:lastname>user</xsd:lastname>
            <!--Optional:-->
            <xsd:originatedService>?</xsd:originatedService>
            <!--Optional:-->
            <xsd:successKey>true</xsd:successKey>
            <!--Optional:-->
            <xsd:tenantDomain>test.com</xsd:tenantDomain>
            <!--Optional:-->
            <xsd:tenantId>1</xsd:tenantId>
            <!--Optional:-->
            <xsd:usagePlan>demo</xsd:usagePlan>
         </ser:tenantInfoBean>
      </ser:addTenant>
   </soapenv:Body>
</soapenv:Envelope>

现在我激活了以前的域:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.mgt.tenant.carbon.wso2.org">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:activateTenant>
         <!--Optional:-->
         <ser:tenantDomain>test.com</ser:tenantDomain>
      </ser:activateTenant>
   </soapenv:Body>
</soapenv:Envelope>

我希望在新域或租户中创建用户,我使用 curl 使用 scim api:

curl -k --user admin@test.com:admin --data '{"schemas":[],"name":{"familyName":"John","givenName":"Doe"},"userName":"newtestuser","password":"testPwd123"}' --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users

我的 WSO2IS 正在使用电子邮件地址的配置作为用户名

我的新用户日志:

[2019-07-13 11:23:13,380] ERROR {org.wso2.carbon.identity.scim.provider.auth.BasicAuthHandler} -  Authentication failed for the user: admin@test.com@carbon.super

我做错了什么?还是我错过了什么?

【问题讨论】:

    标签: wso2 wso2is


    【解决方案1】:

    如果您使用电子邮件作为用户名,租户的管理员用户名也应该是电子邮件。

    因此,你的卷曲应该如下,

    curl -k --user admin@test.com@test.com:admin --data '{"schemas":[],"name":{"familyName":"John","givenName":" Doe"},"userName":"newtestuser@abc.com","password":"testPwd123"}' --header "Content-Type:application/json" https://localhost:9443/t/test.com/scim2/Users

    这里租户 test.com 的 SCIM 端点应该是:https://localhost:9443/t/test.com/scim2/Users

    用户名应该是:newtestuser@abc.com(电子邮件作为用户名)

    基本认证:admin@test.com@test.com(因为这是租户用户,所以我们也需要添加租户域。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-25
      • 2016-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-24
      相关资源
      最近更新 更多