KerberosCredentialsService
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.nifi.kerberos.KerberosCredentialsService (Showing top 20 results out of 315)

origin: apache/nifi

protected KerberosUser createKeytabUser(final KerberosCredentialsService kerberosCredentialsService) {
  return new KerberosKeytabUser(kerberosCredentialsService.getPrincipal(), kerberosCredentialsService.getKeytab());
}
origin: apache/nifi

private HttpClient openConnection() throws IOException {
  HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
  if (sslContextService != null) {
    try {
      SSLContext sslContext = getSslSocketFactory(sslContextService);
      httpClientBuilder.setSSLContext(sslContext);
    } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | UnrecoverableKeyException | KeyManagementException e) {
      throw new IOException(e);
    }
  }
  if (credentialsService != null) {
    CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
    credentialsProvider.setCredentials(new AuthScope(null, -1, null),
      new KerberosKeytabCredentials(credentialsService.getPrincipal(), credentialsService.getKeytab()));
    httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
    Lookup<AuthSchemeProvider> authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider> create()
      .register(AuthSchemes.SPNEGO, new KerberosKeytabSPNegoAuthSchemeProvider()).build();
    httpClientBuilder.setDefaultAuthSchemeRegistry(authSchemeRegistry);
  }
  RequestConfig.Builder requestConfigBuilder = RequestConfig.custom();
  requestConfigBuilder.setConnectTimeout(connectTimeout);
  requestConfigBuilder.setConnectionRequestTimeout(connectTimeout);
  requestConfigBuilder.setSocketTimeout(connectTimeout);
  httpClientBuilder.setDefaultRequestConfig(requestConfigBuilder.build());
  return httpClientBuilder.build();
}
origin: apache/nifi

@Override
protected Collection<ValidationResult> customValidate(final ValidationContext validationContext) {
  boolean confFileProvided = validationContext.getProperty(HIVE_CONFIGURATION_RESOURCES).isSet();
  final List<ValidationResult> problems = new ArrayList<>();
  final KerberosCredentialsService credentialsService = validationContext.getProperty(KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class);
  final String resolvedPrincipal = credentialsService != null ? credentialsService.getPrincipal() : null;
  final String resolvedKeytab = credentialsService != null ? credentialsService.getKeytab() : null;
  if (confFileProvided) {
    final String configFiles = validationContext.getProperty(HIVE_CONFIGURATION_RESOURCES).evaluateAttributeExpressions().getValue();
    problems.addAll(hiveConfigurator.validate(configFiles, resolvedPrincipal, resolvedKeytab, validationResourceHolder, getLogger()));
  }
  return problems;
}
origin: apache/nifi

  keytab = explicitKeytab;
} else {
  principal = credentialsService.getPrincipal();
  keytab = credentialsService.getKeytab();
origin: apache/nifi

@Override
public void configure(PropertyContext context) {
  final String explicitPrincipal = context.getProperty(NIFI_KERBEROS_PRINCIPAL).evaluateAttributeExpressions().getValue();
  final String explicitKeytab = context.getProperty(NIFI_KERBEROS_KEYTAB).evaluateAttributeExpressions().getValue();
  final KerberosCredentialsService credentialsService = context.getProperty(ReportLineageToAtlas.KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class);
  if (credentialsService == null) {
    principal = explicitPrincipal;
    keytab = explicitKeytab;
  } else {
    principal = credentialsService.getPrincipal();
    keytab = credentialsService.getKeytab();
  }
}
origin: apache/nifi

principal = credentialsService.getPrincipal();
keytab = credentialsService.getKeytab();
origin: apache/nifi

principal = credentialsService.getPrincipal();
keytab = credentialsService.getKeytab();
origin: apache/nifi

principal = credentialsService.getPrincipal();
keytab = credentialsService.getKeytab();
origin: apache/nifi

principal = credentialsService.getPrincipal();
keytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

final KerberosCredentialsService credentialsService = context.getProperty(KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class);
final String resolvedPrincipal = credentialsService.getPrincipal();
final String resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

principal = credentialsService.getPrincipal();
keyTab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
origin: apache/nifi

  resolvedKeytab = explicitKeytab;
} else {
  resolvedPrincipal = credentialsService.getPrincipal();
  resolvedKeytab = credentialsService.getKeytab();
org.apache.nifi.kerberosKerberosCredentialsService

Most used methods

  • getKeytab
  • getPrincipal

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • BoxLayout (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)