-
Notifications
You must be signed in to change notification settings - Fork 77
fix(rr): inherit backend SSL for agent sandbox postgres (sslmode=no-verify) #334
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
charts/retool/ci/test-agent-sandbox-inherit-ssl-option.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| rr: | ||
|
|
||
| # Agent Sandbox — inherit an EXTERNAL, SSL-required Postgres. Complements | ||
| # test-agent-sandbox-inherit-postgres-option.yaml (which inherits the in-cluster | ||
| # subchart with SSL off). Here postgresql.enabled is false and the backend points | ||
| # at an external DB with config.postgresql.ssl_enabled: true, so the inherited | ||
| # AGENT_SANDBOX_POSTGRES_URL must carry ?sslmode=no-verify (regression guard for | ||
| # the SSL-inheritance fix; without it an SSL-required RDS rejects the connection | ||
| # with "no pg_hba.conf entry ... no encryption"). | ||
| # | ||
| # agentSandbox.postgres is left unset (only schema) so it inherits the backend. | ||
| agentSandbox: | ||
| enabled: true | ||
|
|
||
| image: | ||
| repository: tryretool/agent-sandbox-service | ||
| tag: 3.123.4 | ||
| pullPolicy: IfNotPresent | ||
|
|
||
| jwtPublicKey: '-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEljtqa2nhBwe/PqNhWgPHhj0jv8AI\nY+QUCicYtfv9wLGcEGPQuXoBQtuoIuOwXOdbEWgrQyLdIEb0YjegAW3miA==\n-----END PUBLIC KEY-----' | ||
| jwtPrivateKey: '-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMFXLiN/YsJv89D2YkEZ6/Dj5fujghENmYTOilwdChU3oAoGCCqGSM49\nAwEHoUQDQgAEljtqa2nhBwe/PqNhWgPHhj0jv8AIY+QUCicYtfv9wLGcEGPQuXoBQtuoIuOwXOdbEWgrQyLdIEb0YjegAW3miA==\n-----END EC PRIVATE KEY-----' | ||
| # encryption key is required (proxy derives the asset-token HMAC key from it) | ||
| encryptionKey: a12b01429fe0fe69a80da94e9e837ab2f1e9bda378ed8a25905a238f6fea6b7a | ||
| postgres: | ||
| schema: agent_executor | ||
|
|
||
| # Disable the in-cluster subchart and inherit an external SSL-required DB. | ||
| postgresql: | ||
| enabled: false | ||
| config: | ||
| postgresql: | ||
| host: agentdb-prod.postgres.database.example.com | ||
| port: 5432 | ||
| db: hammerhead_production | ||
| user: retool_internal_user | ||
| ssl_enabled: true | ||
| passwordSecretName: main-postgres-password | ||
| passwordSecretKey: postgresql-password |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new code path —
postgresql.enabled: false+config.postgresql.ssl_enabled: true+ inherited agent-sandbox postgres — is not exercised by anyci/YAML. All existing fixtures that hit theelse(inherit) branch usepostgresql.enabled: true/ssl_enabled: false, so$sslSuffixis always""in CI. If someone later changesretool.postgresql.ssl_enabledor theternarylogic, CI won't catch a regression in the external-SSL path. Adding a companion totest-agent-sandbox-inherit-postgres-option.yamlwithpostgresql.enabled: false,config.postgresql.host/ssl_enabled: true, and the required sandbox JWT keys would lock in the fix.