MCPcopy Create free account
hub / github.com/PostHog/duckgres / S3ProviderForConfig

Function S3ProviderForConfig

server/server.go:2260–2270  ·  view source on GitHub ↗

S3ProviderForConfig returns the effective S3 provider for the given DuckLake config.

(dlCfg DuckLakeConfig)

Source from the content-addressed store, hash-verified

2258
2259// redactSecretStatementError reduces an engine error from a CREATE SECRET
2260// statement to its error-class prefix ("Parser Error", "IO Error", ...) plus
2261// a fixed placeholder. RefreshS3Secret errors flow beyond internal logs —
2262// via the duckgres.s3_cache SET / session-create restore paths into
2263// client-facing error messages, the query log, and the admin recent-errors
2264// ring — so no engine detail may survive: DuckDB errors can echo the
2265// offending SQL, and the echo is ELLIPSIZED for long lines ("LINE 1:
2266// ...oken' ..."), so matching-and-replacing complete credential values is NOT
2267// sufficient — a truncated echo carries credential FRAGMENTS no exact match
2268// catches, and even the first line's `at or near "..."` token can hold
2269// string-literal content. Dropping everything after the class prefix is the
2270// only airtight shape (the repo precedent is usersecrets.RedactErrorForLog's
2271// whole-message placeholder; keeping the class preserves triage value at zero
2272// leak surface, and works regardless of where the credentials came from —
2273// dlCfg or buildAWSSdkSecret's internally-fetched ones).

Callers 6

createS3SecretWithFunction · 0.85
RefreshS3SecretFunction · 0.85
needsCredentialRefreshFunction · 0.85
StartCredentialRefreshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected