Repository navigation
Conversation
Tokens expire in 15 minutes and each query opens a new connection, so mint one per connect from the AWS default chain. Keep the configured sslMode, including verify-full, and load the RDS CA from tlsConfig.caCert. The provider image does not ship that bundle. Refs crossplane-contrib#347 Signed-off-by: krogon-bt <218959328+krogon-bt@users.noreply.github.com>
Mint a fresh RDS IAM token on each connect and send it with the cleartext plugin over the TLS mode already set on the ProviderConfig. tls=custom can verify Aurora with only the RDS CA secret. Signed-off-by: krogon-bt <218959328+krogon-bt@users.noreply.github.com>
Collaborator
|
duplicate of #396? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #347
Postgress
Summary
AWSIAMAuthcredential source and an optionalregionto the clusterProviderConfigand to the namespacedProviderConfigandClusterProviderConfig. The connection secret still suppliesendpoint,port, andusername.sslModethrough unchanged. WhentlsConfig.caCertis set forverify-caorverify-full, register that PEM with lib/pq.verify-fullchecks the chain and the hostname. This change does not create database users or grantrds_iam.Test plan
go testforpkg/clients/awsiam,pkg/clients/postgresql,pkg/controller/postgresql/connect, the cluster PostgreSQL controllers, andpkg/controller/namespaced/postgresql/providerProviderConfigstill connectssslMode: verify-full,tlsConfig.caCertpointing at the RDS global bundle, then a Database or Role reconcile that still succeeds after the provider has been up longer than 15 minutesMySQL
Summary
AWSIAMAuthand optionalregionto the cluster ProviderConfig, the namespaced ProviderConfig, and the ClusterProviderConfig. Each connect mints a new RDS IAM token from the AWS default chain (EKS Pod Identity) and uses it as the password.allowCleartextPasswordsonly for IAM, so the AWS plugin can send the token. Leavetlsas configured, including an explicit"false". A nil mode still becomespreferred.tls: customwith onlytlsConfig.caCert.clientCertandclientKeystay optional and must be set together. The RDS CA secret is registered with go-sql-driver, which sets the hostname check. Register keys include the config namespace.Test plan
go testthe MySQL client, cluster database/user/grant, and namespaced provider/tls packagesallowCleartextPasswordsand still acceptstls: "true",skip-verify,preferred,custom, and"false"source: AWSIAMAuth,tls: custom, and the RDS global bundle intlsConfig.caCert(no client cert)tls: "false"with IAM is rejected by AuroraauthenticationPlugin.name: AWSAuthenticationPlugin,authString: RDS), then reconcile through the IAM ProviderConfig