Weblogic 通过IP限制对Servlet的访问
是否可以将对Servlet的访问限制为定义的IP地址列表 这与运行在Weblogic 12.1.1.0上的可配置现成系统有关。我没有访问Java源代码的权限,但我可以在Weblogic控制台和直接在ear/war文件中修改设置 下面是相关的web.xml文件,它描述了我试图保护的web服务应用程序Weblogic 通过IP限制对Servlet的访问,weblogic,Weblogic,是否可以将对Servlet的访问限制为定义的IP地址列表 这与运行在Weblogic 12.1.1.0上的可配置现成系统有关。我没有访问Java源代码的权限,但我可以在Weblogic控制台和直接在ear/war文件中修改设置 下面是相关的web.xml文件,它描述了我试图保护的web服务应用程序 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.su
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="XyzWSWebApp">
<display-name>Xyz Web Services</display-name>
<description>Xyz Web Service Web-App</description>
<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
<init-param>
<param-name>axis.attachments.Directory</param-name>
<param-value>${java.io.tmpdir}/axis/attachments</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>25</session-timeout>
</session-config>
<mime-mapping>
<extension>wsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>Xyz Web Services</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>Users access Xyz Web Services</description>
<role-name>AgileUser</role-name>
</auth-constraint>
<user-data-constraint>
<description>Define whether to use SSL to transport data</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Unprotect web service URL</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
<user-data-constraint>
<description>Define whether to use SSL to transport data</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>XyzRealm</realm-name>
</login-config>
<security-role>
<description>Users access Xyz</description>
<role-name>XyzUser</role-name>
</security-role>
</web-app>
Xyz Web服务
Xyz Web服务Web应用程序
AxisServlet
org.apache.axis.transport.http.AxisServlet
axis.attachments.Directory
${java.io.tmpdir}/axis/attachments
AxisServlet
/服务/*
25
wsdl
文本/xml
xsd
文本/xml
Xyz Web服务
/*
用户访问Xyz Web服务
敏捷者
定义是否使用SSL传输数据
没有一个
取消对web服务URL的保护
/*
得到
定义是否使用SSL传输数据
没有一个
基本的
XyzRealm
用户访问Xyz
XyzUser
提前谢谢。我不知道只有WebLogic才能做到这一点。但是,您可以使用Apache来处理WebLogic,并使用mod_authz_核心模块来限制IP地址的访问