You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Dwijadas (Jira)" <ji...@apache.org> on 2019/10/31 12:03:02 UTC

[jira] [Created] (KAFKA-9122) Externalizing DB password is not working

Dwijadas created KAFKA-9122:
-------------------------------

             Summary: Externalizing DB password is not working
                 Key: KAFKA-9122
                 URL: https://issues.apache.org/jira/browse/KAFKA-9122
             Project: Kafka
          Issue Type: Bug
          Components: KafkaConnect
    Affects Versions: 2.2.1
         Environment: CentOS 6.7
            Reporter: Dwijadas


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 ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)