You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/04/09 09:12:00 UTC

[jira] [Updated] (CALCITE-3907) CassandraSchema ignores username and password if no port is specified

     [ https://issues.apache.org/jira/browse/CALCITE-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated CALCITE-3907:
------------------------------------
    Labels: pull-request-available  (was: )

> CassandraSchema ignores username and password if no port is specified
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-3907
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3907
>             Project: Calcite
>          Issue Type: Bug
>          Components: cassandra-adapter
>         Environment: Manjaro Linux with a remote Cassandra
>            Reporter: Thomas Heinemann
>            Priority: Major
>              Labels: pull-request-available
>
> The constructor of CassandraSchema which takes username and password parameters, but not the port ignores the username and password when delegating to the main constructor. Hence, the main constructor tries to establish an unauthenticated connection
> h2. Steps to reproduce:
>  # Configure a model.json like the following:
> {code:java}
> {
>   version: '1.0',
>   defaultSchema: 'twissandra',
>   schemas: [
>     {
>       name: 'twissandra',
>       type: 'custom',
>       factory: 'org.apache.calcite.adapter.cassandra.CassandraSchemaFactory',
>       operand: {
>         host: 'localhost',
>         keyspace: 'twissandra'
>         username: 'cassandra'
>         password: 'cassandra'
>       }
>     }
>   ]
> }
> {code}
>  # Disable unauthenticated connections to the cassandra instance (but make sure username and password in the model.json are correct, and that Cassandra listens on the default port, i.e. 9042)
>  # Use the model.json to connect to your Cassandra instance
> h2. Expected behaviour
> The connection is established using the username and password as given in the JSON
> h2. Actual behaviour
> The connection fails, because the connection was tried without using authentication



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