Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/378.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Single sign on 带Liberty的Bluemix SSO:使用AuthFailed时卡住(CWWKS9104A)_Single Sign On_Ibm Cloud_Websphere Liberty - Fatal编程技术网

Single sign on 带Liberty的Bluemix SSO:使用AuthFailed时卡住(CWWKS9104A)

Single sign on 带Liberty的Bluemix SSO:使用AuthFailed时卡住(CWWKS9104A),single-sign-on,ibm-cloud,websphere-liberty,Single Sign On,Ibm Cloud,Websphere Liberty,我正在试验Bluemix,并试图将单点登录添加到我的WebSphere Liberty WebApp。所以我跟着导游走。添加了带有云目录标识提供程序的SSO服务,将my WebApp绑定到该服务,并修改了XML配置 我从演示应用程序开始,并从那里定制了它 src/main/webapp/WEB-INF/WEB.xml “未授予用户对任何所需角色的访问权限”如何授予用户对所需角色“任何已验证”的访问权限?云目录似乎没有用户/角色映射功能。我的错在哪里 谢谢大家的支持, Tobiasliberty

我正在试验Bluemix,并试图将单点登录添加到我的WebSphere Liberty WebApp。所以我跟着导游走。添加了带有云目录标识提供程序的SSO服务,将my WebApp绑定到该服务,并修改了XML配置

我从演示应用程序开始,并从那里定制了它

src/main/webapp/WEB-INF/WEB.xml

“未授予用户对任何所需角色的访问权限”如何授予用户对所需角色“任何已验证”的访问权限?云目录似乎没有用户/角色映射功能。我的错在哪里

谢谢大家的支持,
Tobias

liberty webapps的初学者软件包在wlp/子文件夹中提供了一个server.xml。这一部分显然没有被Bluemix运行时环境接受,因此这一部分基本上没有被解释

 <application-bnd>
    <security-role name="any-authenticated">
        <special-subject type="ALL_AUTHENTICATED_USERS" />
    </security-role>
</application-bnd>

如果您创建以下文件,则它将起作用:

src/main/webapp/META-INF/ibm-application-bnd.xml


这将被bluemix运行时接收,瞧,403/身份验证失败消失了。可能已经用server.xml修复了它,但在它工作后就停止了研究。如果有人有建议/更清洁的解决方案,请分享


谢谢:-)

做了进一步的研究:我尝试用Facebook登录替换云目录身份提供商。同样的故事:身份验证可以工作,但一旦返回到应用程序,我看到的唯一一件事就是授权失败错误消息和前端/浏览器中的“错误403:授权失败”。因此,似乎它不是特定于身份提供程序的。您不需要回答自己的问题,很高兴您找到了解决方案。您还可以推送“服务器目录”以包含自定义的server.xml,请参阅此处的文档:。你能提供一个链接到你使用的初学者软件包吗?我们将从中删除误导性的server.xml。明确鼓励回答您自己的问题,因为您正在与其他人分享您的专业知识。谢谢大家,我感谢你们的意见!
<featureManager>
    <feature>servlet-3.1</feature>
</featureManager>

<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080">
    <tcpOptions soReuseAddr="true" />
</httpEndpoint>

<application name="chat-web" context-root="chat-web"
    location="${appLocation}" type="war">
    <application-bnd>
        <security-role name="any-authenticated">
            <special-subject type="ALL_AUTHENTICATED_USERS" />
        </security-role>
    </application-bnd>
</application>
1/2/2016 5:31:10 PM OUT App [INFO    ] JSPG8502I: The value of the JSP attribute jdkSourceLevel is "15".
1/2/2016 5:31:10 PM OUT App [INFO    ] CWWKS9122I:  For URL /redirect/* in application com.ibm.ws.security.openidconnect.client, the following HTTP methods are uncovered, and accessible: GET POST PUT DELETE HEAD OPTIONS TRACE
1/2/2016 5:31:11 PM OUT App [INFO    ] SRVE0242I: [com.ibm.ws.security.openidconnect.client] [/oidcclient] [OpenIdConnectClientRedirectServlet]: Initialization successful.
1/2/2016 5:31:11 PM OUT RTR chat.bluemix.byte23.net - [02/01/2016:17:31:10 +0000] "GET /oidcclient/redirect/qbZkQ73jmu?scope=openid&code=tXTJ80u1D69dCHPIhCQrahyBcCS51G&state=ok8OQCSJKnAQX324drvI HTTP/1.1" 302 0 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7" 108.168.250.151:58431 x_forwarded_for:"94.114.26.231" x_forwarded_proto:"https" vcap_request_id:aa1dc020-8cbf-4338-7b1a-7b079d189a60 response_time:0.222157618 app_id:4c20dc63-d050-49f7-bb10-6e5cccab965d x_global_transaction_id:"3540714463"
1/2/2016 5:31:12 PM OUT App [AUDIT   ] CWWKS9104A: Authorization failed for user chat-p6ydtq2fkr-cp16.iam.ibmcloud.com/www.ibm.com/tobi while invoking myapp on /. The user is not granted access to any of the required roles: [any-authenticated].
 <application-bnd>
    <security-role name="any-authenticated">
        <special-subject type="ALL_AUTHENTICATED_USERS" />
    </security-role>
</application-bnd>
<?xml version="1.0" encoding="UTF-8"?>
<application-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://websphere.ibm.com/xml/ns/javaee"
    xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee
    http://websphere.ibm.com/xml/ns/javaee/ibm-application-bnd_1_0.xsd"
    version="1.0">
  <security-role name="any-authenticated">
    <special-subject type="ALL_AUTHENTICATED_USERS" />
  </security-role>
</application-bnd>