diff --git a/.env b/.env index 9049110a..9056bfd2 100644 --- a/.env +++ b/.env @@ -14,6 +14,8 @@ MAILER_FROM=support@example.com MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 +SENTRY_SEND_DEFAULT_PII=false + LDAP_ENABLED=false LDAP_HOST="ldap" LDAP_PORT=1389 diff --git a/config/packages/sentry.yaml b/config/packages/sentry.yaml index 292082ee..230965ef 100644 --- a/config/packages/sentry.yaml +++ b/config/packages/sentry.yaml @@ -9,3 +9,4 @@ when@prod: register_error_handler: false options: release: '%app.version%' + send_default_pii: '%env(bool:SENTRY_SEND_DEFAULT_PII)%' diff --git a/docs/administrators/deploy.md b/docs/administrators/deploy.md index 806d6e84..2050bb9b 100644 --- a/docs/administrators/deploy.md +++ b/docs/administrators/deploy.md @@ -304,6 +304,13 @@ www-data$ php bin/console app:ldap:sync You can configure Bileto to send errors (exceptions and logs) to a Sentry server. All you need to do is set the `SENTRY_DSN` environment variable to the value that Sentry gives you when you create a new project. +You can also set `SENTRY_SEND_DEFAULT_PII` to `true` to send personally identifiable information (PII) to Sentry (e.g. IP, logged-in user's email, etc.). + +> [!CAUTION] +> Sending PII to Sentry is subject to GDPR. +> Don't enable this option unless you're sure you're compliant. +> More information about collected data in [the Sentry documentation](https://docs.sentry.io/platforms/php/guides/symfony/data-management/data-collected/). + ## Updating the production environment **Please always start by checking the migration notes in [the changelog](/CHANGELOG.md) before updating Bileto.** diff --git a/env.sample b/env.sample index aa796702..09991e68 100644 --- a/env.sample +++ b/env.sample @@ -58,6 +58,12 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 # Uncomment and set with the DSN provided by your Sentry project. # SENTRY_DSN="https://5fe4d21cda80b563b4557707c12eb30@sentry.example.com/42" +# Uncomment to send personally identifiable information (PPI) to Sentry. +# This data is subject to GDPR, so don't enable this option unless you're +# sure you're compliant. +# More info about collected data: https://docs.sentry.io/platforms/php/guides/symfony/data-management/data-collected/ +# SENTRY_SEND_DEFAULT_PII=true + ######################### # Configuration of LDAP # #########################