platform: sslmode=verify-full in a database URL fails as a generic configuration error
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Start in crates/registry-messaging/src/store.rs at PgConfig::from_str(url).map_err(|_| StoreError::Configuration) and confirm tokio-postgres 0.7.18's accepted sslmode values in Config::from_str. Before writing anything, check whether each runtime's TLS setup verifies both chain and host name, since that decides whether verify-ca/verify-full can be accepted or must be refused with a named error. The same parser appears in BReg, Casework, Scheduling, Document Store, the Adapter facade and job host; docs live in operate/breg.mdx and operate/coordinator.mdx. Done means one rule applied everywhere plus a verify-full test per product.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
A database URL with sslmode=verify-full fails as a generic configuration error. verify-full is the value the PostgreSQL documentation recommends, so operators will write it.
Observed with Messaging during the Stage 0 adopter run for #2745: messagingctl plan reported error[database.unavailable] ... configuration is invalid against a private CA. The same URL with sslmode=require and database.trustedRootCertificateRef worked.
Cause
tokio-postgres 0.7.18 accepts only disable, prefer and require for sslmode (Config::from_str). Any other value fails to parse, and the product maps the parse failure to its generic configuration error. In Messaging that is crates/registry-messaging/src/store.rs, PgConfig::from_str(url).map_err(|_| StoreError::Configuration).
The same parser reads the database URL in BReg, Casework, Scheduling, Document Store, the Adapter facade and the Adapter job host.
The runtimes already force TLS and verify the server certificate against the configured trust roots, whatever sslmode says.
Docs disagree
- operate/breg.mdx says the URL needs no
sslmodeparameter, because the runtime requires TLS itself. - operate/coordinator.mdx says to use
sslmode=require. - The other operate pages do not say which values they accept.
Proposal
- Pick one rule for every product. Either accept
verify-caandverify-full, since the runtime already verifies the certificate, or refuse them with an error that namessslmodeand the accepted values. Accepting them is the simpler adopter path, but only if the runtime's verification is at least whatverify-fullpromises (chain and host name). Check that before choosing. - Put one sentence about
sslmodeon every operate page that takes a database URL, using the same wording.
Both changes need a test per product that a verify-full URL gives the chosen result.
- Vorherrschende Sprache
- Rust
- Sterne
- 2
- Forks
- 0
- Ø Merge
- 9 Std. 48 Min.
- Gemergte PRs (30 T.)
- 151
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus registrystack/registry-stack
-
area:breg enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
registrystack/registry-stack#2765 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
registrystack/registry-stack#2761 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
registrystack/registry-stack#2743 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
registrystack/registry-stack#2706 ·
Maintainer antworten meist innerhalb von 1 Tag
-
macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directoryOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
registrystack/registry-stack#2704 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in registrystack/registry-stack
Ähnliche Issues
-
[Bug] 建议把黑白主题设置同步到启动页面Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
AstrBotDevs/AstrBot-desktop#197 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
stackabletech/airflow-operator#898 ·
Maintainer antworten meist innerhalb von 1 Tag
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)Evtl. vergeben @zyl71 hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100