This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f8843238e9f0001ab10cf0e6a19514698d993b8f
Author: marius cornescu <marius_corne...@yahoo.com>
AuthorDate: Sat Sep 21 13:19:08 2019 +0200

    CAMEL-13998 - Documentation
---
 .../camel-hdfs/src/main/docs/hdfs-component.adoc       | 17 +++++++++++++++--
 .../apache/camel/component/hdfs/HdfsConfiguration.java |  4 +++-
 .../kerberos/HdfsKerberosConfigurationFactory.java     |  2 +-
 .../endpoint/dsl/HdfsEndpointBuilderFactory.java       | 18 ++++++++++++------
 4 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/components/camel-hdfs/src/main/docs/hdfs-component.adoc 
b/components/camel-hdfs/src/main/docs/hdfs-component.adoc
index 8ae81b9..2dba04a 100644
--- a/components/camel-hdfs/src/main/docs/hdfs-component.adoc
+++ b/components/camel-hdfs/src/main/docs/hdfs-component.adoc
@@ -101,8 +101,8 @@ with the following path and query parameters:
 | *fileSystemType* (common) | Set to LOCAL to not use HDFS but local 
java.io.File instead. | HDFS | HdfsFileSystemType
 | *fileType* (common) | The file type to use. For more details see Hadoop HDFS 
documentation about the various files types. | NORMAL_FILE | HdfsFileType
 | *kerberosConfigFileLocation* (common) | The location of the kerb5.conf file 
(\https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html) | 
 | String
-| *kerberosKeytabLocation* (common) | The location of the keytab file used to 
authenticate with the kerberos nodes |  | String
-| *kerberosNamedNodes* (common) | A comma separated list of kerberos nodes 
(e.g. host01.example.com:8021,host02.example.com:8021,host03.example.com:8025) 
|  | String
+| *kerberosKeytabLocation* (common) | The location of the keytab file used to 
authenticate with the kerberos nodes (contains pairs of kerberos principals and 
encrypted keys (which are derived from the Kerberos password)) |  | String
+| *kerberosNamedNodes* (common) | A comma separated list of kerberos nodes 
(e.g. srv11.example.com:8021,srv12.example.com:8021) - see kerb5.conf file 
(\https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html) | 
 | String
 | *kerberosUsername* (common) | The username used to authenticate with the 
kerberos nodes |  | String
 | *keyType* (common) | The type for the key in case of sequence or map files. 
| NULL | WritableType
 | *owner* (common) | The file owner must match this owner for the consumer to 
pickup the file. Otherwise the file is skipped. |  | String
@@ -322,3 +322,16 @@ resource with bundle that contains blueprint definition.
 
 This way Hadoop 2.x will have correct mapping of URI schemes to
 filesystem implementations.
+
+=== Using this component with Kerberos authentication
+
+The kerberos config file is read when the camel component is created, not when 
the endpoint is created.
+Because of this, the config file must be set at startup, with a call like:
+
+[source,java]
+------------------------------------------------------------------------------------------------------
+static {
+  
HdfsKerberosConfigurationFactory.setKerberosConfigFile("/etc/security/kerb5.conf");
+}
+------------------------------------------------------------------------------------------------------
+
diff --git 
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
 
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
index c43284c..5a9d1d7 100644
--- 
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
+++ 
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
@@ -574,7 +574,8 @@ public class HdfsConfiguration {
     }
 
     /**
-     * A comma separated list of kerberos nodes (e.g. 
host01.example.com:8021,host02.example.com:8021,host03.example.com:8025)
+     * A comma separated list of kerberos nodes
+     * (e.g. srv11.example.com:8021,srv12.example.com:8021) - see kerb5.conf 
file 
(https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html)
      */
     public void setKerberosNamedNodes(String kerberosNamedNodes) {
         this.kerberosNamedNodes = kerberosNamedNodes;
@@ -612,6 +613,7 @@ public class HdfsConfiguration {
 
     /**
      * The location of the keytab file used to authenticate with the kerberos 
nodes
+     * (contains pairs of kerberos principals and encrypted keys (which are 
derived from the Kerberos password))
      */
     public void setKerberosKeytabLocation(String kerberosKeytabLocation) {
         this.kerberosKeytabLocation = kerberosKeytabLocation;
diff --git 
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/kerberos/HdfsKerberosConfigurationFactory.java
 
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/kerberos/HdfsKerberosConfigurationFactory.java
index 45d63e9..2ae92f1 100644
--- 
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/kerberos/HdfsKerberosConfigurationFactory.java
+++ 
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/kerberos/HdfsKerberosConfigurationFactory.java
@@ -23,7 +23,7 @@ public class HdfsKerberosConfigurationFactory {
         if (krb5Conf == null || !krb5Conf.isEmpty()) {
             System.setProperty(KERBEROS_5_SYS_ENV, kerberosConfigFileLocation);
         } else if (!krb5Conf.equalsIgnoreCase(kerberosConfigFileLocation)) {
-            LOGGER.warn("{} was already configured with: {}", 
KERBEROS_5_SYS_ENV, krb5Conf);
+            LOGGER.warn("[{}] was already configured with: [{}] config file", 
KERBEROS_5_SYS_ENV, krb5Conf);
         }
     }
 
diff --git 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/HdfsEndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/HdfsEndpointBuilderFactory.java
index 9b018ee..8f9b801 100644
--- 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/HdfsEndpointBuilderFactory.java
+++ 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/HdfsEndpointBuilderFactory.java
@@ -146,7 +146,8 @@ public interface HdfsEndpointBuilderFactory {
         }
         /**
          * The location of the keytab file used to authenticate with the
-         * kerberos nodes.
+         * kerberos nodes (contains pairs of kerberos principals and encrypted
+         * keys (which are derived from the Kerberos password)).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -159,7 +160,8 @@ public interface HdfsEndpointBuilderFactory {
         }
         /**
          * A comma separated list of kerberos nodes (e.g.
-         * 
host01.example.com:8021,host02.example.com:8021,host03.example.com:8025).
+         * srv11.example.com:8021,srv12.example.com:8021) - see kerb5.conf file
+         * 
(https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -1130,7 +1132,8 @@ public interface HdfsEndpointBuilderFactory {
         }
         /**
          * The location of the keytab file used to authenticate with the
-         * kerberos nodes.
+         * kerberos nodes (contains pairs of kerberos principals and encrypted
+         * keys (which are derived from the Kerberos password)).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -1143,7 +1146,8 @@ public interface HdfsEndpointBuilderFactory {
         }
         /**
          * A comma separated list of kerberos nodes (e.g.
-         * 
host01.example.com:8021,host02.example.com:8021,host03.example.com:8025).
+         * srv11.example.com:8021,srv12.example.com:8021) - see kerb5.conf file
+         * 
(https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -1706,7 +1710,8 @@ public interface HdfsEndpointBuilderFactory {
         }
         /**
          * The location of the keytab file used to authenticate with the
-         * kerberos nodes.
+         * kerberos nodes (contains pairs of kerberos principals and encrypted
+         * keys (which are derived from the Kerberos password)).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -1719,7 +1724,8 @@ public interface HdfsEndpointBuilderFactory {
         }
         /**
          * A comma separated list of kerberos nodes (e.g.
-         * 
host01.example.com:8021,host02.example.com:8021,host03.example.com:8025).
+         * srv11.example.com:8021,srv12.example.com:8021) - see kerb5.conf file
+         * 
(https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 

Reply via email to