示例#1
0
  public List<SelectItem> getSecurityMechanismForWspList() {
    List<SelectItem> items = new ArrayList<SelectItem>();

    items.add(
        new SelectItem(
            SecurityMechanism.ANONYMOUS.toInt(), SecurityMechanism.ANONYMOUS.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.SAML_HOK.toInt(), SecurityMechanism.SAML_HOK.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.SAML_SV.toInt(), SecurityMechanism.SAML_SV.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.SAML2_HOK.toInt(), SecurityMechanism.SAML2_HOK.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.SAML2_SV.toInt(), SecurityMechanism.SAML2_SV.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.USERNAME_TOKEN.toInt(),
            SecurityMechanism.USERNAME_TOKEN.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.USERNAME_TOKEN_PLAIN.toInt(),
            SecurityMechanism.USERNAME_TOKEN_PLAIN.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.KERBEROS_TOKEN.toInt(),
            SecurityMechanism.KERBEROS_TOKEN.toLocaleString()));
    items.add(
        new SelectItem(
            SecurityMechanism.X509_TOKEN.toInt(), SecurityMechanism.X509_TOKEN.toLocaleString()));

    return items;
  }
示例#2
0
  private void initialize() {

    this.setWspServiceEndPoint("http://<wsp-host-name:portnumber>/<webService>");
    this.setWspSecurityMechanisms(
        new Integer[] {
          SecurityMechanism.SAML2_HOK.toInt(),
          SecurityMechanism.SAML2_SV.toInt(),
          SecurityMechanism.USERNAME_TOKEN.toInt(),
          SecurityMechanism.X509_TOKEN.toInt()
        });
    this.setWspAuthenticationChain(null);

    this.setResponseSigned(false);
    this.setResponseEncrypted(false);
    this.setRequestSignatureVerified(true);
    this.setRequestHeaderDecrypted(false);
    this.setRequestDecrypted(false);

    this.setWscServiceName("WebServiceName");
    this.setWscSecurityMechanism(SecurityMechanism.STS_SECURITY.toInt());
    this.setConfigureWsc(false);

    this.setEncryptionAlgorithm(EncryptionAlgorithm.AES_256.toInt());
    this.setUserNameTokenUserName(null);
    this.setUserNameTokenPassword(null);
    this.setX509TokenSigningReferenceType(X509SigningRefType.DIRECT.toInt());
    this.setKerberosDomain(null);
    this.setKerberosDomainServer(null);
    this.setKerberosServicePrincipal(null);
    this.setKerberosTicketCache(null);

    List<SelectItem> stsConfigs = this.getStsConfigurationNameList();
    if (stsConfigs.size() == 1) {
      SelectItem stsConfig = stsConfigs.iterator().next();
      this.setStsConfigurationName((String) stsConfig.getValue());
    } else {
      this.setStsConfigurationName(null);
    }

    List<SelectItem> aliases = this.getPrivateKeyAliasList();
    if (aliases.size() == 1) {
      SelectItem alias = aliases.iterator().next();
      this.setPrivateKeyAlias(alias.getLabel());
    } else {
      this.setPrivateKeyAlias(null);
    }

    aliases = this.getPublicKeyAliasList();
    if (aliases.size() == 1) {
      SelectItem alias = aliases.iterator().next();
      this.setPublicKeyAlias(alias.getLabel());
    } else {
      this.setPublicKeyAlias(null);
    }

    this.setSummaryRealm(new WssCreateWizardSummaryRealm(this));
    this.setSummaryServiceEndPoint(new WssCreateWizardSummaryServiceEndPoint(this));
    this.setSummaryWspSecurity(new WssCreateWizardSummaryWspSecurity(this));
    this.setSummaryServiceName(new WssCreateWizardSummaryServiceName(this));
    this.setSummaryWscSecurity(new WssCreateWizardSummaryWscSecurity(this));
    this.setSummarySignEncrypt(new WssCreateWizardSummarySignEncrypt(this));
    this.setSummaryKeyAliases(new WssCreateWizardSummaryKeyAliases(this));
    this.setSummaryEncryptAlgorithm(new WssCreateWizardSummaryEncryptAlgorithm(this));
  }