← Learn with Kipper

Under the hood / 04 · An architecture walkthrough

Protecting sensitive data.
Layer by layer.

Hardware keys, encryption, and backups protect against different failures. Map each control to a risk, identify who configures it, and choose the evidence that shows it works.

Seven questions · Platform, application, operations Download the review checklist

Start with the question each control answers

We use a simple review pattern: name the failure, choose the control, and define how to check it. An HR application makes a useful example because staff access, personal fields, and documents cross several boundaries.

This walkthrough uses Kipper, an open-source Kubernetes platform, as the deployment environment. The platform provides some controls, operators configure others, and application code enforces the rules specific to its data and users. Select the intended cluster before running a command. Configuration changes are labeled separately from inspection commands.

Three groups of controls each have their own checks. The first covers administrative and staff access. The second covers transport and stored-data protection. The third covers backup separation, version retention, and verified recovery.
Each group addresses a different failure. Select the diagram to view it at full size.

In post 03, a passing readiness check did not prove that a public request worked. Apply the same reasoning here: ask exactly what each successful security check establishes.

01 / Platform configuration

Restrict administrative access

Who can reach the servers?

Keep the application’s public HTTPS route separate from the path used to administer its servers. Register operator devices with their own WireGuard keys, restrict administrative access to the tunnel, and use key authentication for SSH. Separate device keys let you revoke one device without replacing everyone’s access.

Protects against: An exposed administrative interface gives an attacker another place to attempt access.

Put the control in place

Kipper supports registered operator devices and a device-only access policy. Registering a device and restricting direct access are explicit configuration choices. Inspect the existing policy first, then follow the operator-device setup instructions while you still have a working administration path.

Inspect the administrative access policy
kip cluster access show
kip cluster access device list

Configuration change · register this workstation and restrict its direct path
kip cluster access device add workstation --device-only

Verify it

Check that the recorded policy matches every node. From outside the permitted path, test that SSH and the Kubernetes API are unreachable. Through the registered device tunnel, confirm that your authorized administrative operation succeeds. Together, these checks test the restriction and the access you intend to preserve.

A registered device establishes a network path. The service at the other end still needs authentication and authorization.
Configure operator devices

02 / Application design

Give staff a separate access boundary

Who can perform privileged application work?

For an HR application, give staff administration its own identity, session, and authorization rules. A separate deployment can also use a database role limited to the reads and writes its tasks require. This makes the scope of staff access explicit and testable.

Protects against: A stolen staff credential can expose capabilities that ordinary application users should never have.

Put the control in place

Implement staff sign-in with WebAuthn and require user verification. To require device-bound hardware keys, validate attestation against your trust policy and reject backup-eligible credentials during enrollment. Kipper can host the separate application, but the application must enforce this credential policy and its permissions.

Verify it

In a test environment, accept an allowed credential and refuse a credential outside the enrollment policy. Confirm that a revoked credential cannot start a session. Check that a customer session cannot access staff routes and that the staff database role cannot perform an operation outside its intended grants.

WebAuthn checks the relying-party identity and origin. A copied login page on an unrelated origin cannot obtain a valid assertion for your application.
WebAuthn authentication and verification

03 / Platform and application configuration

Encrypt connections and verify the destination

Can a connection reach the wrong server?

Use HTTPS for public traffic and HSTS to tell supporting browsers to use HTTPS for subsequent requests. Check the database connection separately: requiring TLS on the database rejects plaintext network connections, while certificate and hostname verification on the client establish which server it reached.

Protects against: Traffic can be intercepted, and an encrypted connection can still lead to an unintended endpoint if the client does not verify its identity.

Put the control in place

Kipper’s application routes normally include HTTPS and HSTS headers, and new PostgreSQL services require TLS by default. Existing services keep their configured mode. For a bound PostgreSQL service, Kipper supplies the service CA path through DB_SSLROOTCERT once the certificate is verified. The application opts into verification in its driver configuration. For a libpq client, the shell example below requires DB_SSLROOTCERT to contain the readable service CA file path. Run it in the application’s launcher shell, then start the application from that same shell so it inherits both exported settings.

libpq shell launcher · export before starting the application
export PGSSLMODE=verify-full
export PGSSLROOTCERT="${DB_SSLROOTCERT:?Set DB_SSLROOTCERT to the service CA file path}"

Verify it

Inspect the public response for HTTPS and HSTS. In a test environment, prove that the database refuses a plaintext network connection, accepts the intended certificate and hostname, and refuses an untrusted CA or mismatched hostname. An observed TLS session proves encryption for that session. The rejection checks test the policy.

Required TLS is a server-side rule. Certificate verification is a client-side decision. Check both ends.
Configure PostgreSQL TLS and client verification

04 / Platform and application configuration

Name exactly what you encrypt in storage

Which stored values need protection?

Kubernetes Secrets and application records are separate data stores. Encrypt Secrets in the Kubernetes datastore. For selected application fields, such as bank details and tax identifiers, use an authenticated-encryption scheme such as AES-GCM to encrypt each value before storing it.

Protects against: A copied datastore or database export can expose credentials and sensitive personal fields.

Put the control in place

Current Kipper installations enable datastore encryption for Secrets. Existing clusters may need the documented procedure to enable encryption, which can restart the Kubernetes service and rewrite stored Secrets. Field encryption belongs in application code: use a maintained cryptographic library, a fresh nonce for each encryption, and a managed key outside the database records it protects.

Configuration change · enable Secrets encryption on an existing cluster
kip cluster encrypt-secrets

Verify it

Check the datastore encryption status and confirm that existing Secrets have been rewritten. With synthetic application data, inspect the persisted value, confirm authorized decryption returns the original value, and verify that a modified ciphertext is rejected. Check every write path for the chosen fields, including imports and administrative updates.

Encryption protects a defined store or field. An application that legitimately holds the decryption key can still read that data, so its access rules remain essential.
Enable and verify Secrets encryption

05 / Operator configuration

Separate the backup from the failure

What survives losing production storage?

Choose a backup destination outside the production storage location. Record the provider, location, retention, access permissions, and encryption-key recovery procedure. If your hosting requirements call for EU storage, verify that the actual destination is in the EU. A separate location and a separate provider are different choices.

Protects against: A backup stored alongside production can disappear in the same storage failure.

Put the control in place

Kipper supports external S3-compatible backup storage, a backup repository key, and customer-provided encryption keys for backup objects where the store supports SSE-C. For PostgreSQL, its backup hook creates per-database dumps and records completion, checksums, and reference row counts. Each database dump and its counts share a snapshot.

Inspect schedules and completed backup records
kip backup schedules
kip backup list

Verify it

Inspect a completed backup’s details, including volume results and dump completion. Check that the destination and encryption configuration match your plan. Verify that the keys needed for recovery will be accessible if the original cluster is lost. A schedule shows what is planned. A completed backup record shows what ran.

Consistent per-database dumps do not establish a single recovery point across all databases, documents, and external services. Define the relationships your recovery must preserve.
Configure and inspect backups

06 / Operator configuration

Protect document versions from deletion

Can a destructive change remove the recovery copy?

Use source versioning to retain earlier document versions and a separate mirror with a defined retention policy. S3 Object Lock in compliance mode protects a specific object version until its retention expires. New versions and delete markers can still change which version appears current.

Protects against: Accidental deletion or compromised write access can propagate from the source to a mirror.

Put the control in place

Kipper’s document-mirror workflow checks source versioning, destination compliance retention, and a canary version’s protection. It tests that deletion of that version is refused and checks the source credential on the reserved canary path. Provision the bucket policy to give that credential read-only access across the actual source data.

Verify it

Inspect the latest successful mirror run and its checks. In a test bucket, overwrite and delete a synthetic document, then recover the intended older version by its version ID. Inspect that version’s retention mode and retain-until date. Choose the mirror schedule based on the amount of recent data you can afford to lose.

Encryption controls readability. Retention controls deletion of protected versions. A nightly mirror also leaves an interval between copies.
Configure a document mirror

07 / Operational practice

Prove recovery with known expectations

Can you recover the data the application needs?

Restore into an isolated destination. Before the test, define what you expect to recover and verify: a backup timestamp, known records and relationships, document checksums, and a representative application operation. Compare the recovered result with those expectations and record the elapsed time.

Protects against: A backup can complete successfully while the recovery procedure is incomplete or its result is unsuitable for the application.

Put the control in place

Kipper’s restore drill restores services into a scratch namespace and excludes application workloads and public routes. For PostgreSQL dumps, it checks completion and checksums, restores the dump, and compares row counts with the counts recorded from its snapshot. Document recovery requires a separate copy and comparison against the selected backup versions.

Verify it

Use a dedicated test project with synthetic data and a completed backup. Confirm adequate capacity and the documented isolation requirements before starting a drill. Inspect the restored records as well as the counts, compare document checksums, and exercise a representative operation against the isolated data. Remove the scratch resources after recording the result.

Equal row counts can hide changed values. Add checks for what the application needs the data to mean.
Run and clean up a restore drill

Keep the evidence with the decision

For each control, record its scope, the configuration you checked, the observed result, and the date. Assign an owner and specify when to repeat the check, such as after a credential change, after a deployment change, or during a scheduled recovery exercise.

For example: “The test database refused a plaintext connection. The application accepted the expected certificate and rejected an untrusted CA.” That is more useful than “TLS enabled,” because it states what the test actually established.

Our aim is to make each protection understandable enough that another engineer can verify it and operate it. The downloadable checklist turns these seven questions into a review you can repeat for your own application.

Download the review checklist