我正在玩wso2 AS 5.2.1并尝试向所有租户提供我的网络应用程序。 按照documentation的说明,我添加了 carbon.enable.saas 和 carbon.saas.tenants < / strong>参数到web.xml但是应用程序只能由安装了应用程序的域的用户访问(即,如果我在超级租户帐户下部署应用程序,那么只有来自全局帐户的用户才能访问...并且当我部署应用程序时租户帐户只允许来自该租户的用户登录)
我在AS控制台上看到此错误消息:
[2015-01-15 02:56:46,595]警告{org.wso2.carbon.tomcat.ext.realms.CarbonTomcatRealm} - admin@tenant1.com对租户托管的安全资源的非法访问尝试carbon.super
由于某种原因看起来像5.2.1忽略了carbon.enable.saas。有什么想法吗?这是我的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>webApp</display-name>
<context-param>
<param-name>carbon.enable.saas</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>carbon.saas.tenants</param-name>
<param-value>*</param-value>
</context-param>
<security-constraint>
<web-resource-collection>
<web-resource-name>Public access</web-resource-name>
<url-pattern>/images/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Public access</web-resource-name>
<url-pattern>/docs/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Public access</web-resource-name>
<url-pattern>/css/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
</security-constraint>
<security-constraint>
<display-name>Example Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<!-- Default login configuration uses form-based authentication -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Example Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<role-name>everyone</role-name>
</security-role>
<security-role>
<role-name>admin</role-name>
</security-role>
</web-app>
&#13;
答案 0 :(得分:0)
你可以单独使用下面的上下文属性,不需要放置&#34; carbon.saas.tenants&#34;上下文属性。
<context-param>
<param-name>carbon.enable.saas</param-name>
<param-value>*</param-value>
</context-param>