Tabnine Logo
Authn
Code IndexAdd Tabnine to your IDE (free)

How to use
Authn
in
com.netflix.spinnaker.halyard.config.model.v1.security

Best Java code snippets using com.netflix.spinnaker.halyard.config.model.v1.security.Authn (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: spinnaker/halyard

public boolean isEnabled() {
 return getOauth2().isEnabled() || getSaml().isEnabled() || getLdap().isEnabled()
   || getX509().isEnabled() || getIap().isEnabled();
}
origin: com.netflix.spinnaker.halyard/halyard-config

@Override
public void validate(ConfigProblemSetBuilder p, Authn n) {
 if (!n.isEnabled() && maybeShouldBeEnabled(n)) {
  p.addProblem(Problem.Severity.WARNING, "An authentication method is fully or " +
    "partially configured, but not enabled. It must be enabled to take effect.");
 }
}
origin: spinnaker/halyard

public Authn getAuthn(String deploymentName) {
 Security security = getSecurity(deploymentName);
 Authn result = security.getAuthn();
 if (result == null) {
  result = new Authn();
  security.setAuthn(result);
 }
 return result;
}
origin: spinnaker/halyard

public void setAuthnMethod(String deploymentName, AuthnMethod method) {
 Authn authn = getAuthn(deploymentName);
 switch (method.getMethod()) {
  case OAuth2:
   authn.setOauth2((OAuth2) method);
   break;
  case SAML:
   authn.setSaml((Saml) method);
   break;
  case LDAP:
   authn.setLdap((Ldap) method);
   break;
  case X509:
   authn.setX509((X509) method);
   break;
  case IAP:
   authn.setIap((IAP) method);
   break;
  default:
   throw new RuntimeException("Unknown Authn method " + method.getMethod());
 }
}
origin: spinnaker/halyard

 SpringConfig(Security security) {
  OAuth2 oauth2 = security.getAuthn().getOauth2();
  if (oauth2.isEnabled()) {
   this.oauth2 = oauth2;
  }
 }
}
origin: spinnaker/halyard

 public LdapConfig(Security security) {
  if (!security.getAuthn().getLdap().isEnabled()) {
   return;
  }

  Ldap ldap = security.getAuthn().getLdap();

  this.enabled = ldap.isEnabled();
  this.url = ldap.getUrl();
  this.userDnPattern = ldap.getUserDnPattern();
  this.userSearchBase = ldap.getUserSearchBase();
  this.userSearchFilter = ldap.getUserSearchFilter();
 }
}
origin: spinnaker/halyard

 public X509Config(Security security) {
  if (!security.getAuthn().getX509().isEnabled()) {
   return;
  }

  X509 x509 = security.getAuthn().getX509();

  this.enabled = x509.isEnabled();
  if (StringUtils.isNotEmpty(x509.getRoleOid())) {
   this.roleOid = x509.getRoleOid();
  }
  if (StringUtils.isNotEmpty(x509.getNodeName())) {
   this.subjectPrincipalRegex = x509.getSubjectPrincipalRegex();
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

 public IAPConfig(Security security) {
  if (!security.getAuthn().getIap().isEnabled()) {
   return;
  }

  IAP iap = security.getAuthn().getIap();

  this.enabled = iap.isEnabled();
  if (StringUtils.isNotEmpty(iap.getAudience())) {
   this.audience = iap.getAudience();
  }
  if (StringUtils.isNotEmpty(iap.getJwtHeader())) {
   this.jwtHeader = iap.getJwtHeader();
  }
  if (StringUtils.isNotEmpty(iap.getIssuerId())) {
   this.issuerId = iap.getIssuerId();
  }
  if (StringUtils.isNotEmpty(iap.getIapVerifyKeyUrl())) {
   this.iapVerifyKeyUrl = iap.getIapVerifyKeyUrl();
  }
 }
}
origin: spinnaker/halyard

 public SamlConfig(Security security) {
  if (!security.getAuthn().getSaml().isEnabled()) {
   return;
  }

  Saml saml = security.getAuthn().getSaml();

  this.enabled = saml.isEnabled();
  this.issuerId = saml.getIssuerId();
  this.metadataUrl = "file:" + saml.getMetadataLocal();
  if (StringUtils.isNotEmpty(saml.getMetadataRemote())) {
   this.metadataUrl = saml.getMetadataRemote();
  }

  this.keyStore = "file:" + saml.getKeyStore();
  this.keyStoreAliasName = saml.getKeyStoreAliasName();
  this.keyStorePassword = saml.getKeyStorePassword();

  URL u = saml.getServiceAddress();
  this.redirectProtocol = u.getProtocol();
  this.redirectHostname = u.getHost();
  if (u.getPort() != -1) {
   this.redirectHostname += ":" + u.getPort();
  }
  if (StringUtils.isNotEmpty(u.getPath())) {
   this.redirectBasePath = u.getPath();
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public void setAuthnMethod(String deploymentName, AuthnMethod method) {
 Authn authn = getAuthn(deploymentName);
 switch (method.getMethod()) {
  case OAuth2:
   authn.setOauth2((OAuth2) method);
   break;
  case SAML:
   authn.setSaml((Saml) method);
   break;
  case LDAP:
   authn.setLdap((Ldap) method);
   break;
  case X509:
   authn.setX509((X509) method);
   break;
  case IAP:
   authn.setIap((IAP) method);
   break;
  default:
   throw new RuntimeException("Unknown Authn method " + method.getMethod());
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

 SpringConfig(Security security) {
  OAuth2 oauth2 = security.getAuthn().getOauth2();
  if (oauth2.isEnabled()) {
   this.oauth2 = oauth2;
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

 public LdapConfig(Security security) {
  if (!security.getAuthn().getLdap().isEnabled()) {
   return;
  }

  Ldap ldap = security.getAuthn().getLdap();

  this.enabled = ldap.isEnabled();
  this.url = ldap.getUrl();
  this.userDnPattern = ldap.getUserDnPattern();
  this.userSearchBase = ldap.getUserSearchBase();
  this.userSearchFilter = ldap.getUserSearchFilter();
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

 public X509Config(Security security) {
  if (!security.getAuthn().getX509().isEnabled()) {
   return;
  }

  X509 x509 = security.getAuthn().getX509();

  this.enabled = x509.isEnabled();
  if (StringUtils.isNotEmpty(x509.getRoleOid())) {
   this.roleOid = x509.getRoleOid();
  }
  if (StringUtils.isNotEmpty(x509.getNodeName())) {
   this.subjectPrincipalRegex = x509.getSubjectPrincipalRegex();
  }
 }
}
origin: spinnaker/halyard

 public IAPConfig(Security security) {
  if (!security.getAuthn().getIap().isEnabled()) {
   return;
  }

  IAP iap = security.getAuthn().getIap();

  this.enabled = iap.isEnabled();
  if (StringUtils.isNotEmpty(iap.getAudience())) {
   this.audience = iap.getAudience();
  }
  if (StringUtils.isNotEmpty(iap.getJwtHeader())) {
   this.jwtHeader = iap.getJwtHeader();
  }
  if (StringUtils.isNotEmpty(iap.getIssuerId())) {
   this.issuerId = iap.getIssuerId();
  }
  if (StringUtils.isNotEmpty(iap.getIapVerifyKeyUrl())) {
   this.iapVerifyKeyUrl = iap.getIapVerifyKeyUrl();
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

 public SamlConfig(Security security) {
  if (!security.getAuthn().getSaml().isEnabled()) {
   return;
  }

  Saml saml = security.getAuthn().getSaml();

  this.enabled = saml.isEnabled();
  this.issuerId = saml.getIssuerId();
  this.metadataUrl = "file:" + saml.getMetadataLocal();
  if (StringUtils.isNotEmpty(saml.getMetadataRemote())) {
   this.metadataUrl = saml.getMetadataRemote();
  }

  this.keyStore = "file:" + saml.getKeyStore();
  this.keyStoreAliasName = saml.getKeyStoreAliasName();
  this.keyStorePassword = saml.getKeyStorePassword();

  URL u = saml.getServiceAddress();
  this.redirectProtocol = u.getProtocol();
  this.redirectHostname = u.getHost();
  if (u.getPort() != -1) {
   this.redirectHostname += ":" + u.getPort();
  }
  if (StringUtils.isNotEmpty(u.getPath())) {
   this.redirectBasePath = u.getPath();
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public boolean isEnabled() {
 return getOauth2().isEnabled() || getSaml().isEnabled() || getLdap().isEnabled()
   || getX509().isEnabled() || getIap().isEnabled();
}
origin: com.netflix.spinnaker.halyard/halyard-config

 public boolean isAuth(DeploymentConfiguration deploymentConfiguration) {
  return deploymentConfiguration.getSecurity().getAuthn().isEnabled();
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public Authn getAuthn(String deploymentName) {
 Security security = getSecurity(deploymentName);
 Authn result = security.getAuthn();
 if (result == null) {
  result = new Authn();
  security.setAuthn(result);
 }
 return result;
}
origin: com.netflix.spinnaker.halyard/halyard-config

 /**
  * @return True if any core field in an authentication method has a non-empty value. "Core fields"
  * are generally required fields to make an authentication method work, such as client ID/secret,
  * or path to a certficate store.
  */
 private boolean maybeShouldBeEnabled(Authn n) {
  OAuth2 o = n.getOauth2();
  Saml s = n.getSaml();
  Ldap l = n.getLdap();
  IAP i = n.getIap();
  // There isn't a good "core fields" for X509

  return StringUtils.isNotEmpty(o.getClient().getClientId()) ||
    StringUtils.isNotEmpty(o.getClient().getClientSecret()) ||
    StringUtils.isNotEmpty(s.getIssuerId()) ||
    StringUtils.isNotEmpty(s.getKeyStore()) ||
    StringUtils.isNotEmpty(l.getUserDnPattern()) ||
    StringUtils.isNotEmpty(l.getUserSearchBase()) ||
    StringUtils.isNotEmpty(l.getUserSearchFilter()) ||
    StringUtils.isNotEmpty(i.getAudience());
 }
}
origin: spinnaker/halyard

 public boolean isAuth(DeploymentConfiguration deploymentConfiguration) {
  return deploymentConfiguration.getSecurity().getAuthn().isEnabled();
 }
}
com.netflix.spinnaker.halyard.config.model.v1.securityAuthn

Most used methods

  • getIap
  • getLdap
  • getOauth2
  • getSaml
  • getX509
  • isEnabled
  • <init>
  • setIap
  • setLdap
  • setOauth2
  • setSaml
  • setX509
  • setSaml,
  • setX509

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JOptionPane (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now