Repository navigation
Conversation
| if (!pinnedHosts(secretEnv, env) && env.NODE_ENV === 'production' && !warned.has(secretEnv)) { | ||
| warned.add(secretEnv); | ||
| logger.warn( | ||
| `${secretEnv} is not pinned to a host. Set ${secretHostsEnv(secretEnv)} to the hosts it may be sent to.`, |
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.
Closes #601 (L-API-12). L-API-9 to L-API-11 are in #639.
What changes
Configuration names the env var a secret lives in, and also the host it is sent to: an OAuth provider's
tokenUrlreceives theclientSecretEnvvalue, and an OTLP audit sink's endpoint receives everyheadersFromEnvvalue. Operators can now pin each secret to its hosts with<NAME>_HOSTS:misconfiguredbefore any connection.tlsCaEnv,tlsClientCertEnv,tlsClientKeyEnv) with a pin are refused for a syslog host outside it._HOSTS, so configuration cannot set or name a pin.Default
Pinning is opt-in in this release. An unpinned secret is still sent, and production logs one warning per variable that names it, never its value. Refusing unpinned secrets would stop every production OAuth provider and OTLP sink with header secrets on upgrade, which is out of proportion for a finding that already needs
admin:writeand step-up. Refusing them by default is deferred to a later minor, tracked in #640. Pinning is documented as recommended in production indocs/configuration.mdanddocs/oauth.md.Compatibility
No route, schema or response change. Configs that were accepted before are refused only when an operator sets a pin they do not match.
Checks
npm run typecheck,npm run lint,npm run format:checkandnpm run coverage(3688 tests, 99.11% lines, 95.97% branches) pass.