---
title: "Sentinel for Laravel — docs | Roundly"
description: "Developer docs for Sentinel for Laravel: tamper-evident model seals, an audit ledger, key rotation, idempotency keys, nonces and RFC 9421 signatures."
url: https://roundly-consulting.com/open-source/docs/sentinel-for-laravel
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

Open source

# Sentinel for Laravel

Install

`composer require roundly-consulting/sentinel-for-laravel`

Requires: PHP ^8.4 · Laravel ^12.0|^13.0

[GitHub](https://github.com/roundly-consulting/sentinel-for-laravel) [Packagist](https://packagist.org/packages/roundly-consulting/sentinel-for-laravel) [Donate (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Patreon](https://www.patreon.com/cw/roundly)

## Overview

Sentinel for Laravel tells you when your data was changed behind your application’s back, and makes every request count once. It seals Eloquent models with keyed MACs or signatures, detects any change made outside the application — a SQL console, a mass update(), a restored backup — and refuses to build on a tampered row until someone acknowledges the change with a reason. Around it sit the request-integrity tools: idempotency keys, single-use nonces and URLs, and RFC 9421 HTTP message signatures. Native and MIT licensed, built only on Laravel and the Roundly Tier-0 packages package-toolkit, enums and crypto.

### What you get

#### Tamper-evident seals

Named, typed seals on any Eloquent model, written atomically with every write and verified anywhere — with the changed columns named.

#### Refused until acknowledged

A row changed outside the application can’t be edited until someone accepts the change with a reason, recorded with the actor.

#### Append-only ledger & anchors

A MAC’d history of every seal event, folded into chained checkpoints and published to external anchors — rollbacks show up.

#### Key rings & rotation

HMAC-SHA-256/384/512, Ed25519 and ECDSA keys in named rings, with rotation, revocation, retirement, runtime partner imports and MACs for your own services.

#### Idempotency keys

Idempotency-Key handling for HTTP routes, queued jobs and programmatic runs — repeats get the first response, never a second charge.

#### Nonces & HTTP signatures

Single-use nonces and signed URLs, plus RFC 9421 HTTP message signatures for inbound and outbound requests.

#### Facade, DI or actions

One Sentinel facade, an injectable SentinelManager or single-purpose actions — plus a recording fake that keeps production semantics.

### Documentation

#### [Installation](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/installation.md)

Install via Composer, run the guided sentinel:install, settle the morph key types, migrate, create the first key and baseline existing rows.

#### [Configuration](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/configuration.md)

Every config key with its default and env variable — keys and rings, sealing, verification, ledger and anchors, idempotency, nonces, signatures, schedule.

#### [What it detects](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/threat-model.md)

What Sentinel detects, against which attacker, with and without an external anchor — and what it deliberately does not guarantee.

#### [Declaring seals](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/declaring-seals.md)

Declare named, typed seals on a model — the builder, field types and cast inference, computed values, reusable definitions and compile errors.

#### [The Sentinel facade](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/facade.md)

The Sentinel facade — the for($model) handle, flat seal verbs, model-wide operations and the keys, ledger, idempotency, nonces and signatures accessors.

#### [DI and actions](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/without-facade.md)

Skip the facade: inject SentinelManager or call one of the 30 host-facing actions — request objects, plain-argument actions and the method → action map.

#### [Sealing and writes](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/sealing-and-writes.md)

When rows are sealed, how a write and its seal commit atomically, writes to a tampered row, deletes, suspension and save() overrides.

#### [Verifying](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/verifying.md)

Verify one seal, every seal or many models — results, statuses and reasons, status precedence, changed attributes, verify-on-retrieve and scans.

#### [Acknowledging changes](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/acknowledging.md)

Accept an out-of-band change with a reason and an actor, gate who may do it, unseal deliberately and load a tampered row for review.

#### [Bulk operations](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/bulk-operations.md)

Scan, re-seal, baseline and mass-update every row of a model — re-sealing never launders, and a verified mass update writes all or nothing.

#### [Ledger, checkpoints and anchors](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/ledger-and-anchors.md)

The append-only ledger, chained checkpoints and external anchors that make deleted or rolled-back history detectable — and how to verify them.

#### [Middleware, rule and scopes](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/middleware-and-rules.md)

Verify route models with sentinel.verified, validate input with IntactSeal, check whole collections with verifySeals() and query by seal state.

#### [Idempotency keys](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/idempotency.md)

Idempotency-Key handling for routes, programmatic runs for jobs and webhooks, the Idempotent job middleware and the client macro.

#### [Nonces and single-use URLs](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/nonces.md)

Purpose-bound single-use tokens and single-use signed URLs — only a hash is stored, and consumption is one atomic statement.

#### [HTTP message signatures](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/http-signatures.md)

Verify partners’ RFC 9421 signed requests, sign outbound calls, check signed responses — partner keys, profiles, rejections and signing options.

#### [Key management](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/keys.md)

Key rings, drivers and algorithms; generate, import, rotate, revoke and retire keys; statuses, verify-only nodes and partner imports.

#### [MACs for your own services](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/message-macs.md)

Verify HMACs your own services send — logs, events, webhooks — from PHP, Node or any language, with ring keys, rotation, revocation and sender binding.

#### [Commands and health check](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/commands.md)

Every sentinel:\* command with its options and exit codes, the self-registering schedule and the eleven-check health report.

#### [Events](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/events.md)

Every event Sentinel dispatches, when it fires and what it carries — scalar, queue-safe payloads with helpers to load the model.

#### [Extending](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/extending.md)

Plug in a KMS key store or a custom anchor, and bind your own idempotency and nonce stores, scope resolver or acknowledgement policy.

#### [Exceptions, statuses and enums](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/exceptions.md)

Every exception and when it is thrown, the HTTP problem responses, verification status values and every enum Sentinel ships.

#### [Database schema](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/database-schema.md)

The six sentinel\_ tables, their connections and foreign keys, the read-side models, factories, retention and the database grants to apply.

#### [Canonical format](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/canonical-format.md)

The frozen sentinel.seal/1 format: what gets MAC’d, how every value type is normalized, the seal document and the field tags.

#### [Testing](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/testing.md)

Swap in Sentinel::fake() to script statuses and assert every call, or run real seals in your suite with WithSentinelKeys.

#### [Standards](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/standards.md)

The standards Sentinel implements — HMAC, HKDF, JCS, EdDSA and ECDSA, RFC 9421, 9530, 9651 and 9457, NIST key management — and how each is proven.

#### [Requirements](https://roundly-consulting.com/open-source/docs/sentinel-for-laravel/requirements.md)

PHP 8.4+ with ext-hash and ext-mbstring, Laravel 12 or 13, and SQLite, PostgreSQL or MySQL; ext-sodium for Ed25519 keys.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source.md)
