Skip to content

docs: document the Kratos Landlock filesystem sandbox#2550

Open
gaultier wants to merge 11 commits into
masterfrom
worktree-pgaultier-landlock
Open

docs: document the Kratos Landlock filesystem sandbox#2550
gaultier wants to merge 11 commits into
masterfrom
worktree-pgaultier-landlock

Conversation

@gaultier
Copy link
Copy Markdown
Contributor

@gaultier gaultier commented May 11, 2026

Impl: https://github.com/ory-corp/cloud/pull/11693

Summary

  • New canonical page docs/security-compliance/landlock-sandbox.mdx describing the Landlock sandbox shipping with Kratos: the unconfigurable Jsonnet-worker layer (OSS / Network / OEL) and the kratos serve sandbox (Network / OEL). Covers what is auto-allowed (every file:// URI in the config, TLS material, SMTP client certs, the courier template directory, the SQLite database directory, etc.), the security.landlock.* configuration, the symlink / cert-renewal nuance (leaf grant ⇒ restart, directory grant ⇒ transparent), the local $ref-in-identity-schemas case, and an EPERM troubleshooting walkthrough (audit log + strace).
  • Cross-link callouts on operator-facing pages so self-hosted operators discover the sandbox from the pages they already read: identity-schema best practices, customize-identity-schema, the Jsonnet reference, courier-templates (self-hosted + emails-sms), TLS, production checklist, deploy-to-production, threat-model concept page, troubleshooting.

Tracks the changeset at cloud/.changesets/next/2026-04-27_17-36-12.md.

Test plan

  • Render the docs site locally and visit /docs/security-compliance/landlock-sandbox — the page appears under Security and compliance without manual sidebar wiring.
  • Click through each cross-link callout (11 pages) and confirm they land on the canonical page.

🤖 Generated with Claude Code

gaultier and others added 8 commits May 11, 2026 08:48
Documents the new Landlock-based filesystem sandbox shipped with Kratos:
the unconfigurable Jsonnet-worker layer (all channels), the kratos serve
sandbox on Network/OEL, the `security.landlock.*` configuration knobs,
symlink/cert-renewal caveats, the local `$ref` breaking change for
identity schemas, and EPERM troubleshooting steps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds short callouts on identity-schema, courier-template, Jsonnet, TLS,
production, and troubleshooting pages so self-hosted operators discover
the filesystem-sandbox restrictions (auto-allowed paths, the local-\$ref
breaking change, cert-renewal symlink swaps, and EPERM debugging) from
the pages they already read.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the "Breaking change" heading and "after the upgrade" / "keep the
previous behaviour" phrasing so the page reads as a feature reference
rather than a release note.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Leaf grants on individual cert/key files do require a restart after a
symlink swap, but a grant on the containing directory (e.g.
/etc/letsencrypt) covers both the live/ symlink and the new archive/
target, so certbot and cert-manager renewals are transparent. Document
this on both the TLS guide and the canonical Landlock page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single-process Go program that asserts the directory-grant claim in
the Landlock sandbox page: with RWDirs on a directory, a symlink under
it can be re-pointed to a sibling file at runtime and reads through
the symlink keep working without any rule update. Mirrors the
cert-manager / certbot renewal pattern.

Linux 5.13+ only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Kratos now walks the loaded config at startup and allow-lists every
file:// URI it finds — identity schemas, OIDC mappers, courier
templates, web-hook bodies, tokenizer JWKS files, and any future
file:// field. Update the canonical Landlock page to describe the
generic auto-discovery (and the caveat about legacy bare paths), flip
the SMTP and courier-template callouts from "you must add to
allowed_paths" to "auto-allowed, no action required", and broaden the
production guide accordingly. Also adds SMTP client cert/key paths to
the auto-allowed list.

The $ref-inside-schema-body case still requires manual allow-listing
(auto-discovery walks the config, not the JSON bodies the config
points at).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gaultier gaultier requested review from hperl and removed request for aeneasr, piotrmsc and zepatrik May 11, 2026 12:15
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@gaultier has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 29 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: edce4ec8-8a08-4884-93fa-e95fa7f797f3

📥 Commits

Reviewing files that changed from the base of the PR and between ca44368 and 33ae17c.

⛔ Files ignored due to path filters (10)
  • docs/kratos/concepts/security.mdx is excluded by !**/*.mdx
  • docs/kratos/emails-sms/01_sending-emails-smtp.mdx is excluded by !**/*.mdx
  • docs/kratos/guides/deploy-kratos-example.mdx is excluded by !**/*.mdx
  • docs/kratos/guides/https-tls.mdx is excluded by !**/*.mdx
  • docs/kratos/manage-identities/15_customize-identity-schema.mdx is excluded by !**/*.mdx
  • docs/kratos/manage-identities/35_best-practices.mdx is excluded by !**/*.mdx
  • docs/kratos/reference/jsonnet.mdx is excluded by !**/*.mdx
  • docs/kratos/self-hosted/01_mail-courier-selfhosted.mdx is excluded by !**/*.mdx
  • docs/kratos/self-hosted/02_mail-courier-templates.mdx is excluded by !**/*.mdx
  • docs/security-compliance/landlock-sandbox.mdx is excluded by !**/*.mdx
📒 Files selected for processing (2)
  • docs/kratos/debug/troubleshooting.md
  • docs/kratos/guides/production.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-pgaultier-landlock

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants