Package org.platformlayer.service.openldap.model

Examples of org.platformlayer.service.openldap.model.LdapDomain


    openFirewall(ldapService, LdapServiceController.PORT);
    Assert.assertTrue(isPortOpen(socketAddress));

    String organizationName = "test.platformlayer.org";
    LdapDomain ldapDomain = openLdap.createLdapDomain(ldapService, organizationName);

    // TODO: Make endpoint ldap://<ip>:<port>/ ???
    String ldapUrl = "ldap://" + socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort() + "/";
    testLdap(ldapUrl, ldapDomain.adminPassword);
  }
View Full Code Here


        ldapService.ldapServerPassword = passwords.generateRandomPassword(12);
      }
    }

    if (item instanceof LdapDomain) {
      LdapDomain ldapService = (LdapDomain) item;
      Passwords passwords = new Passwords();

      if (Secret.isNullOrEmpty(ldapService.adminPassword)) {
        ldapService.adminPassword = passwords.generateRandomPassword(12);
      }
View Full Code Here

  public LdapDomain createLdapDomain(LdapService ldapService, String organizationName) throws OpsException,
      IOException {
    String domainId = "domain-" + ldapService.getId();
    Secret adminPassword = randomSecret();
    LdapDomain domain = new LdapDomain();
    domain.organizationName = organizationName;
    domain.adminPassword = adminPassword;
    domain = context.putItem(domainId, domain);
    domain = context.waitForHealthy(domain);
View Full Code Here

  public void doOperation(LdapDomain ldapDomain) throws OpsException, IOException {
  }

  @Override
  protected void addChildren() throws OpsException {
    LdapDomain ldapDomain = OpsContext.get().getInstance(LdapDomain.class);
    String hostName = ldapDomain.organizationName;

    LdapDN ldapBase = LdapServerUtilities.createBaseDN(hostName);

    File dataRoot = new File("/var/ldap/data");
View Full Code Here

    LdapService ldapService = openLdap.createLdapServer();

    openFirewall(ldapService, LdapServiceController.PORT);

    String organizationName = "test.platformlayer.org";
    LdapDomain ldapDomain = openLdap.createLdapDomain(ldapService, organizationName);

    String id = "git" + random.randomAlphanumericString(8);

    GitService service = new GitService();
    service.dnsName = id + ".test.platformlayer.org";
View Full Code Here

  LdapDomain getLdapDomain() throws OpsException {
    if (ldapDomain == null) {
      GitService model = OpsContext.get().getInstance(GitService.class);
      LdapDN ldapGroup = LdapDN.parseLdifEncoded(model.ldapGroup);

      LdapDomain best = null;
      for (LdapDomain candidate : platformLayer.listItems(LdapDomain.class)) {
        switch (candidate.getState()) {
        case DELETE_REQUESTED:
        case DELETED:
          continue;
View Full Code Here

    }
  }

  @Override
  public void buildTemplateModel(Map<String, Object> model) throws OpsException {
    LdapDomain ldapDomain = getLdapDomain();
    LdapService ldapService = getLdapService();

    LdapDN organizationDN = LdapDN.fromDomainName(ldapDomain.organizationName);
    LdapDN allUsersDN = organizationDN.childDN("ou", "Users");
    LdapDN managerDN = organizationDN.childDN("cn", "Manager");
View Full Code Here

TOP

Related Classes of org.platformlayer.service.openldap.model.LdapDomain

Copyright © 2018 www.massapicom. 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.