1 <?xml version="1.0" encoding="ISO-8859-1"?>
3 ~ Licensed to the Apache Software Foundation (ASF) under one
4 ~ or more contributor license agreements. See the NOTICE file
5 ~ distributed with this work for additional information
6 ~ regarding copyright ownership. The ASF licenses this file
7 ~ to you under the Apache License, Version 2.0 (the
8 ~ "License"); you may not use this file except in compliance
9 ~ with the License. You may obtain a copy of the License at
11 ~ http://www.apache.org/licenses/LICENSE-2.0
13 ~ Unless required by applicable law or agreed to in writing,
14 ~ software distributed under the License is distributed on an
15 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 ~ KIND, either express or implied. See the License for the
17 ~ specific language governing permissions and limitations
24 <role>org.codehaus.plexus.registry.Registry</role>
25 <implementation>org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry</implementation>
26 <role-hint>commons-configuration</role-hint>
30 <jndi prefix="java:comp/env" config-optional="true"/>
31 <xml fileName="${user.home}/.m2/archiva.xml" config-optional="true"
32 config-name="org.apache.maven.archiva.user"
33 config-at="org.apache.maven.archiva"/>
34 <xml fileName="${user.home}/.m2/shared.xml" config-optional="true"
35 config-name="org.apache.maven.shared.app.user" config-at="org.apache.maven.shared.app"
36 config-forceCreate="true"/>
37 <properties fileName="${user.home}/.m2/security.properties" config-optional="true"
38 config-at="org.codehaus.plexus.redback"/>
39 <properties fileName="${user.home}/.m2/archiva.properties" config-optional="true"
40 config-at="org.codehaus.plexus.redback"/>
41 <xml fileName="${appserver.base}/conf/archiva.xml" config-optional="true"
42 config-name="org.apache.maven.archiva.base"
43 config-at="org.apache.maven.archiva"/>
44 <xml fileName="${appserver.base}/conf/shared.xml" config-optional="true"
45 config-name="org.apache.maven.shared.app.base" config-at="org.apache.maven.shared.app"/>
46 <xml fileName="${appserver.base}/conf/common.xml" config-optional="true"/>
47 <properties fileName="${appserver.base}/conf/security.properties" config-optional="true"
48 config-at="org.codehaus.plexus.redback"/>
49 <xml fileName="${appserver.home}/conf/archiva.xml" config-optional="true"
50 config-at="org.apache.maven.archiva"/>
51 <xml fileName="${appserver.home}/conf/shared.xml" config-optional="true"
52 config-at="org.apache.maven.shared.app"/>
53 <xml fileName="${appserver.home}/conf/common.xml" config-optional="true"/>
54 <properties fileName="${appserver.home}/conf/security.properties" config-optional="true"
55 config-at="org.codehaus.plexus.redback"/>
56 <properties fileName="org/apache/maven/archiva/security.properties" config-at="org.codehaus.plexus.redback"/>
62 <role>org.codehaus.plexus.mailsender.MailSender</role>
63 <implementation>org.codehaus.plexus.mailsender.javamail.JndiJavamailMailSender</implementation>
65 <jndiSessionName>java:comp/env/mail/Session</jndiSessionName>
70 <role>org.codehaus.plexus.jdo.JdoFactory</role>
71 <role-hint>archiva</role-hint>
72 <implementation>org.codehaus.plexus.jdo.DataSourceConfigurableJdoFactory</implementation>
75 <connectionFactoryName>java:comp/env/jdbc/archiva</connectionFactoryName>
76 <shutdownConnectionFactoryName>java:comp/env/jdbc/archivaShutdown</shutdownConnectionFactoryName>
78 <!-- JPOX and JDO configuration -->
79 <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
82 <name>org.jpox.autoCreateSchema</name>
86 <name>org.jpox.autoCreateColumns</name>
90 <name>org.jpox.validateTables</name>
94 <name>org.jpox.validateConstraints</name>
98 <name>org.jpox.validateColumns</name>
102 <name>org.jpox.autoStartMechanism</name>
106 <name>org.jpox.transactionIsolation</name>
107 <value>READ_COMMITTED</value>
110 <name>org.jpox.poid.transactionIsolation</name>
111 <value>READ_COMMITTED</value>
114 <name>org.jpox.rdbms.dateTimezone</name>
115 <value>JDK_DEFAULT_TIMEZONE</value>
117 <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
119 <name>org.jpox.identifier.case</name>
120 <value>PreserveCase</value>
128 <role>org.codehaus.plexus.jdo.JdoFactory</role>
129 <role-hint>users</role-hint>
130 <implementation>org.codehaus.plexus.jdo.DataSourceConfigurableJdoFactory</implementation>
133 <connectionFactoryName>java:comp/env/jdbc/users</connectionFactoryName>
134 <shutdownConnectionFactoryName>java:comp/env/jdbc/usersShutdown</shutdownConnectionFactoryName>
136 <!-- JPOX and JDO configuration -->
137 <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
140 <name>org.jpox.autoCreateSchema</name>
144 <name>org.jpox.validateTables</name>
148 <name>org.jpox.validateConstraints</name>
152 <name>org.jpox.validateColumns</name>
156 <name>org.jpox.autoStartMechanism</name>
160 <name>org.jpox.transactionIsolation</name>
161 <value>READ_COMMITTED</value>
164 <name>org.jpox.poid.transactionIsolation</name>
165 <value>READ_COMMITTED</value>
168 <name>org.jpox.rdbms.dateTimezone</name>
169 <value>JDK_DEFAULT_TIMEZONE</value>
171 <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
173 <name>org.jpox.identifier.case</name>
174 <value>PreserveCase</value>
182 <role>org.apache.maven.archiva.webdav.util.MimeTypes</role>
183 <implementation>org.apache.maven.archiva.webdav.util.MimeTypes</implementation>
184 <description>MimeTypes</description>
186 <resource>archiva-mime-types.txt</resource>
194 <role>org.codehaus.plexus.logging.LoggerManager</role>
195 <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
196 <lifecycle-handler>basic</lifecycle-handler>
200 PLXREDBACK-81 bad role hint, redefining here until redback alpha-2 is released.
203 <role>org.codehaus.plexus.redback.system.check.EnvironmentCheck</role>
204 <role-hint>locked-admin-check</role-hint>
205 <implementation>org.codehaus.plexus.redback.xwork.checks.security.LockedAdminEnvironmentCheck</implementation>
206 <description>LockedAdminEnvironmentCheck: checks if accounts marked as system administrator are locked
207 and unlocks them on startup.
211 <role>org.codehaus.plexus.redback.users.UserManager</role>
212 <role-hint>cached</role-hint>
213 <field-name>userManager</field-name>
216 <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
217 <role-hint>cached</role-hint>
218 <field-name>rbacManager</field-name>
223 <!-- START SNIPPET: ldap -->
225 Ldap Authentication can be enabled by setting enabling these components and setting the following configuration options in your security.properties file
227 ============================================================
228 user.manager.impl=ldap
229 ldap.bind.authenticator.enabled=true
230 redback.default.admin=admin
231 redback.default.guest=guest
232 security.policy.password.expiration.enabled=false
234 ldap.config.hostname=ldap.hostname
236 ldap.config.base.dn=o=com
237 ldap.config.context.factory=com.sun.jndi.ldap.LdapCtxFactory
238 ldap.config.bind.dn=uid=myusername,o=com
239 ldap.config.password=s3cr3t
240 #ldap.config.authentication.method=
241 ============================================================
243 * ldap.config.hostname - The hostname of the ldap server
244 * ldap.config.port - The port of the ldap server
245 * ldap.config.base.dn - The baseDn of the ldap system
246 * ldap.config.context.factory - context factory for ldap connections
247 * ldap.config.bind.dn - the core user used for authentication the ldap server, must be able to perform the necessary searches, etc.
248 * ldap.config.password - password for the bindDn for the root ldap connection
250 until this process is better documented, the following is the document for configuration ldap with redback
252 http://redback.codehaus.org/integration/ldap.html
257 this component manages the connection to the ldap server
261 <role>org.codehaus.plexus.redback.common.ldap.connection.LdapConnectionFactory</role>
262 <role-hint>configurable</role-hint>
263 <implementation>org.codehaus.plexus.redback.common.ldap.connection.ConfigurableLdapConnectionFactory</implementation>
266 <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
273 this component manages the mapping of attributes in ldap to user information in redback. To configure the mapping, you can add the following properties in your security.properties
275 ============================================================
276 ldap.config.mapper.attribute.email=mail
277 ldap.config.mapper.attribute.fullname=givenName
278 ldap.config.mapper.attribute.password=userPassword
279 ldap.config.mapper.attribute.user.id=cn
280 ldap.config.mapper.attribute.user.base.dn=
281 ldap.config.mapper.attribute.user.object.class=inetOrgPerson
282 ldap.config.mapper.attribute.user.filter=(attributeName=value)
283 ============================================================
286 * email-attribute - The name of the attribute on a user that contains the email address
287 * full-name-attribute - The name of the attribute on a user that contains the users fullName
288 * password-attribute - The name of the attribute containing the users password, used for the authentiction using the user manager and not the ldap bind authenticator
289 * user-id-attribute - The name of the attribute containing the users userId, most commonly cn or sn.
290 * user-base-dn - The base dn that will be subtree searched for users.
291 * user-object-class - the objectClass used in the ldap server for indentifying users, most commonly inetOrgPerson.
295 <role>org.codehaus.plexus.redback.common.ldap.UserMapper</role>
296 <role-hint>ldap</role-hint>
297 <implementation>org.codehaus.plexus.redback.common.ldap.LdapUserMapper</implementation>
299 <email-attribute>email</email-attribute>
300 <full-name-attribute>givenName</full-name-attribute>
301 <password-attribute>userPassword</password-attribute>
302 <user-id-attribute>cn</user-id-attribute>
303 <user-base-dn>o=com</user-base-dn>
304 <user-object-class>inetOrgPerson</user-object-class>
308 <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
315 If caching is desired to improve performance then make uncomment this and make sure the following configuration parameter is in the security.properties
317 user.manager.impl=cached
321 <role>org.codehaus.plexus.redback.users.UserManager</role>
322 <role-hint>cached</role-hint>
323 <implementation>org.codehaus.plexus.redback.users.cached.CachedUserManager</implementation>
324 <description>CachedUserManager</description>
327 <role>org.codehaus.plexus.redback.users.UserManager</role>
328 <role-hint>ldap</role-hint>
329 <field-name>userImpl</field-name>
332 <role>org.codehaus.plexus.ehcache.EhcacheComponent</role>
333 <role-hint>users</role-hint>
334 <field-name>usersCache</field-name>
341 if using the user manager authenticator to authenticate the user and not the ldap bind authenticator make sure
342 this definition has the correct password encoder
344 Note: you should probably just use the ldap bind authenticator which is enabled by putting
346 ldap.bind.authenticator.enabled=true
348 in the security.properties
352 <role>org.codehaus.plexus.redback.policy.UserSecurityPolicy</role>
353 <role-hint>default</role-hint>
354 <implementation>org.codehaus.plexus.redback.policy.DefaultUserSecurityPolicy</implementation>
355 <description>User Security Policy.</description>
358 <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
359 <field-name>config</field-name>
362 <role>org.codehaus.plexus.redback.policy.PasswordEncoder</role>
363 <role-hint>sha1</role-hint>
364 <field-name>passwordEncoder</field-name>
367 <role>org.codehaus.plexus.redback.policy.UserValidationSettings</role>
368 <field-name>userValidationSettings</field-name>
371 <role>org.codehaus.plexus.redback.policy.CookieSettings</role>
372 <role-hint>rememberMe</role-hint>
373 <field-name>rememberMeCookieSettings</field-name>
376 <role>org.codehaus.plexus.redback.policy.CookieSettings</role>
377 <role-hint>signon</role-hint>
378 <field-name>signonCookieSettings</field-name>
381 <role>org.codehaus.plexus.redback.policy.PasswordRule</role>
382 <field-name>rules</field-name>
386 <!-- END SNIPPET: ldap -->
389 <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
390 <default-lifecycle-handler-id>plexus</default-lifecycle-handler-id>
392 <lifecycle-handler implementation="org.codehaus.plexus.personality.plexus.PlexusLifecycleHandler">
394 <name>Plexus Lifecycle Handler</name>
396 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.LogEnablePhase"/>
397 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase"/>
398 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ContextualizePhase"/>
399 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.AutoConfigurePhase"/>
400 <phase implementation="org.codehaus.plexus.registry.RegistryConfigurePhase"/>
401 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ServiceablePhase"/>
402 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase"/>
403 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase"/>
406 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.SuspendPhase"/>
409 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ResumePhase"/>
412 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.StopPhase"/>
413 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.DisposePhase"/>
414 <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.LogDisablePhase"/>
417 </lifecycle-handlers>
418 </lifecycle-handler-manager>