Examples of KdcConfiguration


Examples of org.apache.kerberos.service.KdcConfiguration

                props.setProperty(key, (String) env.get(key));
            }
        }

        // construct the configuration, get the port, create the service, and prepare kdc objects
        KdcConfiguration config = new KdcConfiguration(props);
        int port = PropertiesUtils.get(env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT);
        Service service = new Service("kerberos", TransportType.DATAGRAM, new InetSocketAddress(port));
        LdapContext ctx = getBaseRealmContext(config, env);
        PrincipalStore store = new JndiPrincipalStoreImpl(ctx, new LdapName("ou=Users"));
        SamSubsystem.getInstance().setUserContext((DirContext) ctx, "ou=Users");
View Full Code Here

Examples of org.apache.kerberos.service.KdcConfiguration

                props.setProperty( key, ( String ) env.get( key ) );
            }
        }

        // construct the configuration, get the port, create the service, and prepare kdc objects
        KdcConfiguration config = new KdcConfiguration( props );
        int port = PropertiesUtils.get( env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT );
        Service service= new Service( "kerberos", TransportType.DATAGRAM, new InetSocketAddress( port ) );
        LdapContext ctx = getBaseRealmContext( config, env );
        PrincipalStore store = new JndiPrincipalStoreImpl( ctx, new LdapName( "ou=Users" ) );
        SamSubsystem.getInstance().setUserContext( ( DirContext ) ctx, "ou=Users" );
View Full Code Here

Examples of org.wso2.carbon.apacheds.KdcConfiguration

            }
        } else {
            logger.info("KDC server is disabled.");
            return;
        }
        this.kdcConfigurations = new KdcConfiguration();
        this.kdcConfigurations.setKdcName(propertyMap.get("name"));
        try {
            this.kdcConfigurations.setKdcCommunicationProtocol(propertyMap.get("protocol"));
        } catch (DirectoryServerException e) {
            String errorMessage = "Can not read/set protocol parameter in KDCConfig.";
View Full Code Here

Examples of org.wso2.carbon.apacheds.KdcConfiguration

    }

    public void testBuildKDCConfigurations ()
            throws DirectoryServerException, EmbeddingLDAPException {

        KdcConfiguration kdcConfigs = this.configurationBuilder.getKdcConfigurations();

        assertTrue(this.configurationBuilder.isKdcEnabled());

        assertEquals(kdcConfigs.getKdcCommunicationProtocol(), KdcConfiguration.ProtocolType.TCP_PROTOCOL);
        assertEquals(kdcConfigs.getKdcHostAddress(), "ldap.wso2.com");
        assertEquals(kdcConfigs.getKdcCommunicationPort(), 8000); // should get the default value
        assertEquals(kdcConfigs.getMaxTicketLifeTime(), 8640000);
        assertEquals(kdcConfigs.getMaxRenewableLifeTime(), 604800000);
        assertFalse(kdcConfigs.isPreAuthenticateTimeStampRequired());

      
    }
View Full Code Here

Examples of org.wso2.carbon.apacheds.KdcConfiguration

        partitionInfo.setKdcEnabled(true);

        partitionManager.addPartition(partitionInfo);
        assertTrue("Partition has not created", partitionManager.partitionInitialized(partitionInfo.getPartitionId()));

        KdcConfiguration config = new KdcConfiguration(partitionInfo);
        //config.setPrimaryRealm("EXAMPLE.COM");

        server =
            DirectoryServiceFactory.createKDCServer(DirectoryServiceFactory.LDAPServerType.APACHE_DIRECTORY_SERVICE);
        server.init(config, this.embeddedLdap);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.