Repository navigation
Fixes #28299: mask plain text secrets left in service version history - #37975
Merged
Merged
Conversation
The coverage test from #33193 converted only the first secret-bearing branch of each oneOf and only checked that the property itself was no longer a Map, so a secret in a later branch, or a oneOf nested inside a typed value, passed unnoticed. Checking every branch through a walk that mirrors the password walkers finds three secrets still returned unmasked: - PowerBI GCS pbitFilesSource: securityConfig.gcpConfig.privateKey - Superset API connection: sslConfig certificates and key - MySQL GCP CloudSQL authType: password and gcpConfig.privateKey convertProperty now sets a property through its getter's type, so a typed property such as GCPCredentials can be run through its own converter, and the registry gains converters for GcpCloudSqlConfig, the PowerBI GCSConfig and SupersetApiConnection. MySQL's authType candidates include CloudSQL.
A converter that dropped a nested secret would have passed the previous check, which only looked for the original value and any mask in the JSON.
Contributor
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Choosing None for an optional oneOf (e.g. the Alation database connection)
submits {}, which converted to the first candidate class filled with schema
defaults.
Secrets below some oneOf branches (Databricks Pipeline auth, PowerBI GCS key, Superset SSL and Cloud SQL, MySQL Cloud SQL) were saved without encryption. migrate re-saves current services with the fixed converters; this 2.0.9 data step masks the plain text copies kept in entity_extension version rows.
Khairajani
force-pushed
the
mask-service-version-secrets
branch
from
November 17, 2026 12:10
39bc710 to
91df73f
Compare
The list now covers every format:password path of every service connection
in the releases from 1.11.0 to 2.0.8 and the current schemas, for all service
types and for Test Connection workflow versions, keyed on the config's own
type. Paths may cross arrays ([]) and maps whose every value is a secret ({}).
A workflow such as a query runner request has no serviceType, and looking up its secret paths with a null service entity threw out of the step.
Code Review ✅ Approved 🔴 High riskThe migration overwrites plaintext secrets in persisted version history across 13 service types, permanently removing those historical credential values. Adds a one-time VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
manerow
approved these changes
Nov 19, 2026
This was referenced Nov 19, 2026
Khairajani
added a commit
that referenced
this pull request
Nov 19, 2026
…istory (#37975) (#38185) * Fixes #28299: mask plain text secrets left in service version history (#37975) * Fixes #28299: mask secrets nested below every oneOf branch The coverage test from #33193 converted only the first secret-bearing branch of each oneOf and only checked that the property itself was no longer a Map, so a secret in a later branch, or a oneOf nested inside a typed value, passed unnoticed. Checking every branch through a walk that mirrors the password walkers finds three secrets still returned unmasked: - PowerBI GCS pbitFilesSource: securityConfig.gcpConfig.privateKey - Superset API connection: sslConfig certificates and key - MySQL GCP CloudSQL authType: password and gcpConfig.privateKey convertProperty now sets a property through its getter's type, so a typed property such as GCPCredentials can be run through its own converter, and the registry gains converters for GcpCloudSqlConfig, the PowerBI GCSConfig and SupersetApiConnection. MySQL's authType candidates include CloudSQL. * test: assert each nested secret field is masked, not just absent A converter that dropped a nested secret would have passed the previous check, which only looked for the original value and any mask in the JSON. * Keep an empty oneOf object as it is instead of converting it Choosing None for an optional oneOf (e.g. the Alation database connection) submits {}, which converted to the first candidate class filled with schema defaults. * Mask plain text connection secrets left in service version history Secrets below some oneOf branches (Databricks Pipeline auth, PowerBI GCS key, Superset SSL and Cloud SQL, MySQL Cloud SQL) were saved without encryption. migrate re-saves current services with the fixed converters; this 2.0.9 data step masks the plain text copies kept in entity_extension version rows. * test: cover the Superset Cloud SQL secrets in the version masking step * Mask every connection secret released versions left in version history The list now covers every format:password path of every service connection in the releases from 1.11.0 to 2.0.8 and the current schemas, for all service types and for Test Connection workflow versions, keyed on the config's own type. Paths may cross arrays ([]) and maps whose every value is a secret ({}). * Skip workflow versions that are not Test Connection requests A workflow such as a query runner request has no serviceType, and looking up its secret paths with a null service entity threw out of the step. (cherry picked from commit 31575e1) * Mask service version secrets from 2.1.0 too, including secret: values (cherry picked from commit a1cbc7f) * Use final locals and smaller test helpers * Use final in the version masking test * Name boolean locals as questions in version masking
Khairajani
added a commit
that referenced
this pull request
Nov 19, 2026
…istory (#37975) (#38184) * Fixes #28299: mask plain text secrets left in service version history (#37975) * Fixes #28299: mask secrets nested below every oneOf branch The coverage test from #33193 converted only the first secret-bearing branch of each oneOf and only checked that the property itself was no longer a Map, so a secret in a later branch, or a oneOf nested inside a typed value, passed unnoticed. Checking every branch through a walk that mirrors the password walkers finds three secrets still returned unmasked: - PowerBI GCS pbitFilesSource: securityConfig.gcpConfig.privateKey - Superset API connection: sslConfig certificates and key - MySQL GCP CloudSQL authType: password and gcpConfig.privateKey convertProperty now sets a property through its getter's type, so a typed property such as GCPCredentials can be run through its own converter, and the registry gains converters for GcpCloudSqlConfig, the PowerBI GCSConfig and SupersetApiConnection. MySQL's authType candidates include CloudSQL. * test: assert each nested secret field is masked, not just absent A converter that dropped a nested secret would have passed the previous check, which only looked for the original value and any mask in the JSON. * Keep an empty oneOf object as it is instead of converting it Choosing None for an optional oneOf (e.g. the Alation database connection) submits {}, which converted to the first candidate class filled with schema defaults. * Mask plain text connection secrets left in service version history Secrets below some oneOf branches (Databricks Pipeline auth, PowerBI GCS key, Superset SSL and Cloud SQL, MySQL Cloud SQL) were saved without encryption. migrate re-saves current services with the fixed converters; this 2.0.9 data step masks the plain text copies kept in entity_extension version rows. * test: cover the Superset Cloud SQL secrets in the version masking step * Mask every connection secret released versions left in version history The list now covers every format:password path of every service connection in the releases from 1.11.0 to 2.0.8 and the current schemas, for all service types and for Test Connection workflow versions, keyed on the config's own type. Paths may cross arrays ([]) and maps whose every value is a secret ({}). * Skip workflow versions that are not Test Connection requests A workflow such as a query runner request has no serviceType, and looking up its secret paths with a null service entity threw out of the step. (cherry picked from commit 31575e1) * Mask service version secrets from 2.1.0 too, including secret: values (cherry picked from commit a1cbc7f) * Drop the 2.1.0 note from the 2.0 masking step * Use final locals and smaller test helpers * Use final in the version masking test * Name boolean locals as questions in version masking
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.
Fixes #28299
Released versions (1.11 to 2.0.8) saved many connection secrets in plain text, mostly the ones below a
oneOfthe secrets code could not type.migratere-encrypts the current service rows, but the copies in the version history stay plain text. This PR masks them.Changes
2.0.9data step,ServiceVersionSecretsMasking, for MySQL and Postgres, run once throughrunOnce. It goes in2.0.9so it can be cherry-picked to2.0unchanged;2.1gets it with its next rebase on main.ServiceSecretPaths). There are no repositories or converters.format: passwordpath of every service connection, across the schemas of all releases from 1.11.0 to 2.0.8 plus main's: 460 paths over 139 connection types. It keeps fields main has since dropped, such assampleDataStorageConfig, and Delta Lake.type, sinceVertexAIhas different paths under LLM and ML model services. A path can cross an array ([], the MCPservers) or a map whose every value is a secret ({}, KafkaconsumerConfig).workflow(Test Connection requests), then each row by primary key.fernet:values,secret:references and masked values stay as they are, so running it again changes nothing.Unit test
ServiceVersionSecretsMaskingTestruns on real MySQL and Postgres (Testcontainers).VertexAIunder LLM vs ML model servicesEnd-to-end test: 2.0.7 upgraded to this branch (MySQL, ES 9.3)
oneOfbranch of every connector, with a unique marker in each of 632 secret fields. Each was saved 3 times, along with a Test Connection workflow. 2.0.7 accepted all 248.migratefrom this branch exited 0 and loggedMasked plain text secrets in 210 of 490 versions.certificates.sslConfig, SAP S/4HANAauthType, SSISdatabaseConnection.sslConfig, and the OpenMetadata service'ssecurityConfig.jwtTokenmigratedoes not re-save🤖 Generated with Claude Code


Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
Adds a one-time migration that masks plain text secrets in saved service and Test Connection versions on MySQL and PostgreSQL.
No new actionable issues found. Tests were inspected but not run.
Reviews (6) · Last reviewed commit: "Skip workflow versions that are not Test..." · Reviewed by Greptile