2018-10-31 19:12:29,331 | ERROR | (?:?) - [org.osgi.service.cm.ManagedServiceFactory, id=423, bundle=152/mvn:org.opencastproject/opencast-userdirectory-ldap/5.1]: Unexpected problem updating configuration org.opencastproject.userdirectory.ldap.0c3d2161-8f6c-4105-a90c-a1e47bcd5b6c
java.lang.IllegalArgumentException: At least one valid attribute must be provided
at org.opencastproject.userdirectory.ldap.OpencastLdapAuthoritiesPopulator.<init>(OpencastLdapAuthoritiesPopulator.java:93)[152:opencast-userdirectory-ldap:5.1.0]
at org.opencastproject.userdirectory.ldap.LdapUserProviderFactory.updated(LdapUserProviderFactory.java:257)[152:opencast-userdirectory-ldap:5.1.0]
at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)[3:org.apache.felix.configadmin:1.8.14]
at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)[3:org.apache.felix.configadmin:1.8.14]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1624)[3:org.apache.felix.configadmin:1.8.14]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1566)[3:org.apache.felix.configadmin:1.8.14]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.14]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.14]
2018-10-31 19:12:29,591 | INFO | (RestPublisher:333) - Registered REST endpoint at /admin-ng/users
<!-- ################ -->
<!-- # LDAP Support # -->
<!-- ################ -->
<bean id="contextSource"
class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<!-- URL of the LDAP server -->
<!-- "Distinguished name" for the unprivileged user -->
<!-- This user is merely to perform searches in the LDAP to find the users to login -->
<property name="userDn" value="cn=ldapuser,cn=Users,dc=ph-noe,dc=ac,dc=at" />
<!-- Password of the user above -->
<property name="password" value="xxxxxxxx" />
</bean>
<bean id="ldapAuthProvider"
class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
<constructor-arg>
<bean
class="org.springframework.security.ldap.authentication.BindAuthenticator">
<constructor-arg ref="contextSource" />
<!--
<property name="userDnPatterns">
<list>
<! - - Dn patterns to search for valid users. Multiple "<value>" tags are allowed - - >
<value>uid={0},ou=Group,dc=my-institution,dc=country</value>
</list>
</property>
-->
<!-- If your user IDs are not part of the user Dn's, you can use a search filter to find them -->
<!-- This property can be used together with the "userDnPatterns" above -->
<property name="userSearch">
<bean name="filterUserSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
<!-- Base Dn from where the users will be searched for -->
<constructor-arg index="0" value="ou=Mitarbeiter,dc=ph-noe,dc=ac,dc=at" />
<!-- Filter to located valid users. Use {0} as a placeholder for the login name -->
<constructor-arg index="1" value="(cn={0})" />
<constructor-arg ref="contextSource" />
</bean>
</property>
</bean>
</constructor-arg>
<!-- Defines how the user attributes are converted to authorities (roles) -->
<constructor-arg ref="authoritiesPopulator" />
</bean>
<!-- #################### -->
<!-- # OSGI Integration # -->
<!-- #################### -->
<!-- Obtain services from the OSGI service registry -->
<osgi:reference id="userDetailsService" cardinality="1..1"
interface="org.springframework.security.core.userdetails.UserDetailsService" />
<osgi:reference id="securityService" cardinality="1..1"
interface="org.opencastproject.security.api.SecurityService" />
<!-- Uncomment to enable external users e.g. used together shibboleth -->
<!-- <osgi:reference id="userReferenceProvider" cardinality="1..1"
interface="org.opencastproject.userdirectory.api.UserReferenceProvider" /> -->
<osgi:reference id="userDirectoryService" cardinality="1..1"
interface="org.opencastproject.security.api.UserDirectoryService" />
<osgi:reference id="authoritiesPopulator" cardinality="1..1"
interface="org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator"
filter="(instanceId=phnoe)"/>
and i use the file org.opencastproject.userdirectory.ldap-phnoe.cfg:
##
## ** PLEASE NOTE: EDITING THIS TEMPLATE HAS NO EFFECT!!! **
##
## In order to configure a new LDAP connection, please make a copy of this file in the same directory with the name:
##
## org.opencastproject.userdirectory.ldap-<ID>.cfg
##
## , where "<ID>" is an identifier, unique for each configured LDAP instance.
## Then, fill in the properties for the new LDAP connection below and ideally delete this header to avoid confusion
## A unique identifier for this connection. It only has effect within Opencast.
## May be different as the <ID> used above, but this is not recommended for clarity
## IMPORTANT: This identifier must be the same as the one used in the security.xml
## file to get a reference to an 'authoritiesPopulator'
## The URL to the LDAP server
org.opencastproject.userdirectory.ldap.url=ldap://
10.1.0.4:389
## The user and password used for LDAP authentication. If left commented, the LDAP provider will use an anonymous bind.
org.opencastproject.userdirectory.ldap.userDn=cn=ldapuser,cn=Users,dc=ph-noe,dc=ac,dc=at
org.opencastproject.userdirectory.ldap.password=xxxxxxxx
## The base path within LDAP to search for users
## Example: ou=people,dc=berkeley,dc=edu
org.opencastproject.userdirectory.ldap.searchbase=ou=Mitarbeiter,dc=ph-noe,dc=ac,dc=at
## The search filter to use for identifying users by ID
org.opencastproject.userdirectory.ldap.searchfilter=(samAccountName={0})
## The maximum number of users to cache
org.opencastproject.userdirectory.ldap.cache.size=1000
## The maximum number of minutes to cache a user
org.opencastproject.userdirectory.ldap.cache.expiration=5
## The comma-separated list of attributes that will be translated into roles.
## Note that the attributes will be converted to uppercase and that they may be prefixed with a string, as defined in the
## configuration below. Please refer to the documentation of the "roleprefix" property below.
## Example: berkeleyEduAffiliations,departmentNumber
org.opencastproject.userdirectory.ldap.roleattributes=
## The organization for this provider
## A prefix to be added to the roles read by this provider. It defaults to an empty string "", i.e. no prefix added.
## Please note that this property had previous a default value of "ROLE_", which is still recommended, but not mandatory.
##
## The prefix is *NOT* added to a role if any of the following conditions is met:
##
## * The role starts with any of the prefixes defined in the parameter 'exclude.prefixes'
## * The role was not actually read from the provider, but defined in the 'extra.roles' list below
org.opencastproject.userdirectory.ldap.roleprefix=
## A comma-separated list of prefixes. When the roles read from LDAP start with any of these, then the prefix defined
## above is not prepended to the role.
## Please note that if the "uppercase" parameter was provided, these prefixes are converted accordingly
org.opencastproject.userdirectory.ldap.exclude.prefixes=
## Whether or not the role names should be converted to uppercase. It defaults to "true".
## Please note that this setting affects the prefix defined above.
org.opencastproject.userdirectory.ldap.uppercase=true
## A comma-separated list of extra roles to apply to all the users authenticated with this LDAP instance
## The roles in this list are converted to uppercase if the corresponding parameter is set. However, the 'roleprefix'
## setting does not affect them -i.e. they will not be further modified even if 'roleprefix' is set.
org.opencastproject.userdirectory.ldap.extra.roles=