chrisreedio/socialment-bastion-azure
Composer 安装命令:
composer require chrisreedio/socialment-bastion-azure
包简介
Provides a Bridge between Socialment, Bastion, and Azure AD.
README 文档
README
This is a highly opinionated package that provides a bridge between Socialment, Bastion, and Azure AD.
Installation
You can install the package via composer:
composer require chrisreedio/socialment-bastion-azure
Then execute and follow the prompts:
php artisan socialment-bastion-azure:install
Include this plugin in your panel configuration:
$panel ->plugins([ // ... Other Plugins \ChrisReedIO\Bastion\BastionPlugin::make(), \ChrisReedIO\Socialment\SocialmentPlugin::make() ->registerProvider('azure', 'fab-microsoft', 'Azure Active Directory'), ])
Remember to add the Spatie HasRoles trait to your User model.
use Spatie\Permission\Traits\HasRoles; class User extends Authenticatable { use HasRoles; }
This additional glue package will automagically hook the pre-login callbacks from Socialment into Bastion's Roles via the SSO Group field.
Seeder
If you're choosing to use the seeder(s) make sure you add the RoleSeeder to your DatabaseSeeder.php like this:
$this->call([ // ... Other Seeders RoleSeeder::class, ]);
Also don't forget to edit the RoleSeeder.php to add your own SSO Groups to each Role.
Some example roles have been placed there for you.
Azure App Registration
Redirect URL
Ensure that you configure the redirect URL on your app registration and that it matches the value in your .env file.
AZURE_REDIRECT_URI=https://yourdomain.com/login/azure/callback
Azure Permissions
You will need to grant your app registration the following permissions:
Directory.Read.AllGroupMember.Read.AllUser.Read
Config
By default, the config does not get published upon install.
This is the contents of the published config services.php file:
It is just the stock services file with the azure block added.
return [ 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 'scheme' => 'https', ], 'postmark' => [ 'token' => env('POSTMARK_TOKEN'), ], 'ses' => [ 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], 'azure' => [ 'client_id' => env('AZURE_CLIENT_ID'), 'client_secret' => env('AZURE_CLIENT_SECRET'), 'redirect' => env('AZURE_REDIRECT_URI'), 'tenant' => env('AZURE_TENANT_ID'), 'proxy' => env('PROXY') // Optional ], ];
You may publish the config after installation with:
php artisan vendor:publish --tag="socialment-bastion-azure-config"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
chrisreedio/socialment-bastion-azure 适用场景与选型建议
chrisreedio/socialment-bastion-azure 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.53k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 11 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「chrisreedio」 「socialment-bastion-azure」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 chrisreedio/socialment-bastion-azure 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 chrisreedio/socialment-bastion-azure 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 chrisreedio/socialment-bastion-azure 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Generator Laravel Security Policies for Models/Resources
Provides an interface to the Azure Graph
SSO Powered Access Control for Filament
API Quota Management and Analytics
Provides OAuth Client Services
Displays the current Tailwind breakpoint in the Filament header
统计信息
- 总下载量: 4.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-02