简体   繁体   中英

how to connect to secure cassandra from wso2bam

In our setup, we have WSO2 BAM connecting an external Datastax Cassandra cluster. here the WSO2 BAM is acting as Data Recvr and dumping data in external cassandra cluster.

We wanted to know if we secure the DSE cassandra cluster with username/password security.. how can we specify the authentication details in WSO2 BAM for connecting securely to DSE cluster.

I read about cassandra-auth.xml in http://docs.wso2.org/wiki/display/SS103/Changing+the+Default+Cassandra+Configuration

but seems like cassandra-auth.xml is more for authenticating into -management console UI

Please advice Thanks Rajiv Patil

You can provide username/password for cassandra datasource in configuration file found in BAM_HOME/repository/conf/datasources/master-datasources.xml

EDIT-

Here's a sample configuration which is the default

<datasource>
        <name>WSO2BAM_CASSANDRA_DATASOURCE</name>
        <description>The datasource used for Cassandra data</description>
        <definition type="RDBMS">
            <configuration>
                <url>jdbc:cassandra://localhost:9160/EVENT_KS</url>
                <username>admin</username>
                <password>admin</password>
            </configuration>
        </definition>
</datasource>

In WSO2 BAM,

For data insertion , cassandra authentication credentials will be given trough data agent (publisher) configuration. Which are server credentials. And those credentials will be used for server authentication as well as cassandra authentication. So basically particular tanent credentials will be used to authenticate Cassandra too.

And credentials in master-datasources.xml will only be used to retrieve data from cassandra for analytics.

The work around that is working for us -

We created the same user as the default WSO2 admin user (admin/admin) on the Cassandra. With this the WSO2 BAM is able to successfully connect to a secured Cassandra (External). Looks like by default WSO2 BAM is using the current admin user credentials for connecting to Cassandra as well.

Probably there should be an option in Cassandra-Component.xml to specify the username/password apart from the Cassandra Nodes in the cluster.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM