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

Externalizing DB password is not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Not A Bug
    • 2.2.1
    • None
    • connect
    • None
    • 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

            Unassigned Unassigned
            dwija Dwijadas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: