Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9122

Externalizing DB password is not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: KafkaConnect
    • Labels:
      None
    • Environment:
      CentOS 6.7

      Description

      Hi
      I am trying to externalizing user name and password for oracle DB using FileConfigProvider provider.

      For that i have created a properties file that contains user name and password.

       

      {{$ cat /home/kfk/data/ora_credentials.properties
      ora.username="apps"
      ora.password="Passw0rd!"}}

      Added the config providers as file and also the config.providers.file.class as FileConfigProvider in the worker config:

       

      {{$ cat /home/kfk/etc/kafka/connect-distributed.properties
      ...
      ...
      config.providers=file
      config.providers.file.class=org.apache.kafka.common.config.provider.FileConfigProvider
      ...
      ...}}

      Restarted the worker and submitted a task using REST with the following config

       

      {{"config": {
      "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
      "tasks.max": "1",
      "connection.user": "${file:/home/kfk/data/ora_credentials.properties:ora.username}",
      "connection.password": "${file:/home/kfk/data/ora_credentials.properties:ora.password}",
      ...
      ...
      }}}

      Submitting the above task resulting in the following error:

       

      {{

      { "error_code": 400, "message": "Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: ORA-01017: invalid username/password; logon denied\n for configuration Couldn't open connection to jdbc:oracle:thin:@oebsr122.infodetics.com:1521:VIS\nInvalid value java.sql.SQLException: ORA-01017: invalid username/password; logon denied\n for configuration Couldn't open connection to jdbc:oracle:thin:@oebsr122.infodetics.com:1521:VIS\nYou can also find the above list of errors at the endpoint `/\{connectorType}

      /config/validate`"
      }}}

      Assuming the above config does not replaces the user name and password at all rather entire values for connection.user and connection.password are used to connect to the DB resulting in ORA-01017: invalid username/password error.

      Is it a bug ?

        Attachments

        1. Screenshot_1.png
          5 kB
          Dwijadas

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dwija Dwijadas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: