PHPackages                             chrisreedio/bastion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. chrisreedio/bastion

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

chrisreedio/bastion
===================

SSO Powered Access Control for Filament

v4.1.0(6mo ago)35.8k↓82.4%[4 PRs](https://github.com/chrisreedio/bastion/pulls)1MITPHPPHP ^8.3CI passing

Since Nov 3Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/chrisreedio/bastion)[ Packagist](https://packagist.org/packages/chrisreedio/bastion)[ Docs](https://github.com/chrisreedio/bastion)[ GitHub Sponsors](https://github.com/chrisreedio)[ RSS](/packages/chrisreedio-bastion/feed)WikiDiscussions 4.x Synced 2w ago

READMEChangelog (10)Dependencies (13)Versions (27)Used By (1)

SSO Powered Access Control for Filament
=======================================

[](#sso-powered-access-control-for-filament)

[![Latest Version on Packagist](https://camo.githubusercontent.com/be5ea17c31ee61ccf62ee2d6b48c024392ffdd098c72293efdf5e32c926414a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636872697372656564696f2f62617374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chrisreedio/bastion)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c0ab1f4a79c21215290fda13d57ad5fb982ef6c79f28e883426a2af68ae2b39a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636872697372656564696f2f62617374696f6e2f72756e2d74657374732e796d6c3f6272616e63683d342e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/chrisreedio/bastion/actions?query=workflow%3Arun-tests+branch%3A4.x)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d62720fb10fad960fc9a4acc9b295647239f21e16366f8023e3700ab4143cf49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636872697372656564696f2f62617374696f6e2f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d342e78266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/chrisreedio/bastion/actions?query=workflow%3A%22Fix+PHP+Code+Styling%22+branch%3A4.x)[![Total Downloads](https://camo.githubusercontent.com/90cf1c17b78a9946ecd1ef0f052d8e67c3fd5a19a8378d061e709d40adeaf2f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636872697372656564696f2f62617374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chrisreedio/bastion)

Bastion is a package/plugin for Filament and Laravel to quickly scaffold out access control for your application.

It's primary use case is with SSO and Azure Active Directory, but it can be used with any authentication provider.

Warning

This package is still in development and is not ready for production use.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require chrisreedio/bastion
```

Update your PanelProvider to include the plugin:

```
$panel
    ->plugins([
        // ... Other Plugins
        \ChrisReedIO\Bastion\BastionPlugin::make(),
    ])
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="bastion-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="bastion-config"
```

This is the contents of the published config file:

```
return [
    'models' => [
        'permission' => \Spatie\Permission\Models\Permission::class,
        'role' => \Spatie\Permission\Models\Role::class,
        'user' => '\App\Models\User',
    ],

    'permissions' => [
        'preload' => true,

    ],

    'default_guard' => 'web',
    'guards' => [
        // value => 'Custom Label'
        'web' => 'Web',
        'api' => 'API',
        // Your other custom guards here
    ],

    'sso' => [
        'enabled' => false,
    ],
];
```

You can publish the seeder(s) with:

```
php artisan vendor:publish --tag="bastion-seeders"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="bastion-views"
```

Usage
-----

[](#usage)

A super admin role may be defined by using the `->superAdminRole` method on the plugin.

```
$panel
    ->plugins([
        // ... Other Plugins
        \ChrisReedIO\Bastion\BastionPlugin::make()
            ->superAdminRole('Developer'),
	])
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

Special thanks to @Althinect and @bezhanSalleh for their packages and hard work. This is both inspired by and based on their work. This package would not be possible without them.

- [Chris Reed](https://github.com/chrisreedio)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance73

Regular maintenance activity

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 83.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~39 days

Total

17

Last Release

190d ago

Major Versions

v3.0.1 → v4.0.0-beta.12025-08-25

PHP version history (2 changes)v3.0.0-beta1PHP ^8.1

v3.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77644584?v=4)[Chris Reed](/maintainers/chrisreedio)[@chrisreedio](https://github.com/chrisreedio)

---

Top Contributors

[![chrisreedio](https://avatars.githubusercontent.com/u/77644584?v=4)](https://github.com/chrisreedio "chrisreedio (119 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")

---

Tags

filament-pluginfilamentphplaravelrole-managementlaravelfilamentchrisreediobastion

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/chrisreedio-bastion/health.svg)

```
[![Health](https://phpackages.com/badges/chrisreedio-bastion/health.svg)](https://phpackages.com/packages/chrisreedio-bastion)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k4.3M161](/packages/bezhansalleh-filament-shield)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

85240.3k9](/packages/stephenjude-filament-two-factor-authentication)[althinect/filament-spatie-roles-permissions

3491.2M12](/packages/althinect-filament-spatie-roles-permissions)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
