geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Geronimo v2.1 > Basic Hints on Security Configuration
Date Thu, 24 Jun 2010 10:50:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC21&amp;forWysiwyg=true"
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">Basic
Hints on Security Configuration</a></h2>
    <h4>Page <b>edited</b> by             <a href="">Ashish
                         <h4>Changes (2)</h4>
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">&lt;gbean
            <tr><td class="diff-added-lines" style="background-color: #dfd;">&lt;gbean
name=&quot;ConfiguredEncryption&quot;&gt; <br></td></tr>
            <tr><td class="diff-unchanged" >&lt;attribute name=&quot;path&quot;&gt;var/security/ConfiguredSecretKey.ser&lt;/attribute&gt;
<br>&lt;reference name=&quot;ServerInfo&quot;&gt;&lt;pattern&gt;&lt;name&gt;ServerInfo&lt;/name&gt;&lt;/pattern&gt;&lt;/reference&gt;
            <tr><td class="diff-snipped" >...<br></td></tr>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="BasicHintsonSecurityConfiguration-Whereisthesecurityconfiguration%3F"></a>Where
is the security configuration?</h2>

<p>In a normal Geronimo server, the basic security configuration is divided into two
plugins, j2ee-security and server-security-config.  The parts you are not too likely to want
to change, such as the jacc provider and the keystore manager, are in j2ee-security.  The
parts that you are almost certain to want to change is in server-security config.  For instance,
the toy properties file security realm for the admin console is in server-security-config.</p>

<h3><a name="BasicHintsonSecurityConfiguration-SoIhaveanenterprisewideauthenticationsystem....howdoIsetitupforallmyapps%3F"></a>So
I have an enterprise wide authentication system.... how do I set it up for all my apps?</h3>

<p>You want to replace server-security-config with your own Geronimo plugin (see <a
href="/confluence/display/GMOxDOC21/Plugin+infrastructure" title="Plugin infrastructure">Plugin
infrastructure</a>) that contains a security realm customized for your security setup
(e.g. ldap) and includes whatever keystores you need. To replace all uses of server-security-config
with your plugin, include an artifact-alias element in your geronimo-plugin.xml file.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;artifact-alias key=<span class="code-quote">"org.apache.geronimo.framework/server-security-config/2.2-SNAPSHOT/car"</span>&gt;com.myco/myco-security-config/1.0/car&lt;/artifact-alias&gt;
&lt;artifact-alias key=<span class="code-quote">"org.apache.geronimo.framework/server-security-config<span
<p>Another option is to use maven with the car-maven-plugin. The above code would need
to be included in the car-maven-plugin configuration in pom.xml.</p>

<p>Note that if you want the admin console and MEJB to continue working without redeployment,
you have to include a security realm named geronimo-admin.  geronimo-admin should supply supply
appropriate users with principals of class
and names of (as appropriate) admin (for console and MEJB read access) and mejbadmin (for
MEJB write access).</p>

<p>As with any geronimo plugin, you can include any jars in the plugin's classloader
by installing the jars in the geronimo repository and listing them as dependencies in the
geronimo plan. The car-maven-plugin can be used to make the geronimo dependencies the same
as the maven dependencies and to have plugin installation also install all the needed jars.</p>

<h3><a name="BasicHintsonSecurityConfiguration-Whoneedsenterprisewide%3FIwantmyapptoincludeitsownsecuritysetup%5C%21"></a>Who
needs enterprise-wide?  I want my app to include its own security setup&#33;</h3>

<p>You can also include security realm configuration, keystores, and credential stores
in your geronimo plan for your application.  Just put the gbean configurations at the end
after the javaee specific configuration.  In this case you may not want to remove the standard
server-security-config as removing it would prevent the admin console or mejb from starting.</p>

<h2><a name="BasicHintsonSecurityConfiguration-Usingapluggableencryptionsystem"></a>Using
a pluggable encryption system</h2>

<p>By default you get the old behavior with <b>{Simple}</b> encryption with
a hard-coded key. If you want to have a fixed key generated by Geronimo, you can add this
Gbean to the rmi-naming module in <tt>config.xml</tt>:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;gbean name=<span class="code-quote">"ConfiguredEncryption"</span>&gt;
&lt;attribute name=<span class="code-quote">"path"</span>&gt;<span
&lt;reference name=<span class="code-quote">"ServerInfo"</span>&gt;&lt;pattern&gt;&lt;name&gt;ServerInfo&lt;/name&gt;&lt;/pattern&gt;&lt;/reference&gt;

<p>This will create a key the first time the server started, after that it will keep
using the saved key at the location specified. If you put a serialized SecretKeySpec there
it will use it instead.</p>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message