Security

Configuration Is Part of the Release

Review configuration identity, secret references and compatibility alongside the executable being deployed.

On this page
  1. Separate values by when they take effect
  2. Validate structure before applying settings
  3. Review secret references separately
  4. Check the deployment boundary
  5. Preserve compatible rollback settings
  6. Leave a useful change record

An unchanged executable can behave differently after a configuration change. A new port assignment can route requests to another service. A changed content directory can expose the wrong publication. A stale feature setting can make a newly deployed program follow the old path. Treating configuration as incidental makes these changes hard to review and hard to reverse.

The release identity should include the executable, the relevant settings and the state compatibility assumptions. This does not require putting every secret in a repository. It requires identifying what changes behavior while keeping sensitive values in their intended protected storage.

Separate values by when they take effect

Some values are resolved during a build. A site domain embedded in generated metadata is an example. Changing a similarly named runtime environment variable will not necessarily change the already compiled result. Document the build boundary so that an operator does not mistake a runtime restart for a rebuild.

Other settings are read when a process starts, such as a listening port. A third group may be loaded dynamically. State which group each important value belongs to and how a change becomes active. A field called reloadable needs a defined refresh mechanism and failure behavior.

For a small publication, a compact record might look like this:

{
  "applicationRevision": "publication-3",
  "settingsRevision": "site-settings-7",
  "publicOrigin": "https://rue.cloudthe.me",
  "listenPort": 3000,
  "externalFeed": "fixed-dev-community-origin",
  "dataCompatibility": "local-markdown-v1"
}

The record illustrates non-sensitive settings. It is not a secret store, an installed configuration file or proof that the listed revision is deployed anywhere.

Validate structure before applying settings

Parse structured configuration and reject invalid types or unexpected identities. For a fixed publication domain, accept the reviewed domain from local configuration instead of deriving canonical URLs from an incoming Host header. Request input describes a request; it should not redefine the publication's identity.

Check required fields and useful ranges. A port should be an integer in the permitted range. A local content directory should remain inside the known content root. A feed tag should conform to the expected format, while the upstream origin remains fixed. Validation should fail clearly before the new process begins receiving traffic.

Rejecting a malformed value is often better than silently falling back to a different service identity. Defaults are useful for optional behavior, but a default that points the release at the wrong dataset creates a misleading successful startup.

Review secret references separately

Record that a service requires a particular secret reference and what permission it needs. Do not record the secret value in a release ledger, public page or debug log. An environment dump is a poor review artifact because it combines configuration evidence with potentially sensitive material.

Give the process only the credentials it needs for its own work. A renderer that reads public article files has no reason to inherit an administrative database credential. Removing unnecessary access makes the installation easier to reason about as well as reducing the scope of a mistake.

Consider how a secret is rotated and how the previous executable behaves after rotation. Rolling back an application that expects a retired credential may not restore service. Secret lifecycle and application compatibility are separate parts of the recovery plan.

Check the deployment boundary

Review the public route, loopback port and service project name together. Two independent containers can both listen internally on port 3000, but they cannot both publish the same host loopback port at the same time. The proxy upstream must match the assigned host port.

Inspect the paths that remain writable. A read-only installed tree can still permit a bounded cache directory and temporary storage. Keep those paths explicit instead of adding broad write permission when a startup check reveals an unexpected write.

A configuration preview should include the effective non-sensitive settings, not just the proposed file. Tool defaults, inherited environment values and command arguments can alter the result. Redact protected fields deliberately rather than depending on a person to notice them in a long output.

Preserve compatible rollback settings

Retain the previous settings alongside the previous artifact. Check that they still describe available paths, valid secret references and compatible stored state. A rollback command that selects only an old executable can leave the service using settings intended for a newer version.

Define what happens if configuration loading fails. Keeping a previous dynamic snapshot may be reasonable for a read-only optional setting; silently keeping an expired authorization setting has different consequences. The behavior should follow the purpose of the setting rather than a universal keep-running rule.

Leave a useful change record

Record the reason for the change, the non-sensitive differences, validation outcome and activation method. Verify the intended behavior after activation. For a domain setting, inspect canonical metadata. For a port setting, check both the local connection and the public proxy route.

Configuration deserves the same modest discipline as code: a reviewed identity, explicit assumptions, a bounded activation and evidence of the resulting behavior. That makes a small service understandable even when the executable itself has not changed.