Skip to content

Create Embedded LDAP Support Classes #8799

Open
@rwinch

Description

@rwinch

Currently it requires multiple beans to support embedded ldap support.

	@Bean
	UnboundIdContainer ldapContainer() {
		UnboundIdContainer container = new UnboundIdContainer("dc=springframework,dc=org",
				"classpath:users.ldif");
		container.setPort(0);
		return container;
	}

	@Bean
	DefaultSpringSecurityContextSource contextSource(UnboundIdContainer container) {
		return new DefaultSpringSecurityContextSource("ldap://localhost:" + container.getPort() + "/dc=springframework,dc=org");
	}

It would be nice to provide single builder that creates/shuts down the embedded database and creates a DefaultSpringSecurityContextSource similar to Spring's EmbeddedDatabaseBuilder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: ldapAn issue in spring-security-ldaptype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions