- Install knpuniversity/oauth2-client-bundle and stevenmaguire/oauth2-keycloak - Register KnpUOAuth2ClientBundle in bundles.php - Configure Keycloak OIDC client (realm e-cosplay, auth.esy-web.dev) - Add keycloakId field to User entity with migration - Create KeycloakAuthenticator with group-to-role mapping (/superadmin -> ROLE_ROOT) - Create OAuthController with SSO routes (/connection/sso/login, logout, check) - Add custom_authenticator to security firewall with form_login entry point - Add auth.esy-web.dev to nelmio external_redirects whitelist and CSP form-action - Add SSO button and error flash messages to login page - Make navbar active state dynamic based on current route (desktop + mobile) - Add Keycloak env vars to .env, .env.local, and ansible/env.local.j2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
nelmio_security:
|
|
|
|
clickjacking:
|
|
paths:
|
|
'^/.*': DENY
|
|
|
|
content_type:
|
|
nosniff: true
|
|
|
|
referrer_policy:
|
|
enabled: true
|
|
policies:
|
|
- 'no-referrer'
|
|
- 'strict-origin-when-cross-origin'
|
|
|
|
csp:
|
|
enforce:
|
|
level1_fallback: false
|
|
browser_adaptive:
|
|
enabled: false
|
|
report-uri: '%router.request_context.base_url%/my-csp-report'
|
|
frame-ancestors:
|
|
- 'none'
|
|
frame-src:
|
|
- 'https://stripe.com'
|
|
- 'https://*.stripe.com'
|
|
- 'https://js.stripe.com'
|
|
- 'https://cloudflare.com'
|
|
- 'https://*.cloudflareinsights.com'
|
|
script-src:
|
|
- 'self'
|
|
- 'https://static.cloudflareinsights.com'
|
|
style-src:
|
|
- 'self'
|
|
- 'https://fonts.googleapis.com'
|
|
- 'https://cdnjs.cloudflare.com'
|
|
img-src:
|
|
- 'self'
|
|
- 'data:'
|
|
worker-src:
|
|
- 'self'
|
|
- 'blob:'
|
|
connect-src:
|
|
- 'self'
|
|
- 'https://cloudflareinsights.com'
|
|
- 'https://static.cloudflareinsights.com'
|
|
font-src:
|
|
- 'self'
|
|
- 'https://cdnjs.cloudflare.com'
|
|
- 'https://fonts.googleapis.com'
|
|
- 'https://fonts.gstatic.com'
|
|
object-src:
|
|
- 'none'
|
|
form-action:
|
|
- 'self'
|
|
- 'https://auth.esy-web.dev'
|
|
block-all-mixed-content: true
|
|
|
|
permissions_policy:
|
|
enabled: true
|
|
policies:
|
|
payment: ['self']
|
|
camera: ['self']
|
|
microphone: []
|
|
geolocation: ['self']
|
|
|
|
external_redirects:
|
|
override: /external-redirect
|
|
forward_as: redirUrl
|
|
log: true
|
|
allow_list:
|
|
- cloudflareinsights.com
|
|
- static.cloudflareinsights.com
|
|
- stripe.com
|
|
- checkout.stripe.com
|
|
- hooks.stripe.com
|
|
- auth.esy-web.dev
|