org.apache.directory.server.kerberos.KerberosConfig Java Examples

The following examples show how to use org.apache.directory.server.kerberos.KerberosConfig. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KerberosKDCUtil.java    From quarkus-http with Apache License 2.0 6 votes vote down vote up
private static void startKDC() throws Exception {
    kdcServer = new KdcServer();
    kdcServer.setServiceName("Test KDC");
    kdcServer.setSearchBaseDn("ou=users,dc=undertow,dc=io");
    KerberosConfig config = kdcServer.getConfig();
    config.setServicePrincipal("krbtgt/[email protected]");
    config.setPrimaryRealm("UNDERTOW.IO");

    config.setPaEncTimestampRequired(false);

    UdpTransport udp = new UdpTransport("0.0.0.0", KDC_PORT);
    kdcServer.addTransports(udp);

    kdcServer.setDirectoryService(directoryService);
    kdcServer.start();
}
 
Example #2
Source File: ApacheDirectoryServer.java    From light-oauth2 with Apache License 2.0 6 votes vote down vote up
private static void startKDC() throws Exception {
    kdcServer = new KdcServer();
    kdcServer.setServiceName("Test KDC");
    kdcServer.setSearchBaseDn("ou=users,dc=undertow,dc=io");
    KerberosConfig config = kdcServer.getConfig();
    config.setServicePrincipal("krbtgt/[email protected]");
    config.setPrimaryRealm("UNDERTOW.IO");

    config.setPaEncTimestampRequired(false);

    UdpTransport udp = new UdpTransport("0.0.0.0", KDC_PORT);
    kdcServer.addTransports(udp);

    kdcServer.setDirectoryService(directoryService);
    kdcServer.start();
}
 
Example #3
Source File: ApacheDirectoryServer.java    From light-oauth2 with Apache License 2.0 6 votes vote down vote up
private static void startKDC() throws Exception {
    kdcServer = new KdcServer();
    kdcServer.setServiceName("Test KDC");
    kdcServer.setSearchBaseDn("ou=users,dc=undertow,dc=io");
    KerberosConfig config = kdcServer.getConfig();
    config.setServicePrincipal("krbtgt/[email protected]");
    config.setPrimaryRealm("UNDERTOW.IO");

    config.setPaEncTimestampRequired(false);

    UdpTransport udp = new UdpTransport("0.0.0.0", KDC_PORT);
    kdcServer.addTransports(udp);

    kdcServer.setDirectoryService(directoryService);
    kdcServer.start();
}
 
Example #4
Source File: KerberosEmbeddedServer.java    From keycloak with Apache License 2.0 6 votes vote down vote up
protected KdcServer createAndStartKdcServer() throws Exception {
    KerberosConfig kdcConfig = new KerberosConfig();
    kdcConfig.setServicePrincipal("krbtgt/" + this.kerberosRealm + "@" + this.kerberosRealm);
    kdcConfig.setPrimaryRealm(this.kerberosRealm);
    kdcConfig.setMaximumTicketLifetime(60000 * 1440);
    kdcConfig.setMaximumRenewableLifetime(60000 * 10080);
    kdcConfig.setPaEncTimestampRequired(false);
    Set<EncryptionType> encryptionTypes = convertEncryptionTypes();
    kdcConfig.setEncryptionTypes(encryptionTypes);

    kdcServer = new NoReplayKdcServer(kdcConfig);
    kdcServer.setSearchBaseDn(this.baseDN);

    UdpTransport udp = new UdpTransport(this.bindHost, this.kdcPort);
    kdcServer.addTransports(udp);

    kdcServer.setDirectoryService(directoryService);

    // Launch the server
    kdcServer.start();

    return kdcServer;
}
 
Example #5
Source File: KDCServerAnnotationProcessor.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
NoReplayKdcServer(KerberosConfig kdcConfig) {
    super(kdcConfig);
}
 
Example #6
Source File: KerberosEmbeddedServer.java    From keycloak with Apache License 2.0 4 votes vote down vote up
NoReplayKdcServer(KerberosConfig kdcConfig) {
    super(kdcConfig);
}