Repository navigation
feat(redshift): offer TLS on the SQL endpoint with a configured certificate - #18
Merged
Merged
Conversation
…ficate Clients that send an SSLRequest get TLS 1.2/1.3 (rustls, ring) with the PEM certificate chain and key from services.redshift.tls.certFile/keyFile, so sslmode=verify-full works against a CA the client trusts. Plain connections stay accepted unless services.redshift.tls.require is true. GSSENCRequest is declined. The standalone binary reads DEVCLOUD_REDSHIFT_TLS_CERT_FILE, DEVCLOUD_REDSHIFT_TLS_KEY_FILE and DEVCLOUD_REDSHIFT_TLS_REQUIRE.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
変更の目的
Redshift の SQL エンドポイント(pgwire)で TLS を使えるようにしました。pushone-csa の runner は DWH に
sslmode=verify-full&sslrootcert=systemで接続し、この設定は変えられません。これまでの devcloud は SSLRequest を拒否していたため、data_load は COPY の前の接続で失敗していました(signity-inc/pushone-csa#113)。主な変更
.devcloud/config.yaml)devcloud upを実行したディレクトリからの相対になります。certFileとkeyFileは片方だけだと起動エラーにします。require: trueなのに証明書が無い場合も起動エラーです。devcloud-redshiftでは、環境変数DEVCLOUD_REDSHIFT_TLS_CERT_FILE/_KEY_FILE/_REQUIREで同じ指定ができます。'S'を返し、TLS 1.2 / 1.3(rustls)で接続します。'N'を返します。GSSENCRequest には常に'N'を返します。sslmode=disable)は、require: falseなら受け付けたままです。検証
cargo test --workspaceservices/redshift/tests/pgwire_tls.rs(新規)requireでの拒否psql sslmode=verify-full(SANdevcloud、ローカル CA)select 1が通ったsslmode=verify-full&sslrootcert=system、SSL_CERT_FILE)COPY FROM 's3://…' IAM_ROLE … FORMAT AS CSVで取り込めたrequire: truecompose.devcloud.yaml、Docker Desktop)successで終わり、assume→ssm→list→ssm→connect→stage→copy→applyを経て、CSV 3 行が表に入った