Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.Secret


    super(context);
  }

  public LdapService createLdapServer() throws OpsException, IOException {
    String id = random.randomAlphanumericString(8);
    Secret ldapServerPassword = randomSecret();

    LdapService service = new LdapService();
    service.dnsName = id + ".test.platformlayer.org";
    service.ldapServerPassword = ldapServerPassword;
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

      Object provided = ((javax.inject.Provider<?>) obj).get();
      return wrap(provided);
    }

    if (obj instanceof Secret) {
      Secret secret = (Secret) obj;
      String plaintext = secret.plaintext();
      return wrap(plaintext);
    }

    return super.wrap(obj);
  }
View Full Code Here

            value = defaultValue;
          } else {
            if (fieldType == Secret.class) {
              Passwords passwords = new Passwords();

              Secret secret = passwords.generateRandomPassword(12);
              value = secret;

            }
          }
View Full Code Here

public class IpsecHelpers {
  @Inject
  ProviderHelper providerHelper;

  public Secret getIpsecSecret() throws OpsException {
    Secret secret = null;

    for (ProviderOf<HasIpsecPolicy> ipsecPolicyProvider : providerHelper.listItemsProviding(HasIpsecPolicy.class)) {
      ItemBase item = ipsecPolicyProvider.getItem();

      if (item.getState() != ManagedItemState.ACTIVE) {
View Full Code Here

    return Secret.build(new String(password));
  }

  public Secret generateIpsecPSK() {
    while (true) {
      Secret s = generateRandomPassword(64, ALPHANUMERIC_CASE_SENSITIVE);
      // Avoid 'special' prefixes
      if (!s.plaintext().startsWith("0x")) {
        return s;
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.core.model.Secret

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.