简体   繁体   English

如何从wso2bam连接到安全的cassandra

[英]how to connect to secure cassandra from wso2bam

In our setup, we have WSO2 BAM connecting an external Datastax Cassandra cluster. 在我们的设置中,我们有WSO2 BAM连接外部Datastax Cassandra集群。 here the WSO2 BAM is acting as Data Recvr and dumping data in external cassandra cluster. 这里WSO2 BAM充当Data Recvr并在外部cassandra集群中转储数据。

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. 我们想知道我们是否使用用户名/密码安全性来保护DSE cassandra集群。我们如何在WSO2 BAM中指定身份验证详细信息以安全地连接到DSE集群。

I read about cassandra-auth.xml in http://docs.wso2.org/wiki/display/SS103/Changing+the+Default+Cassandra+Configuration 我在http://docs.wso2.org/wiki/display/SS103/Changing+the+Default+Cassandra+Configuration中读到了关于cassandra-auth.xml的内容。

but seems like cassandra-auth.xml is more for authenticating into -management console UI 但似乎cassandra-auth.xml更多用于验证进入管理控制台UI

Please advice Thanks Rajiv Patil 请建议谢谢Rajiv Patil

You can provide username/password for cassandra datasource in configuration file found in BAM_HOME/repository/conf/datasources/master-datasources.xml 您可以在BAM_HOME/repository/conf/datasources/master-datasources.xml找到的配置文件中为cassandra数据源提供用户名/密码。

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, 在WSO2 BAM中,

For data insertion , cassandra authentication credentials will be given trough data agent (publisher) configuration. 对于数据插入,将通过数据代理(发布者)配置提供cassandra身份验证凭据。 Which are server credentials. 哪些是服务器凭据。 And those credentials will be used for server authentication as well as cassandra authentication. 这些凭据将用于服务器身份验证以及cassandra身份验证。 So basically particular tanent credentials will be used to authenticate Cassandra too. 因此,基本上特定的tanent凭证也将用于验证Cassandra。

And credentials in master-datasources.xml will only be used to retrieve data from cassandra for analytics. master-datasources.xml中的凭据仅用于从cassandra检索数据以进行分析。

The work around that is working for us - 这项工作对我们有用 -

We created the same user as the default WSO2 admin user (admin/admin) on the Cassandra. 我们在Cassandra上创建了与默认WSO2管理员用户(admin / admin)相同的用户。 With this the WSO2 BAM is able to successfully connect to a secured Cassandra (External). 有了这个,WSO2 BAM能够成功连接到安全的Cassandra(外部)。 Looks like by default WSO2 BAM is using the current admin user credentials for connecting to Cassandra as well. 默认情况下看起来WSO2 BAM也使用当前的管理员用户凭据连接到Cassandra。

Probably there should be an option in Cassandra-Component.xml to specify the username/password apart from the Cassandra Nodes in the cluster. 可能在Cassandra-Component.xml中应该有一个选项来指定除集群中的Cassandra节点之外的用户名/密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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