📄 ch09s09.html
字号:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>The JBossSX Default Security Manager: JaasSecurityManager</title><link rel="stylesheet" href="styles.css" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/styles.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets Vimages/callouts/"><link rel="home" href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html" title="JBoss 3.0 Documentation"><link rel="up" href="ch09.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09.html" title="Chapter 9. JBossSX Security Extension Framework"><link rel="previous" href="ch09s08.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09s08.html" title="The JBoss Security Model"><link rel="next" href="ch09s15.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09s15.html" title="The Secure Remote Password(SRP) Protocol"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table border="0" cellpadding="0" cellspacing="0" height="65"><tr height="65"><td rowspan="2"><img src="jboss.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/jboss.gif" border="0"></td><td rowspan="2" background="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="100%" align="right" valign="top"><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="doc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/doc.gif" border="0"></a><a href="ch09.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09.html"><img src="toc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/toc.gif" border="0"></a><a href="ch09s08.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09s08.html"><img src="prev.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/prev.gif" border="0"></a><a href="ch09s15.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09s15.html"><img src="next.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/next.gif" border="0"></a></td></tr><tr></tr></table><div class="section"><a name="sx.JaasSecurityManager"></a><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="sx.JaasSecurityManager"></a>The JBossSX Default Security Manager: JaasSecurityManager</h2></div></div><p>This section will go into the details of the default JBoss security manager implementation to illustrate the interaction between the SecurityInterceptor and the security interfaces as well as usage of the JaasSecurityManager.</p><p>The default security implementation that JBoss comes preconfigured with consists of a JMX service MBean and a JAAS based implementation of the EJBSecurityManager and RealmMapping interfaces. The JMX bean is org.jboss.security.plugins.JaasSecurityManagerService and the security interfaces implementation is org.jboss.security.plugins.JaasSecurityManager. The JMX service MBean handles configurable aspects of the security manager and integrates the security manager into the JNDI namespace.</p><div class="section"><a name="d0e6261"></a><div class="titlepage"><div><h3 class="title"><a name="d0e6261"></a>Enabling EJB Security</h3></div></div><p>Even though there is a preconfigured security manager with the JBoss distribution, by default none of the EJB container configurations require security. The reason for this is that security may not be required and there is no way to provide a reasonable default setup. To secure your EJBs you must either change the default container configurations or specify the container configuration at deployment time. The standard container configuration is found in the conf/config-name/standardjboss.xml directory of the JBoss distribution tree. The “config-name” value is “default” by default. When specifying container configurations at deployment time you include a jboss.xml descriptor in your ear or ejb-jar META-INF directory. The key DTD elements for security configuration elements is given <a href="ch09s09.html#sx.jboss.security-config.dtd" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09s09.html#sx.jboss.security-config.dtd" title="Figure 9.4. standardjboss.xml/jboss.xml Deployment Descriptor Security Configuration Elements">Figure 9.4</a>
</p><div class="figure"><p><a name="sx.jboss.security-config.dtd"></a><b>Figure 9.4. standardjboss.xml/jboss.xml Deployment Descriptor Security Configuration Elements</b></p><div class="mediaobjectco"><img src="sx.jbossSecurityDTD.jpg" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/sx.jbossSecurityDTD.jpg"><div class="calloutlist"><a name="d0e6286"></a><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a name="d0e6287"></a><img src="1.png" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/1.png" alt="1" border="0"></td><td valign="top" align="left"><p>The security-domain element specifies the JNDI name of
application wide security manager instance. This is an object that implements
both the EJBSecurityMgr and RealmMapping interfaces. This element is typically
used to establish the same security manager across all deployment module
containers rather than specifying the EJBSecurityMgr and RealmMapping instance
for each container.</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e6290"></a><img src="2.png" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/2.png" alt="2" border="0"></td><td valign="top" align="left"><p>The role.mapping.manager element specifies the JNDI name
of the RealmMapping interface instance to use for the container. This overrides
any security-domain setting. A role.mapping.manager element may be specified
without a authentication.module element if there is a security-domain element.
In this case an alternate role mapping implementation is used for the
container.</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e6293"></a><img src="3.png" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/3.png" alt="3" border="0"></td><td valign="top" align="left"><p>The authentication.module element specifies the JNDI name
of the EJBSecurityMgr interface instance to use for the container. This
overrides any security-domain setting. When the authentication.module is
specified for a container there must also be a role.mapping.manager element
specified.</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e6296"></a><img src="4.png" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/4.png" alt="4" border="0"></td><td valign="top" align="left"><p>The security.proxy element specifies gives the class name
of the security proxy implementation. This may be an instance of
org.jboss.security.SecurityProxy, or an just an object that implements methods
in the home or remote interface of an EJB without implementating any common
interface. If the given class does not implement the
org.jboss.security.SecurityProxy interface, the instance must be wrapped in a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -