Key changes Adds Entra OIDC redirect + callback endpoints under /auth/entra/* (token exchange only there). Upserts tenant users keyed by (entra_tenant_id = tid, entra_object_id = oid); regenerates session; never stores tokens. Blocks disabled / soft-deleted users with a generic error and safe logging. Membership-based post-login routing: 0 memberships → /admin/no-access 1 membership → tenant dashboard (via Filament URL helpers) >1 memberships → /admin/choose-tenant Adds Filament pages: /admin/choose-tenant (tenant selection + redirect) /admin/no-access (tenantless-safe) Both use simple layout to avoid tenant-required UI. Guards / tests Adds DbOnlyPagesDoNotMakeHttpRequestsTest to enforce DB-only render/hydration for: /admin/login, /admin/no-access, /admin/choose-tenant with Http::preventStrayRequests() Adds session separation smoke coverage to ensure tenant session doesn’t access system and vice versa. Runs: vendor/bin/sail artisan test --compact tests/Feature/Auth Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #76
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Third Party Services
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This file is for storing the credentials for third party services such
|
|
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
|
| location for this type of information, allowing packages to have
|
|
| a conventional file to locate the various service credentials.
|
|
|
|
|
*/
|
|
|
|
'postmark' => [
|
|
'key' => env('POSTMARK_API_KEY'),
|
|
],
|
|
|
|
'resend' => [
|
|
'key' => env('RESEND_API_KEY'),
|
|
],
|
|
|
|
'ses' => [
|
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
|
],
|
|
|
|
'slack' => [
|
|
'notifications' => [
|
|
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
|
],
|
|
],
|
|
|
|
'microsoft' => [
|
|
'client_id' => env('ENTRA_CLIENT_ID'),
|
|
'client_secret' => env('ENTRA_CLIENT_SECRET'),
|
|
'redirect' => env('ENTRA_REDIRECT_URI'),
|
|
'tenant' => env('ENTRA_AUTHORITY_TENANT', 'organizations'),
|
|
],
|
|
|
|
];
|