Search by

sinemacula / laravel-iam

sinemacula

Identity and access management for Laravel: installs the authentication, authorization, MFA, SSO and audit log packages and binds them together.

Package info

github.com/sinemacula/laravel-iam

pkg:composer/sinemacula/laravel-iam

Statistics

Installs: 20

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v0.1.0 2026-11-21 17:55 UTC

README

Latest Stable Version PHP Version Laravel Version Build Status Quality Gates Maintainability Code Coverage Total Downloads License

Identity and access management for Laravel: installs the authentication, authorization, MFA, SSO and audit log packages and binds them together. Each of the five works alone; this package provides the glue between them: it binds each one's contracts to the others' services, translates between their shapes, maps their events to the audit trail and checks that the whole is configured safely.

Package Owns
sinemacula/laravel-authentication Who the caller is: identities, principals, sessions, credentials and tokens
sinemacula/laravel-authorization What the principal may do: roles, permissions, policies and their evaluation
sinemacula/laravel-mfa Further factors, their enrolment, recovery codes, the factor combination policy and step-up
sinemacula/laravel-sso Sign-in through a tenant's own identity provider, over SAML 2.0 or OpenID Connect
sinemacula/laravel-audit-log Recording security-relevant activity

Each package references no other and exposes its own contracts with defaults that fail closed. This package is the one place that knows them all. It decides nothing the packages leave to your application: your identity, principal and tenant models, your tenant tree, your membership rules, your message senders and every route stay yours.

Features

  • One install: every package's configuration, language files and migrations published in a working order, safe to run twice, and a list of what remains for your application to bind.
  • Bridging configuration only: one file for what crosses packages (the shared storage connection, which adapters are on, provisioning, SSO's evidence policy, the audit, retry and worker options); each package's own settings stay in its own file.
  • Adapters: each package's contracts bound to the others' services, every binding a default your application can replace through configuration or the container.
  • Fail closed: an adapter that cannot translate refuses inside the transaction, never by skipping.
  • One transaction: a change that spans packages commits or rolls back as one on the shared storage connection, with a helper that retries the whole of it on a serialisation failure or deadlock.
  • The audit trail: every package's events mapped to audit entries, and nothing else enforced through events.
  • Partial suites: a package's features stay off until configured, and a feature that is off is not checked; the adapters stay bound, so turning it on later needs nothing more.
  • Ready for production: safe under Octane and in queue workers, with a combined reset as each Octane worker starts and before each queued job, one call that registers the scheduled work, and a configuration check for a deploy pipeline.

Installation

composer require sinemacula/laravel-iam

Quick Start

Publish every package's configuration and migrations, then set the connections under The storage connection and migrate:

php artisan iam:install
php artisan migrate

The install command lists what remains for your application: the contracts it binds, its routes, its audit-log and freshness settings, and its schedule. Then check the whole configuration, for example as a deploy step:

php artisan iam:check

It runs every package's own check and this package's, and exits non-zero on any failure.

Documentation

The guides live in docs/guides. The security and lifecycle contracts behind them, for maintainers and reviewers, are in docs/design.

Requirements

  • PHP ^8.3 (extensions: bcmath, curl, dom, hash, libxml, mbstring, openssl, zlib)
  • Laravel ^12.40 || ^13.3

Testing

composer test               # all suites in parallel (Paratest)
composer test:coverage      # all suites with clover coverage
composer test:unit          # unit suite only
composer test:feature       # feature suite only
composer test:integration   # integration suite only
composer test:performance   # performance budget suite (serial)
composer test:mutation      # scoped mutation gate
composer test:mutation:full # full mutation suite (no thresholds)
composer bench              # PHPBench hot-path benchmarks
composer check              # static analysis + style
composer format             # format the codebase
composer smells             # advisory code smells (duplication, complexity)

Changelog

See CHANGELOG.md for a list of notable changes.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md for guidelines on branching, commits, code quality, and pull requests.

Security

If you discover a security vulnerability, please report it responsibly. See SECURITY.md for the disclosure policy and contact details.

License

Licensed under the Apache License, Version 2.0.