Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6348

SecurityException in HDFS producer/consumer when no security configuration is present

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11.0
    • Fix Version/s: 2.10.5, 2.11.1, 2.12.0
    • Component/s: camel-hdfs
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In the HdfsProducer and HdfsConsumer classes, there are calls to get the current security configuration

      Configuration auth = Configuration.getConfiguration();
      

      in order to later reset them after HDFS tramples the system with its own config. However, if no security configuration was set, this throws a SecurityException like:

      Exception in thread "main" org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[hdfs://localhost:50001/tmp/camel/?splitStrategy=MESSAGES%3A4]. Reason: java.lang.SecurityException: Unable to locate a login configuration
      

      My current workaround is to set the system property "java.security.auth.login.config" to an empty file.

      It seems like the code should check if a configuration exists before fetching it.

        Attachments

        1. CAMEL-6348.patch
          6 kB
          David Arthur

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              mumrah David Arthur
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: