Skip to content

mongo options field description overstates the refusal: says "credential material is refused", true only for auth.password #9254

Description

@os-project-manager

What

MongoConfigSchema.options' field description in packages/spec/src/data/driver/mongo.zod.ts:139 reads:

Extra MongoClient options (replicaSet, tls, timeouts, …; credential material is refused — bind secrets via the connection form / external.credentialsRef)

This string is rendered verbatim into two places an author configuring a mongo datasource actually reads:

  • content/docs/references/data/driver-mongo.mdx (auto-generated by build-docs.ts, options row)
  • the Studio "Add Datasource" connection form's field help text (the same schema is projected to JSON Schema for DriverDefinitionSchema.configSchema / GET /api/v1/datasources/drivers, per the callout in content/docs/data-modeling/drivers.mdx)

Why it's wrong (measured)

"credential material is refused" is true for exactly one nested path — options.auth.password (refused via MONGO_OPTIONS_CREDENTIAL_PATHS in driver/common.zod.ts, landed by #9040). It is not true for four other honoured, credential-shaped keys the same options passthrough accepts and stores at rest in cleartext (measured, PASSTHROUGH_SECRET_PATHS in packages/spec/src/data/datasource-credential-redaction.ts):

  • options.proxyPassword
  • options.tlsCertificateKeyFilePassword
  • options.key
  • options.passphrase

These are redacted on read since #9040, but the write door accepts them without refusal — the exact opposite of what the field description tells an author. #9124 (accept-and-document ruling, landed) puts the accurate statement in content/docs/data-modeling/drivers.mdx's "config is validated per driver" section, but the auto-generated reference table / connection-form help text still asserts the stronger, false claim.

What a fix has to do

Correct the .describe() string on options in mongo.zod.ts to name the actual boundary (only auth.password — and authMechanismProperties.AWS_SESSION_TOKEN — are refused; the rest are accepted, stored cleartext, and redacted only on read), then regenerate content/docs/references/data/driver-mongo.mdx via build-docs.ts. Pure text change, no schema/behavior change — but it touches packages/spec source and its own build/docs-regen gate surface, which is why it's filed separately rather than folded into #9124's docs-only PR.

Backlink: #9124 (docs statement this reference table should agree with), #9040 (the refusal this description overstates).


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions