1 package org.apache.archiva.admin.repository.runtime;
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
21 import net.sf.beanlib.provider.replicator.BeanReplicator;
22 import org.apache.archiva.admin.model.RepositoryAdminException;
23 import org.apache.archiva.admin.model.beans.CacheConfiguration;
24 import org.apache.archiva.admin.model.beans.LdapConfiguration;
25 import org.apache.archiva.admin.model.beans.LdapGroupMapping;
26 import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
27 import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin;
28 import org.apache.archiva.configuration.ArchivaConfiguration;
29 import org.apache.archiva.configuration.Configuration;
30 import org.apache.archiva.configuration.IndeterminateConfigurationException;
31 import org.apache.archiva.redback.components.cache.Cache;
32 import org.apache.archiva.redback.components.registry.RegistryException;
33 import org.apache.archiva.redback.configuration.UserConfiguration;
34 import org.apache.archiva.redback.configuration.UserConfigurationException;
35 import org.apache.archiva.redback.configuration.UserConfigurationKeys;
36 import org.apache.commons.lang.StringUtils;
37 import org.slf4j.Logger;
38 import org.slf4j.LoggerFactory;
39 import org.springframework.stereotype.Service;
41 import javax.annotation.PostConstruct;
42 import javax.inject.Inject;
43 import javax.inject.Named;
44 import java.util.ArrayList;
45 import java.util.Collection;
46 import java.util.HashMap;
47 import java.util.HashSet;
48 import java.util.List;
53 * @author Olivier Lamy
56 @Service( "redbackRuntimeConfigurationAdmin#default" )
57 public class DefaultRedbackRuntimeConfigurationAdmin
58 implements RedbackRuntimeConfigurationAdmin, UserConfiguration
61 protected Logger log = LoggerFactory.getLogger( getClass() );
64 private ArchivaConfiguration archivaConfiguration;
67 @Named( value = "userConfiguration#redback" )
68 private UserConfiguration userConfiguration;
71 @Named( value = "cache#users" )
72 private Cache usersCache;
75 public void initialize()
76 throws UserConfigurationException
80 RedbackRuntimeConfiguration redbackRuntimeConfiguration = getRedbackRuntimeConfiguration();
81 // migrate or not data from redback
82 if ( !redbackRuntimeConfiguration.isMigratedFromRedbackConfiguration() )
84 // not migrated so build a new fresh one
85 redbackRuntimeConfiguration = new RedbackRuntimeConfiguration();
86 // so migrate if available
87 String userManagerImpl =
88 userConfiguration.getConcatenatedList( UserConfigurationKeys.USER_MANAGER_IMPL, "jdo" );
89 if ( StringUtils.isNotEmpty( userManagerImpl ) )
91 String[] impls = StringUtils.split( userManagerImpl, ',' );
92 for ( String impl : impls )
94 redbackRuntimeConfiguration.getUserManagerImpls().add( impl );
98 String rbacManagerImpls =
99 userConfiguration.getConcatenatedList( UserConfigurationKeys.RBAC_MANAGER_IMPL, "jdo" );
101 if ( StringUtils.isNotEmpty( rbacManagerImpls ) )
103 String[] impls = StringUtils.split( rbacManagerImpls, ',' );
104 for ( String impl : impls )
106 redbackRuntimeConfiguration.getRbacManagerImpls().add( impl );
112 LdapConfiguration ldapConfiguration = redbackRuntimeConfiguration.getLdapConfiguration();
113 if ( ldapConfiguration == null )
115 ldapConfiguration = new LdapConfiguration();
116 redbackRuntimeConfiguration.setLdapConfiguration( ldapConfiguration );
119 ldapConfiguration.setHostName(
120 userConfiguration.getString( UserConfigurationKeys.LDAP_HOSTNAME, null ) );
121 ldapConfiguration.setPort( userConfiguration.getInt( UserConfigurationKeys.LDAP_PORT, -1 ) );
122 ldapConfiguration.setSsl( userConfiguration.getBoolean( UserConfigurationKeys.LDAP_SSL, false ) );
123 ldapConfiguration.setBaseDn(
124 userConfiguration.getConcatenatedList( UserConfigurationKeys.LDAP_BASEDN, null ) );
126 ldapConfiguration.setBaseGroupsDn(
127 userConfiguration.getConcatenatedList( UserConfigurationKeys.LDAP_GROUPS_BASEDN,
128 ldapConfiguration.getBaseDn() ) );
130 ldapConfiguration.setContextFactory(
131 userConfiguration.getString( UserConfigurationKeys.LDAP_CONTEX_FACTORY,
132 isSunContextFactoryAvailable()
133 ? "com.sun.jndi.ldap.LdapCtxFactory"
135 ldapConfiguration.setBindDn(
136 userConfiguration.getConcatenatedList( UserConfigurationKeys.LDAP_BINDDN, null ) );
137 ldapConfiguration.setPassword(
138 userConfiguration.getString( UserConfigurationKeys.LDAP_PASSWORD, null ) );
139 ldapConfiguration.setAuthenticationMethod(
140 userConfiguration.getString( UserConfigurationKeys.LDAP_AUTHENTICATION_METHOD, null ) );
142 ldapConfiguration.setWritable(
143 userConfiguration.getBoolean( UserConfigurationKeys.LDAP_WRITABLE, false ) );
145 ldapConfiguration.setUseRoleNameAsGroup(
146 userConfiguration.getBoolean( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME, false ) );
148 boolean ldapBindAuthenticatorEnabled =
149 userConfiguration.getBoolean( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED, false );
150 ldapConfiguration.setBindAuthenticatorEnabled( ldapBindAuthenticatorEnabled );
152 // LDAP groups mapping reading !!
153 // UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY
154 // userConfiguration.getKeys()
156 Collection<String> keys = userConfiguration.getKeys();
158 List<LdapGroupMapping> ldapGroupMappings = new ArrayList<LdapGroupMapping>();
160 for ( String key : keys )
162 if ( key.startsWith( UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) )
165 StringUtils.substringAfter( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY );
166 String val = userConfiguration.getConcatenatedList( key, "" );
167 if ( !StringUtils.isEmpty( val ) )
169 String[] roles = StringUtils.split( val, ',' );
170 ldapGroupMappings.add( new LdapGroupMapping( group, roles ) );
175 redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );
177 redbackRuntimeConfiguration.setMigratedFromRedbackConfiguration( true );
179 updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
182 // we must ensure userManagerImpls list is not empty if so put at least jdo one !
183 if ( redbackRuntimeConfiguration.getUserManagerImpls().isEmpty() )
186 "redbackRuntimeConfiguration with empty userManagerImpls so force at least jdo implementation !" );
187 redbackRuntimeConfiguration.getUserManagerImpls().add( "jdo" );
188 updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
191 // we ensure authorizerImpls is not empty if so put
192 if ( redbackRuntimeConfiguration.getRbacManagerImpls().isEmpty() )
195 "redbackRuntimeConfiguration with empty rbacManagerImpls so force at least cached implementation !" );
196 redbackRuntimeConfiguration.getRbacManagerImpls().add( "cached" );
197 updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
200 boolean save = false;
203 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration() == null )
205 redbackRuntimeConfiguration.setUsersCacheConfiguration( new CacheConfiguration() );
207 // if -1 it means non initialized to take values from the spring bean
208 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration().getTimeToIdleSeconds() < 0 )
210 redbackRuntimeConfiguration.getUsersCacheConfiguration().setTimeToIdleSeconds(
211 usersCache.getTimeToIdleSeconds() );
215 usersCache.setTimeToIdleSeconds(
216 redbackRuntimeConfiguration.getUsersCacheConfiguration().getTimeToIdleSeconds() );
218 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration().getTimeToLiveSeconds() < 0 )
220 redbackRuntimeConfiguration.getUsersCacheConfiguration().setTimeToLiveSeconds(
221 usersCache.getTimeToLiveSeconds() );
225 usersCache.setTimeToLiveSeconds(
226 redbackRuntimeConfiguration.getUsersCacheConfiguration().getTimeToLiveSeconds() );
228 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsInMemory() < 0 )
230 redbackRuntimeConfiguration.getUsersCacheConfiguration().setMaxElementsInMemory(
231 usersCache.getMaxElementsInMemory() );
234 usersCache.setMaxElementsInMemory(
235 redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsInMemory() );
237 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsOnDisk() < 0 )
239 redbackRuntimeConfiguration.getUsersCacheConfiguration().setMaxElementsOnDisk(
240 usersCache.getMaxElementsOnDisk() );
243 usersCache.setMaxElementsOnDisk(
244 redbackRuntimeConfiguration.getUsersCacheConfiguration().getMaxElementsOnDisk() );
248 updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
252 catch ( RepositoryAdminException e )
254 throw new UserConfigurationException( e.getMessage(), e );
258 private boolean isSunContextFactoryAvailable()
262 return Thread.currentThread().getContextClassLoader().loadClass( "com.sun.jndi.ldap.LdapCtxFactory" )
265 catch ( ClassNotFoundException e )
271 public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
273 return build( archivaConfiguration.getConfiguration().getRedbackRuntimeConfiguration() );
276 public void updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
277 throws RepositoryAdminException
279 org.apache.archiva.configuration.RedbackRuntimeConfiguration runtimeConfiguration =
280 build( redbackRuntimeConfiguration );
281 Configuration configuration = archivaConfiguration.getConfiguration();
282 configuration.setRedbackRuntimeConfiguration( runtimeConfiguration );
285 archivaConfiguration.save( configuration );
287 catch ( RegistryException e )
289 throw new RepositoryAdminException( e.getMessage(), e );
291 catch ( IndeterminateConfigurationException e )
293 throw new RepositoryAdminException( e.getMessage(), e );
297 private RedbackRuntimeConfiguration build(
298 org.apache.archiva.configuration.RedbackRuntimeConfiguration runtimeConfiguration )
300 RedbackRuntimeConfiguration redbackRuntimeConfiguration =
301 new BeanReplicator().replicateBean( runtimeConfiguration, RedbackRuntimeConfiguration.class );
303 if ( runtimeConfiguration.getLdapConfiguration() != null )
305 redbackRuntimeConfiguration.setLdapConfiguration(
306 new BeanReplicator().replicateBean( runtimeConfiguration.getLdapConfiguration(),
307 LdapConfiguration.class ) );
310 if ( runtimeConfiguration.getUsersCacheConfiguration() != null )
312 redbackRuntimeConfiguration.setUsersCacheConfiguration(
313 new BeanReplicator().replicateBean( runtimeConfiguration.getUsersCacheConfiguration(),
314 CacheConfiguration.class ) );
317 if ( redbackRuntimeConfiguration.getLdapConfiguration() == null )
320 redbackRuntimeConfiguration.setLdapConfiguration( new LdapConfiguration() );
323 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration() == null )
325 redbackRuntimeConfiguration.setUsersCacheConfiguration( new CacheConfiguration() );
328 List<org.apache.archiva.configuration.LdapGroupMapping> mappings = runtimeConfiguration.getLdapGroupMappings();
330 if ( mappings != null && mappings.size() > 0 )
332 List<LdapGroupMapping> ldapGroupMappings = new ArrayList<LdapGroupMapping>( mappings.size() );
334 for ( org.apache.archiva.configuration.LdapGroupMapping mapping : mappings )
336 ldapGroupMappings.add( new LdapGroupMapping( mapping.getGroup(), mapping.getRoleNames() ) );
339 redbackRuntimeConfiguration.setLdapGroupMappings( ldapGroupMappings );
342 cleanupProperties( redbackRuntimeConfiguration );
344 return redbackRuntimeConfiguration;
348 * cleaning from map properties used directly in archiva configuration fields
350 * @param redbackRuntimeConfiguration
352 private void cleanupProperties( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
354 Map<String, String> properties = redbackRuntimeConfiguration.getConfigurationProperties();
355 properties.remove( UserConfigurationKeys.LDAP_HOSTNAME );
356 properties.remove( UserConfigurationKeys.LDAP_PORT );
357 properties.remove( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED );
358 properties.remove( UserConfigurationKeys.LDAP_SSL );
359 properties.remove( UserConfigurationKeys.LDAP_BASEDN );
360 properties.remove( UserConfigurationKeys.LDAP_GROUPS_BASEDN );
361 properties.remove( UserConfigurationKeys.LDAP_CONTEX_FACTORY );
362 properties.remove( UserConfigurationKeys.LDAP_BINDDN );
363 properties.remove( UserConfigurationKeys.LDAP_PASSWORD );
364 properties.remove( UserConfigurationKeys.LDAP_AUTHENTICATION_METHOD );
365 properties.remove( UserConfigurationKeys.LDAP_WRITABLE );
366 properties.remove( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME );
367 // cleanup groups <-> role mapping
368 /**for ( Map.Entry<String, String> entry : new HashMap<String, String>( properties ).entrySet() )
370 if ( entry.getKey().startsWith( UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) )
372 properties.remove( entry.getKey() );
377 private org.apache.archiva.configuration.RedbackRuntimeConfiguration build(
378 RedbackRuntimeConfiguration redbackRuntimeConfiguration )
380 org.apache.archiva.configuration.RedbackRuntimeConfiguration res =
381 new BeanReplicator().replicateBean( redbackRuntimeConfiguration,
382 org.apache.archiva.configuration.RedbackRuntimeConfiguration.class );
384 if ( redbackRuntimeConfiguration.getLdapConfiguration() == null )
386 redbackRuntimeConfiguration.setLdapConfiguration( new LdapConfiguration() );
388 res.setLdapConfiguration(
389 new BeanReplicator().replicateBean( redbackRuntimeConfiguration.getLdapConfiguration(),
390 org.apache.archiva.configuration.LdapConfiguration.class ) );
392 if ( redbackRuntimeConfiguration.getUsersCacheConfiguration() == null )
394 redbackRuntimeConfiguration.setUsersCacheConfiguration( new CacheConfiguration() );
398 res.setUsersCacheConfiguration(
399 new BeanReplicator().replicateBean( redbackRuntimeConfiguration.getUsersCacheConfiguration(),
400 org.apache.archiva.configuration.CacheConfiguration.class ) );
402 List<LdapGroupMapping> ldapGroupMappings = redbackRuntimeConfiguration.getLdapGroupMappings();
404 if ( ldapGroupMappings != null && ldapGroupMappings.size() > 0 )
407 List<org.apache.archiva.configuration.LdapGroupMapping> mappings =
408 new ArrayList<org.apache.archiva.configuration.LdapGroupMapping>( ldapGroupMappings.size() );
410 for ( LdapGroupMapping ldapGroupMapping : ldapGroupMappings )
413 org.apache.archiva.configuration.LdapGroupMapping mapping =
414 new org.apache.archiva.configuration.LdapGroupMapping();
415 mapping.setGroup( ldapGroupMapping.getGroup() );
416 mapping.setRoleNames( new ArrayList<String>( ldapGroupMapping.getRoleNames() ) );
417 mappings.add( mapping );
420 res.setLdapGroupMappings( mappings );
425 // wrapper for UserConfiguration to intercept values (and store it not yet migrated)
428 public String getString( String key )
430 if ( UserConfigurationKeys.USER_MANAGER_IMPL.equals( key ) )
432 // possible false for others than archiva user manager
433 return getRedbackRuntimeConfiguration().getUserManagerImpls().get( 0 );
436 if ( StringUtils.startsWith( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) )
438 RedbackRuntimeConfiguration redbackRuntimeConfiguration = getRedbackRuntimeConfiguration();
439 int index = redbackRuntimeConfiguration.getLdapGroupMappings().indexOf( new LdapGroupMapping(
440 StringUtils.substringAfter( key, UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY ) ) );
443 return StringUtils.join( redbackRuntimeConfiguration.getLdapGroupMappings().get( index ).getRoleNames(),
448 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
450 if ( conf.getConfigurationProperties().containsKey( key ) )
452 return conf.getConfigurationProperties().get( key );
455 String value = userConfiguration.getString( key );
460 conf.getConfigurationProperties().put( key, value );
464 updateRedbackRuntimeConfiguration( conf );
466 catch ( RepositoryAdminException e )
468 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
469 throw new RuntimeException( e.getMessage(), e );
475 public String getString( String key, String defaultValue )
477 if ( UserConfigurationKeys.LDAP_HOSTNAME.equals( key ) )
479 return getRedbackRuntimeConfiguration().getLdapConfiguration().getHostName();
481 if ( UserConfigurationKeys.LDAP_CONTEX_FACTORY.equals( key ) )
483 return getRedbackRuntimeConfiguration().getLdapConfiguration().getContextFactory();
485 if ( UserConfigurationKeys.LDAP_PASSWORD.equals( key ) )
487 return getRedbackRuntimeConfiguration().getLdapConfiguration().getPassword();
489 if ( UserConfigurationKeys.LDAP_AUTHENTICATION_METHOD.equals( key ) )
491 return getRedbackRuntimeConfiguration().getLdapConfiguration().getAuthenticationMethod();
494 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
496 if ( conf.getConfigurationProperties().containsKey( key ) )
498 return conf.getConfigurationProperties().get( key );
501 String value = userConfiguration.getString( key, defaultValue );
508 conf.getConfigurationProperties().put( key, value );
511 updateRedbackRuntimeConfiguration( conf );
513 catch ( RepositoryAdminException e )
515 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
516 throw new RuntimeException( e.getMessage(), e );
522 public int getInt( String key )
524 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
526 if ( conf.getConfigurationProperties().containsKey( key ) )
528 return Integer.valueOf( conf.getConfigurationProperties().get( key ) );
531 int value = userConfiguration.getInt( key );
533 conf.getConfigurationProperties().put( key, Integer.toString( value ) );
536 updateRedbackRuntimeConfiguration( conf );
538 catch ( RepositoryAdminException e )
540 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
541 throw new RuntimeException( e.getMessage(), e );
547 public int getInt( String key, int defaultValue )
549 if ( UserConfigurationKeys.LDAP_PORT.equals( key ) )
551 return getRedbackRuntimeConfiguration().getLdapConfiguration().getPort();
554 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
556 if ( conf.getConfigurationProperties().containsKey( key ) )
558 return Integer.valueOf( conf.getConfigurationProperties().get( key ) );
561 int value = userConfiguration.getInt( key, defaultValue );
563 conf.getConfigurationProperties().put( key, Integer.toString( value ) );
566 updateRedbackRuntimeConfiguration( conf );
568 catch ( RepositoryAdminException e )
570 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
571 throw new RuntimeException( e.getMessage(), e );
577 public boolean getBoolean( String key )
579 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
581 if ( UserConfigurationKeys.LDAP_WRITABLE.equals( key ) )
583 return conf.getLdapConfiguration().isWritable();
586 if ( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME.equals( key ) )
588 return conf.getLdapConfiguration().isUseRoleNameAsGroup();
591 if ( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED.equals( key ) )
593 return conf.getLdapConfiguration().isBindAuthenticatorEnabled();
596 if ( conf.getConfigurationProperties().containsKey( key ) )
598 return Boolean.valueOf( conf.getConfigurationProperties().get( key ) );
601 boolean value = userConfiguration.getBoolean( key );
603 conf.getConfigurationProperties().put( key, Boolean.toString( value ) );
606 updateRedbackRuntimeConfiguration( conf );
608 catch ( RepositoryAdminException e )
610 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
611 throw new RuntimeException( e.getMessage(), e );
617 public boolean getBoolean( String key, boolean defaultValue )
619 if ( UserConfigurationKeys.LDAP_SSL.equals( key ) )
621 return getRedbackRuntimeConfiguration().getLdapConfiguration().isSsl();
624 if ( UserConfigurationKeys.LDAP_WRITABLE.equals( key ) )
626 return getRedbackRuntimeConfiguration().getLdapConfiguration().isWritable();
629 if ( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME.equals( key ) )
631 return getRedbackRuntimeConfiguration().getLdapConfiguration().isUseRoleNameAsGroup();
634 if ( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED.equals( key ) )
636 return getRedbackRuntimeConfiguration().getLdapConfiguration().isBindAuthenticatorEnabled();
639 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
641 if ( conf.getConfigurationProperties().containsKey( key ) )
643 return Boolean.valueOf( conf.getConfigurationProperties().get( key ) );
646 boolean value = userConfiguration.getBoolean( key, defaultValue );
648 conf.getConfigurationProperties().put( key, Boolean.toString( value ) );
651 updateRedbackRuntimeConfiguration( conf );
653 catch ( RepositoryAdminException e )
655 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
656 throw new RuntimeException( e.getMessage(), e );
662 public List<String> getList( String key )
664 List<String> value = userConfiguration.getList( key );
666 RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
667 // TODO concat values
668 conf.getConfigurationProperties().put( key, "" );
671 updateRedbackRuntimeConfiguration( conf );
673 catch ( RepositoryAdminException e )
675 log.error( "fail to save RedbackRuntimeConfiguration: {}", e.getMessage(), e );
676 throw new RuntimeException( e.getMessage(), e );
682 public String getConcatenatedList( String key, String defaultValue )
684 if ( UserConfigurationKeys.LDAP_BASEDN.equals( key ) )
686 return getRedbackRuntimeConfiguration().getLdapConfiguration().getBaseDn();
688 if ( UserConfigurationKeys.LDAP_BINDDN.equals( key ) )
690 return getRedbackRuntimeConfiguration().getLdapConfiguration().getBindDn();
692 if ( UserConfigurationKeys.LDAP_GROUPS_BASEDN.equals( key ) )
694 return getRedbackRuntimeConfiguration().getLdapConfiguration().getBaseGroupsDn();
696 return userConfiguration.getConcatenatedList( key, defaultValue );
699 public Collection<String> getKeys()
701 Collection<String> keys = userConfiguration.getKeys();
703 Set<String> keysSet = new HashSet<String>( keys );
705 keysSet.addAll( getRedbackRuntimeConfiguration().getConfigurationProperties().keySet() );