|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Default LDAP Connection Name
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Here you may specify which of the LDAP connections below you wish
|
|
|
|
|
| to use as your default connection for all LDAP operations. Of
|
|
|
|
|
| course you may add as many connections you'd like below.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'default' => env('LDAP_CONNECTION', 'default'),
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| LDAP Connections
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Below you may configure each LDAP connection your application requires
|
|
|
|
|
| access to. Be sure to include a valid base DN - otherwise you may
|
|
|
|
|
| not receive any results when performing LDAP search operations.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'connections' => [
|
|
|
|
|
|
|
|
|
|
'default' => [
|
|
|
|
|
'hosts' => [env('LDAP_HOST', '127.0.0.1')],
|
|
|
|
|
'username' => env('LDAP_USERNAME', 'cn=user,dc=local,dc=com'),
|
|
|
|
|
'password' => env('LDAP_PASSWORD', 'secret'),
|
|
|
|
|
'port' => env('LDAP_PORT', 389),
|
|
|
|
|
'base_dn' => env('LDAP_BASE_DN', 'dc=local,dc=com'),
|
|
|
|
|
'timeout' => env('LDAP_TIMEOUT', 5),
|
|
|
|
|
'use_ssl' => env('LDAP_SSL', false),
|
|
|
|
|
'use_tls' => env('LDAP_TLS', false),
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| LDAP Logging
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| When LDAP logging is enabled, all LDAP search and authentication
|
|
|
|
|
| operations are logged using the default application logging
|
|
|
|
|
| driver. This can assist in debugging issues and more.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'logging' => env('LDAP_LOGGING', true),
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| LDAP Cache
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| LDAP caching enables the ability of caching search results using the
|
|
|
|
|
| query builder. This is great for running expensive operations that
|
|
|
|
|
| may take many seconds to complete, such as a pagination request.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'cache' => [
|
|
|
|
|
'enabled' => env('LDAP_CACHE', false),
|
feat: add critical path test suite and fix auth/config issues
Test Infrastructure:
- Modernize phpunit.xml (bootstrap, source block, Laravel 12 env vars)
- Configure tests/Pest.php with pest()->extend(TestCase::class)->in('Feature')
- Add docker-compose.test.yml (Redis for test suite)
- Add composer test/test:quick scripts
- Rename CACHE_DRIVER to CACHE_STORE across config (backwards compatible)
- Update .env.testing for in-memory SQLite + Docker Redis
Test Coverage (190 tests):
- CriticalRoutes: public routes, auth routes, API endpoints, middleware, schedule
- Auth/LoginTest: login, logout, rate limiting, redirect behavior
- Auth/RegisterTest: registration flow, validation, disabled registration
- Auth/PasswordResetTest: reset request, token validation, password update
- Auth/TwoFactorTest: 2FA checkpoint, setup behind password confirmation
- Auth/PasswordConfirmationTest: sudo mode flow via Laravel password.confirm
- Api/ScopeTest: scope enforcement, public endpoints, admin access
Bugs Fixed:
- Fix unauthenticated API returning 500 instead of 401 (AuthenticationException
not handled in custom exception renderer in bootstrap/app.php)
- Replace custom DangerZone middleware with Laravel password.confirm
- Add HasFactory trait to Profile model for test factories
Bugs Documented (known-bugs group):
- Registration crashes with str_ends_with TypeError (RegisterController:82)
- OAuth routes use legacy array syntax causing ReflectionFunction TypeError
4 weeks ago
|
|
|
'driver' => env('CACHE_STORE', env('CACHE_DRIVER', 'file')),
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
];
|