Skip to content

Commit

Permalink
better ldap defaulting and do not set ldap stuff in application yml
Browse files Browse the repository at this point in the history
  • Loading branch information
spaced committed Sep 19, 2024
1 parent dbd71e7 commit a40d7ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties

@ConfigurationProperties(prefix = "spring.ldap.search")
data class LdapSearchProperties (
val group: LdapSearchPattern,
val user: LdapSearchPattern,
val group: LdapSearchPattern = LdapSearchPattern("","member={0}"),
val user: LdapSearchPattern = LdapSearchPattern("","(uid={0})"),
val mapping: Map<String,String>? // mapping of spring-role -> ldap-role
)


data class LdapSearchPattern(
val base: String = "",
val filter: String
val filter: String = ""
)
14 changes: 1 addition & 13 deletions ebics-rest-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,7 @@ spring:
multipart:
max-file-size: "100MB"
max-request-size: "100MB"
ldap:
base: dc=example,dc=org
urls: ["ldap://localhost:1389"]
username: cn=admin,dc=example,dc=org
password: adminpassword
search:
group:
base: ou=users
filter: member={0}
user:
filter: (uid={0})
mapping:
readers: admin

logging:
pattern:
console: "%black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1}): %msg%n%throwable"
Expand Down

0 comments on commit a40d7ae

Please sign in to comment.