2

我很难在 Pentaho Data Integration (Kettle) 上与 Amazon RDS 创建新连接,Amazon 需要 CA 证书,但我不知道如何将其输入到连接中。

有人可以帮助我吗?

Tkx,

4

4 回答 4

2

从 Pentaho (PDI Kettle) 建立到 AWS (RDS) Aurora / MySQL 的安全连接 (SSL)

1. You need to create a new user id and Grant SSL rights to it. So this user id can connect to Aurora / MySQL only using Secured connection.
GRANT USAGE ON *.* TO 'admin'@'%' REQUIRE SSL
2. Download public RDS key (.pem fie) from AWS  (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html#Aurora.Overview.Security.SSL)
3. Downloaded file contains certificates / keys for each region. 
4. Split certificates from .PEM file into different .PEM files 
5. Use JDK keytool command utility to import all these PEM files into a single truststore (xyz.jks) file
    a. keytool -import -alias xyz.jks -file abc1.pem -keystore truststore
6. Configure JNDI entry for your Aurora / MySQL instance in Pentaho Properties File "data-integration\simple-jndi\jdbc.properties"
    a. Sample JNDI configuration 
    -------------------------------------------------------------------------
    RDSSecured/type=javax.sql.DataSource
    RDSSecured/driver=com.mysql.jdbc.Driver
    RDSSecured/user=admin
    RDSSecured/password=password
    RDSSecured/url=jdbc:mysql://REPLACE_WITH_RDS_ENDPOINT_HERE:3306/DATABASE_NAME?verifyServerCertificate=true&useSSL=true&requireSSL=true
    -------------------------------------------------------------------------
7. Make sure you copied MySQL connector jar in "lib" directory of your pentaho installation. Use connector version 5.1.21 or higher.
8. 
9. Create a copy of Spoon.bat / Spoon.sh based on your operating system E.g. Spoon_With_Secured_SSL_TO_RDS.bat or Spoon_With_Secured_SSL_TO_RDS.sh
10. Now we need to pass the truststore details to Pentaho at startup, so edit the copied script and append below mentioned arguments to OPT variable 
    a. -Djavax.net.ssl.trustStore="FULL_PATH\xyz.jks"
    b. -Djavax.net.ssl.trustStorePassword="YOUR_TRUSTSTORE_PASSWORD"
11. Use new script to start Spoon here after to establish the secure connection
12. Open/create your Job / Transformation
13. Go To View Tab - Database Connections and create new connection
    a. Connection Type: MySQL
    b. Access: JNDI
    c. JNDI Name: RDSSecured 
        i. Same as name used in JDBC.properties file
14. Test Connection and you are ready…. :)
于 2016-07-07T09:24:56.427 回答
1

我从未使用过 Amazon RDS,但 PDI 使用 JDBC 连接到大多数东西。我假设您已经下载了证书文件。然后关键是获取一个连接 URL,该 URL 将成功使用来自 Java 的证书。我建议编写一个简短的 Java 程序,它只连接到您的数据库。这个问题可能会有所帮助:

MySQL JDBC over SSL 问题

获得使用证书的 URL 后,将其粘贴到自定义连接 URL 文本框中的 PDI 连接定义中。请注意,要获取自定义连接 URL 字段,您必须使用通用连接类型,而不是 MySQL 连接类型。

于 2013-05-22T20:27:55.217 回答
1

终于让它工作了。就是这样。我不需要我的证书来做到这一点

  1. 使用 mySQL 驱动程序设置一个 ODBC DSN(您可能必须从 Oracle 下载它)测试它以确保它工作(记住您连接到 RDS中的端点)

  2. 在 Kettle 中获取通用数据库连接器(这不适用于带有 ODBC 或 JDBC 的 mySQL 连接器)输入您新创建的 DSN 输入用户名和密码

而已。有效!

我能够使用我的新连接器通过数据库表输入步骤访问查询。

于 2013-12-25T04:36:53.517 回答
0

如果这对其他人有帮助,在我尝试了很多没有成功的解决方案之后,包括 ODBC 选项。我解决了下载所需驱动程序以连接到 Amazon RDS 数据库的错误,因为我在连接到其他 mysql 服务器时没有问题,但我只有 RDS 有这个问题,所以从这个 url 下载:https ://www.oracle .com/database/technologies/jdbc-ucp-122-downloads.html 并解压 ojdbc8.jar 并将其放入 PDI 的 lib 文件夹中,重新启动 Spoon 即可连接常规的 jdbc 和 mysql联系。

于 2020-08-22T16:11:14.003 回答