Enabled
When to enable:
- Clients or partners without NetIDs
- Testing accounts for non-Northwestern users
Before launching your application, customize these key settings to fit your project’s needs.
Super Administrators have full access to the entire application and bypass all authorization checks. Commonly, these users are reserved for IT staff or core development team members.
Add NetIDs to your .env file, or the .env.example file if they will be the same across environments:
# Comma-separated list of NetIDsSUPER_ADMIN_NETIDS=abc123,xyz789,def456The StakeholderSeeder runs automatically during php artisan db:rebuild and:
After configuring SUPER_ADMIN_NETIDS, rebuild the database to provision administrators:
php artisan db:rebuildTo add administrators to an existing database without losing data:
php artisan db:seed --class=StakeholderSeederEdit config/auth.php or set environment variables:
# Enable/disable local authenticationLOCAL_AUTH_ENABLED=true
# Rate limit for login code requests (per hour)LOCAL_AUTH_RATE_LIMIT_PER_HOUR=10
# Redirect destination after successful loginLOCAL_AUTH_REDIRECT_AFTER_LOGIN=/Enabled
When to enable:
Disabled
When to disable:
Edit the local auth configuration in config/auth.php to tune the OTP length, expiration, and lockout behavior.
'local' => [ 'code' => [ 'digits' => 6, 'expires_in_minutes' => 10, 'max_attempts' => 8, 'lock_minutes' => 15, 'resend_cooldown_seconds' => 30, ],],# Master on/off switch for all API functionalityAPI_ENABLED=true
# Rate limiting (requests per minute)API_RATE_LIMIT_ATTEMPTS=1800# Enable API request loggingAPI_REQUEST_LOGGING_ENABLED=true
# Auto-delete logs older than this (days)API_REQUEST_LOG_RETENTION_DAYS=90
# Slow request threshold for monitoring (milliseconds)API_REQUEST_LOGGING_SLOW_THRESHOLD_MS=500# Enable probabilistic samplingAPI_REQUEST_LOGGING_SAMPLING_ENABLED=true
# Sample rate (0.0 to 1.0) - 0.1 = 10% of successful requestsAPI_REQUEST_LOGGING_SAMPLE_RATE=0.1The NetID Update webhook receives notifications when Northwestern users are deactivated, deprovisioned, or placed on security hold. This enables automatic role removal, or additional business logic, when users leave Northwestern.
If you have an EventHub subscription to the etidentity.ldap.netid.term topic:
Open routes/api.php
Uncomment the NetID Update webhook route:
Route::middleware(['eventhub_hmac'])->prefix('eventhub')->group(function () { // Route::post('netid-update', App\Http\Controllers\Webhooks\NetIdUpdateController::class)->eventHubWebhook('etidentity.ldap.netid.term')->name('netid-update'); Route::post('netid-update', App\Http\Controllers\Webhooks\NetIdUpdateController::class)->eventHubWebhook('etidentity.ldap.netid.term')->name('netid-update');});If you don’t have an EventHub subscription, leave this route commented out.
The Environment Lockdown feature restricts application access to users who have been explicitly assigned application-specific roles. Users with only the default Northwestern User role (automatically assigned during SSO login), or no roles, are redirected to a lockdown page explaining they need to be granted access by an administrator.
This feature is particularly useful for non-production where you want to prevent unauthorized users from accessing the application if they discover the URL.
By default, lockdown is enabled for non-production environments and disabled for production, local development, CI, and tests:
'lockdown' => [ 'enabled' => env('ENVIRONMENT_LOCKDOWN_ENABLED', match (env('APP_ENV')) { 'production', 'local', 'testing', 'ci' => false, default => true, }),],To disable lockdown for a specific environment, add this to your .env file:
ENVIRONMENT_LOCKDOWN_ENABLED=falseOption 1: Update Config Default (Recommended)
Edit config/app.php to replace the default value:
'production_url' => env('PRODUCTION_URL', 'https://northwestern.edu'),'production_url' => env('PRODUCTION_URL', 'https://your-app.northwestern.edu'),Option 2: Environment Variable
Add this to your .env file:
PRODUCTION_URL=https://your-app.northwestern.eduThe following routes are always accessible, regardless of lockdown status:
These exemptions ensure users can log in and administrators can manage impersonation. If you create additional routes that should be exempt, list them in EnvironmentLockdown::EXEMPTED_ROUTES accordingly.
Application Name
Find: Northwestern Laravel Starter
Replace: Your Application Name
Package/Project Identifier
Find: northwestern-laravel-starter
Replace: your-project-slug
By default, the docs/ directory contains documentation for the starter kit itself. This can be removed entirely or modified to host your project’s documentation.
If you want to remove the documentation module, follow these steps:
rm .github/workflows/deploy-docs.ymlrm -rf docs/