我在容器安全方面有新问题。在服务器上,我有两个耳朵,第二个是第一个呼叫服务。服务中有@RolesAllowed(“ Authenticated”)。我在server.xml中的配置如下:
<featureManager>
<feature>jndi-1.0</feature>
<feature>distributedMap-1.0</feature>
<feature>localConnector-1.0</feature>
<feature>wasJmsClient-2.0</feature>
<feature>jdbc-4.1</feature-->
<feature>javaMail-1.5</feature>
<feature>json-1.0</feature>
<feature>adminCenter-1.0</feature>
<feature>appSecurity-2.0</feature>
<feature>beanValidation-2.0</feature>
<feature>cdi-2.0</feature>
<feature>jsf-2.3</feature>
<feature>mdb-3.2</feature>
<feature>ejbHome-3.2</feature>
<feature>ejbLite-3.2</feature>
<feature>ejbRemote-3.2</feature>
<feature>jca-1.7</feature>
<feature>concurrent-1.0</feature>
<feature>jms-2.0</feature>
<feature>appClientSupport-1.0</feature>
<feature>ldapRegistry-3.0</feature>
</featureManager>
<basicRegistry id="basic" realm="customRealm">
<user password="{xor}Ozo5Kiw6LQ==" name="defuser" />
</basicRegistry>
两只耳朵都具有相同的配置
<application-bnd>
<security-role name="All Role">
<special-subject type="ALL_AUTHENTICATED_USERS" />
</security-role>
</application-bnd>
第二只耳朵包含ibm-application-ibd.xml文件,但我无法对其进行编辑。最好是覆盖它。 当我从第二只耳朵打电话给我时,我仍然遇到异常: 由以下原因引起:javax.ejb.EJBAccessException:CWWKS9400A:调用时对用户UNAUTHENTICATED的授权失败
有什么想法吗?
答案 0 :(得分:0)
Liberty允许您使用服务器配置元素 application-bnd 覆盖应用程序绑定文件,有关详细信息,请参阅IBM KnowledgeCenter主题https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.liberty.autogen.base.doc/ae/rwlp_config_enterpriseApplication.html#application-bnd和https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_sec_rolebased.html。