GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — feat(credentials): saved PostgreSQL, MySQL, and SQL Server connections by waleedlatif1 · Pull Request #9929 · simstudioai/sim Conversation
Collaborator
Summary
Compatibility
Product update (if relevant)Workspace and organization admins can save a database connection once in Integrations and share it across workflows and agents, so the password no longer sits in block fields. Setup is documented on the PostgreSQL, MySQL and SQL Server integration pages, including what each TLS mode actually guarantees. Type of Change
Testing
Checklist
Screenshots/Videos
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…read Oracle Database's saved-connection lookup now reads its row through one owner-scoped helper, so the saved database connections that follow bind to their owner and provider the same way instead of copying the query. Adds three service-account providers (postgresql-, mysql-, and mssql-service-account) that store a database connection: host, port, database, login, password, and the SSL mode or SQL Server encrypt and trust-certificate settings. Saving proves the connection with SELECT 1 through each family's own query operation, so host validation and IP pinning match a real run, and only then encrypts it; driver errors are never surfaced. The connection is read back inside the tool operation, bound to the run's workspace or organization, by withSavedDatabaseConnection, which replaces every connection field in the call so a caller or model cannot steer a shared credential. One client-safe descriptor table drives the provider ids, required fields, provider catalog, token resolvers, secret builders, and a shared connect modal. …a saved connection Every PostgreSQL, MySQL, and SQL Server tool now declares an optional service-account credential policy (required: false), so its inline connection fields keep working unchanged and a saved connection can stand in for them. The executor authorizes the selected credential and passes it through trusted context; the family's operation handler, wrapped by withSavedDatabaseConnection, reads the stored connection bound to the run's owner and replaces every connection field before parsing. The providers resolve inside the operation, like AWS, so they join OPERATION_RESOLVED_CREDENTIAL_PROVIDERS. A real-Postgres integration test saves a connection (SELECT 1 through the guarded path), refuses one the server rejects, runs a query on the saved connection whatever fields the call carries, and refuses it to another workspace and once revoked. postgresql_v2, mysql_v2, and mssql_v2 spread their legacy blocks and swap the connection fields (host, port, database, username, password, and SSL mode or SQL Server encrypt and trust-certificate settings) for a saved connection picker through withSavedCredential. Their canvas sentences drop the database clause the block no longer holds. The legacy blocks change only by hideFromToolbar and a legacy sunset pointing at the successor, so existing workflows keep their inline connection fields and run exactly as before. Generated block successors, docs, icon maps, and deployment metadata are regenerated. …nnections Each page's intro now explains adding a saved connection, how Sim proves it before saving, what every SSL mode or SQL Server TLS setting does in the runtime's drivers, and that existing workflows keep their inline connection fields. …e saved-connection schemas from the operations - Register the PostgreSQL, MySQL, and SQL Server families through registerSavedDatabaseFamily, which applies withSavedDatabaseConnection and records each tool id's service. A registry test now fails when a tool that names a saved database connection runs outside a wrapped family, the case the saved-credential contract skips for operation-resolved providers. - Build the stored connection schemas from each operation's own connection schema (bounds tightened, strict), so the TLS values and defaults have one source. Stored blobs decode exactly as before. - Reuse the SQL Server default connection timeout instead of repeating it, and parse a submitted connection once. - Unit tests prove save-then-run round trips and drive refusals through the run wrapper; the workspace and revocation cases stay in the integration test, which now runs through the registered operation. …apply them - MySQL Required verifies the certificate chain but not the host name (like VERIFY_CA), and both Preferred and Required refuse a server without TLS. - SQL Server Encrypt connection requests TLS; a server that does not support encryption gets an unencrypted session rather than an error. - PostgreSQL Preferred can be downgraded by an on-path attacker, so the hint and docs steer to Required when the server supports TLS. - Picker options are keyed by each operation schema's value type, so a mode the operations add or drop fails to compile instead of drifting. …redential-supplied params from one list The stored v1 schema now picks exactly the descriptor's login and TLS fields out of each operation schema instead of extending the whole schema, and the tools' credentialSuppliedParams come from the same list. An operation field added later can no longer change the stored blob, get pinned on every run, or stay visible on the credential-only block.
|
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
[High impact] Saved database credentials now reach PostgreSQL, MySQL, and SQL Server workflows. The connection paths appear sound, but the required API documentation must be added before merging. Findings
SummaryAdds encrypted saved connections for PostgreSQL, MySQL, and SQL Server.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 58 files
Confidence score: 4/5
database-connection.integration.ts ignores the host in TEST_DATABASE_URL, so valid IPv6 test environments may not run reliably. Derive the connection host and egress allowlist from databaseUrl.hostname.
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/credentials/__integration__/database-connection.integration.ts">
<violation number="1" location="apps/sim/lib/credentials/__integration__/database-connection.integration.ts:27">
P3: This fixture ignores the host from `TEST_DATABASE_URL`, so valid IPv6 test environments cannot run it reliably. Derive the connection host and the egress allowlist from `databaseUrl.hostname` (and preserve the URL’s bracketed IPv6 form).</violation>
</file>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…e-connections # Conflicts: # apps/sim/tools/generated/tool-metadata.ts
…carry TLS tradeoffs into the provider catalog The connection modal now refuses a port that is not a whole number from 1 to 65535 and says so beside the field, instead of a generic verify failure. The v2 provider catalog hint for saved PostgreSQL, MySQL, and SQL Server connections now includes each transport-security field's tradeoff, so API callers see what Preferred, Encrypt, and Trust server certificate give up. The integration fixture decodes the database name from TEST_DATABASE_URL.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cubic-dev-ai review this PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 59 files
Confidence score: 5/5
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| export function isDatabaseConnectionProviderId( | ||
| value: string | null | undefined | ||
| ): value is DatabaseConnectionProviderId { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Provider helpers lack documentation
The new exported helpers isDatabaseConnectionProviderId and getDatabaseConnectionDescriptor have no TSDoc. The repository requires TSDoc on exported APIs, so this requirement must be satisfied before merging. Add short comments explaining which IDs they accept and what they return for missing or unknown IDs.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
51422372
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.