Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-7297: Implement AWS IAM Authent in debezium-connector-postgres #5133

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bpaquet
Copy link
Contributor

@bpaquet bpaquet commented Jan 2, 2024

Allow to use IAM authent with the custom AWS Driver: https://github.com/awslabs/aws-advanced-jdbc-wrapper.

I choose to not change the JDBCConfiguration class, because the change was too wide. So I just created a factory method to handle the two new params.

private static Logger LOGGER = LoggerFactory.getLogger(PostgresConnection.class);

private static final String URL_PATTERN = "jdbc:postgresql://${" + JdbcConfiguration.HOSTNAME + "}:${"
private static final String URL_PATTERN_WITHOUT_PROTOCOL = "${" + JdbcConfiguration.HOSTNAME + "}:${"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not it possible to pass the protocol as pattern placeholder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to change the JDBCConfiguration to do this, which is widely used, so it's simpler to me to do like this :)

…r/postgresql/PostgresConnectorConfig.java

Co-authored-by: Jiri Pechanec <jpechane@redhat.com>
Copy link

github-actions bot commented Jan 4, 2024

Hi @bpaquet, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@jpechane
Copy link
Contributor

@bpaquet I think we can sill salvage the PR even if it will not cover all the situations.

I'd recommend to add an integration test that will be using the JDBC URL passed as an config option.

Then after the merge we can think about merging Oracle, MySQL and PostgreSQL config options and allow all relational connectors to pass arbitrary JDBC connection string.

Copy link

Hi @bpaquet, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@jakeyheath
Copy link

This looks great, we also have a need to leverage IAM authentication to our RDS postgres. Any updates on the status of this being merged in?

@bpaquet
Copy link
Contributor Author

bpaquet commented Apr 25, 2024 via email

@jakeyheath
Copy link

Ah, we are use RDS Aurora as well. This is the line you are referring to?

For Aurora PostgreSQL, you cannot use IAM authentication to establish a replication connection.

@bpaquet
Copy link
Contributor Author

bpaquet commented Apr 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants