mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* test(rds): add JDBC-based IAM auth compat suite
New RdsJdbcCompatTest drives a real JDBC connection through the RDS
proxy. IAM auth happens at the JDBC wire layer, not through RdsClient
management calls, so this is the only way to actually verify IAM
auth behaves against Floci.
Covers:
- create DB instance with IAM authentication enabled
- generate an auth token via the AWS SDK GenerateAuthenticationToken
path and open a JDBC connection using that token as the password
- reject connections with a tampered/expired auth token
- proxy port allocation per instance, released on delete
- ModifyDbInstance toggling IAM authentication mid-lifecycle
Uses postgresql JDBC driver (already declared in
sdk-test-java/pom.xml:186). Gated on Docker being available so CI
jobs without a docker daemon skip.
* fix(test): address review findings for RDS JDBC compat suite
Restructure IAM toggle test to start with IAM disabled, verify
rejection, then enable via modify and verify success. Relax port
reuse assertion from exact equality to range check (7000-7099) to
avoid coupling to allocator implementation detail. Increase
connection timeout from 45s to 60s for Docker environments.
* fix(test): address round 6 review findings for RDS JDBC compat suite
Fix stale proxyPort after instance replacement (Codex + Gemini).
Restructure IAM tests: create with IAM enabled for positive tests,
add dedicated non-IAM instance test for negative case. Mark IAM
toggle-via-modify test as @Disabled since RdsAuthProxy.iamEnabled
is final and modifyDbInstance does not restart the proxy. Add
port-parameterized connection helpers for multi-instance tests.
* fix(test): assert old password rejection after ModifyDBInstance
Codex review flagged that the password-change test proved the new
password works but never verified the old one stops working. Add an
explicit assertion that connecting with the pre-modify password throws
SQLException before verifying the new password succeeds.
* fix(test): relax non-IAM rejection assertion to accept TCP-level refusal
When IAM is disabled, the proxy may reject at the TCP level ("connection
attempt failed") rather than the PostgreSQL auth level ("password
authentication failed"). Both are valid rejection modes.