Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Configuration
- @EnableWebSecurity(debug = true)
- public class SecurityConfig extends WebSecurityConfigurerAdapter {
- @Override
- public void configure(final AuthenticationManagerBuilder auth) throws Exception {
- auth
- .ldapAuthentication()
- .userSearchBase("")
- .userSearchFilter("(uid={0})")
- .groupSearchBase("ou=Groups")
- .groupSearchFilter("(uniqueMember={0})")
- .userDetailsContextMapper(new InetOrgPersonContextMapper())
- .contextSource(contextSource())
- .passwordCompare()
- .passwordAttribute("telephoneNumber")
- ;
- }
- @Bean
- public DefaultSpringSecurityContextSource contextSource() {
- return new DefaultSpringSecurityContextSource(
- Arrays.asList("ldap://localhost:" + LDAP_PORT + "/"), "dc=jbcpcalendar,dc=com");
- }
- }
- spring:
- ldap:
- embedded:
- ldif: classpath:/ldif/calendar.ldif
- baseDn: dc=jbcpcalendar,dc=com
- port: ${LDAP_PORT:33389}
- # credential:
- # username: user
- # password: secret
- subprojects {
- dependencies {
- compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
- // LDAP:
- // Not sure if I need and/or want this starter:
- compile("org.springframework.boot:spring-boot-starter-data-ldap:${project.'springboot.version'}")
- compile("org.springframework.ldap:spring-ldap-core:2.3.1.RELEASE")
- compile("org.springframework.security:spring-security-ldap:4.2.3.RELEASE")
- // Due to a artifact resolution issue with Gradle,
- // spring-tx must be pulled in or Gradle will fetch an older one that doesn’t work.
- compile("org.springframework:spring-tx")
- compile("com.unboundid:unboundid-ldapsdk")
- // Security:
- compile("org.springframework.boot:spring-boot-starter-security")
- }
- 06:16:37.706 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
- 06:16:37.706 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred evaluating root project 'chapter10.00-cas-server'.
- 06:16:37.706 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not find method compile() for arguments [org.springframework.boot:spring-boot-starter-data-ldap:1.5.3.RELEASE] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
- compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
- compile("org.springframework.boot:spring-boot-starter-web")
- compile("org.codehaus.groovy:groovy")
- // LDAP:
- // Not sure if I need and/or want this starter:
- compile("org.springframework.boot:spring-boot-starter-data-ldap")
- compile("org.springframework.ldap:spring-ldap-core:2.3.1.RELEASE")
- compile("org.springframework.security:spring-security-ldap:4.2.3.RELEASE")
- // Due to a artifact resolution issue with Gradle,
- // spring-tx must be pulled in or Gradle will fetch an older one that doesn’t work.
- compile("org.springframework:spring-tx")
- compile("com.unboundid:unboundid-ldapsdk")
- // Security:
- compile("org.springframework.boot:spring-boot-starter-security")
- 06:24:57.567 [QUIET] [system.out]
- 06:24:57.644 [QUIET] [system.out] __ ____ _ ____ __
- 06:24:57.645 [QUIET] [system.out] / / / ___| / / ___|
- 06:24:57.645 [QUIET] [system.out] | | | | / _ ___ | |
- 06:24:57.645 [QUIET] [system.out] | | | |___ / ___ ___) | | |
- 06:24:57.645 [QUIET] [system.out] | | ____| /_/ _ |____/ | |
- 06:24:57.645 [QUIET] [system.out] _ /_/
- 06:24:57.645 [QUIET] [system.out]
- 06:24:57.645 [QUIET] [system.out] CAS Version: 5.1.2
- 06:24:57.645 [QUIET] [system.out] CAS Commit Id: fae163b426ba91cc78a18e3805b2f2fac9c03b2e
- 06:24:57.645 [QUIET] [system.out] CAS Build Date/Time: 2017-09-20T12:19:37Z
- 06:24:57.645 [QUIET] [system.out] Spring Boot Version: 1.5.3.RELEASE
- 06:24:57.645 [QUIET] [system.out] ------------------------------------------------------------
- 06:24:57.645 [QUIET] [system.out] System Date/Time: 2017-09-20T06:24:57.372
- 06:24:57.645 [QUIET] [system.out] System Temp Directory: /var/folders/vm/nx7j7v8x4db1f4xsztj_rsmm0000gn/T/
- 06:24:57.646 [QUIET] [system.out] ------------------------------------------------------------
- 06:24:57.646 [QUIET] [system.out] Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
- 06:24:57.646 [QUIET] [system.out] Java Vendor: Oracle Corporation
- 06:24:57.646 [QUIET] [system.out] Java Version: 1.8.0_144
- 06:24:57.646 [QUIET] [system.out] JCE Installed: no
- 06:24:57.646 [QUIET] [system.out] ------------------------------------------------------------
- 06:24:57.646 [QUIET] [system.out] OS Architecture: x86_64
- 06:24:57.646 [QUIET] [system.out] OS Name: Mac OS X
- 06:24:57.646 [QUIET] [system.out] OS Version: 10.12.6
- 06:24:57.646 [QUIET] [system.out] ------------------------------------------------------------
- 06:24:57.646 [QUIET] [system.out] Apache Tomcat Version: Apache Tomcat/8.5.20
- 06:24:57.646 [QUIET] [system.out] ------------------------------------------------------------
- 06:24:57.646 [QUIET] [system.out]
- 06:24:57.646 [QUIET] [system.out]
- 06:24:57.833 [QUIET] [system.out] 2017-09-20 06:24:57.833 INFO 17183 --- [ main] .CasCoreBootstrapStandaloneConfiguration : Configuration files found at [/etc/cas/config] are [[/etc/cas/config/application.yml, /etc/cas/config/cas.properties]]
- 06:24:57.852 [QUIET] [system.out] 2017-09-20 06:24:57.852 INFO 17183 --- [ main] .CasCoreBootstrapStandaloneConfiguration : Found and loaded [14] setting(s) from [/etc/cas/config]
- 06:24:57.852 [QUIET] [system.out] 2017-09-20 06:24:57.852 INFO 17183 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: PropertiesPropertySource {name='standaloneCasConfigService'}
- 06:25:00.680 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
- 06:25:00.681 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
- 06:25:00.681 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
- 06:25:00.681 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
- 06:25:00.681 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
- 06:25:00.681 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
- 06:25:00.682 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
- 06:25:01.171 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
- 06:25:01.171 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] **Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java'' finished with exit value 1 (state: FAILED)**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement