[
https://issues.apache.org/jira/browse/CALCITE-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17140657#comment-17140657
]
Michael Mior commented on CALCITE-3907:
---------------------------------------
Fixed in
[{{3e98d75}}|https://github.com/apache/calcite/commit/3e98d75720218715fca0fefe0d5c898d750606ef]
> 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
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)