From 0821e2f989416f596f62620bed1b160f5b35bd19 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:15:24 +0000 Subject: [PATCH] feat(privacy): implement GDPR and global privacy compliance - Add dismissable cookie notice banner to base template (essential cookies only, ePrivacy Directive compliant, localStorage persistence) - Expand Privacy Notice to cover all target markets: EU/GDPR, UK GDPR, Switzerland nFADP, Ukraine, US CCPA/CPRA, Canada PIPEDA/ Law 25, Brazil LGPD/Latin America, and Asia-Pacific & Japan (APPI, Australia Privacy Act, South Korea PIPA, Singapore PDPA, India DPDP) - Add International Data Transfers section (SCCs, IDTAs, adequacy decisions) and Data Minimization & Purpose Limitation section - Update Cookie Policy with precise cookie table, ePrivacy exemption rationale, and localStorage notice dismissal documentation - Create docs/PrivacyCompliance.md: full multi-market compliance guide covering cookie strategy, data transfer mechanisms, data subject rights handling matrix with response timelines, and market-specific notes for all supported regions - Add docs/PrivacyCompliance.md to mkdocs.yml Compliance nav section - Add 10 new targeted tests to test_views_general.py validating all key compliance content areas Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- docs/PrivacyCompliance.md | 186 ++++++++++++++ frontend/templates/base.html | 41 ++++ frontend/templates/cookies.html | 47 +++- frontend/templates/privacy.html | 412 +++++++++++++++++++++++++++----- mkdocs.yml | 1 + tests/test_views_general.py | 62 +++++ 6 files changed, 674 insertions(+), 75 deletions(-) create mode 100644 docs/PrivacyCompliance.md diff --git a/docs/PrivacyCompliance.md b/docs/PrivacyCompliance.md new file mode 100644 index 00000000..1bac31ad --- /dev/null +++ b/docs/PrivacyCompliance.md @@ -0,0 +1,186 @@ +# Privacy & GDPR Compliance Guide + +This document details DocuElevate's privacy and data-protection compliance strategy for all supported markets. +It is intended as an internal reference for developers, legal reviewers, and compliance officers. + +## Supported Markets + +| Market | Primary Law(s) | Status | +|---|---|---| +| European Union (EU) / EEA | GDPR (Regulation 2016/679), ePrivacy Directive | ✅ Implemented | +| Germany | GDPR + BDSG (Federal Data Protection Act) | ✅ Implemented | +| United Kingdom | UK GDPR + Data Protection Act 2018 | ✅ Implemented | +| Switzerland | nFADP (revised Federal Act on Data Protection, in force Sep 2023) | ✅ Implemented | +| Ukraine | Law of Ukraine "On Personal Data Protection" No. 2297-VI | ✅ Implemented | +| United States | CCPA/CPRA (California), VCDPA, CPA, CTDPA, UCPA (other states) | ✅ Implemented | +| Canada | PIPEDA + Québec Law 25 (Bill 64) | ✅ Implemented | +| Latin America | Brazil LGPD, Argentina PDPA, Mexico LFPDPPP, Colombia Ley 1581 | ✅ Implemented | +| Asia-Pacific & Japan | Japan APPI, Australia Privacy Act 1988, South Korea PIPA, Singapore PDPA, India DPDP Act | ✅ Implemented | + +> **Out of scope:** Countries subject to German export control embargoes, China, and Russia are explicitly excluded. + +--- + +## Architecture & Data Minimization + +DocuElevate is designed with privacy-by-design and data-minimization principles as core tenets: + +1. **No advertising or tracking infrastructure.** The application loads no analytics scripts, tracking pixels, + advertising networks, or third-party data-collection tools. CDN-hosted assets (Alpine.js, Tailwind CSS, + Font Awesome) are loaded from `cdn.jsdelivr.net` and `cdnjs.cloudflare.com` for functionality only. + +2. **Essential cookies only.** A single server-side session cookie is set. This cookie is strictly necessary + for authentication and is exempt from prior-consent requirements under GDPR Art. 5(3) ePrivacy Directive + and equivalent national laws. A dismissable cookie notice banner informs users of this on first visit. + +3. **Purpose limitation.** Documents uploaded by users are processed only for the purposes they initiate + (OCR, metadata extraction, cloud storage). Document content is not used for AI model training or secondary + analytics purposes. + +4. **Credential encryption.** All OAuth tokens and cloud storage credentials are stored encrypted at rest. + +5. **Audit logs.** Logs contain action type, timestamp, and user identifier only — no document content. + Default retention: 90 days. + +--- + +## Cookie Strategy + +### Cookie Classification + +| Cookie / Storage | Classification | Legal Basis | Consent Required? | +|---|---|---|---| +| `session` (HTTP Cookie) | Strictly Necessary | Legitimate Interest / Contract Performance | No (ePrivacy Art. 5(3) exemption) | +| `cookieNoticeDismissed` (localStorage) | Strictly Necessary (UX preference) | Legitimate Interest | No | + +### Cookie Notice Banner + +A dismissable banner is displayed on every page on first visit (until dismissed via localStorage). +It informs users that only essential session cookies are used and links to the full Cookie Policy (`/cookies`) +and Privacy Notice (`/privacy`). Dismissal is stored in `localStorage` under the key `cookieNoticeDismissed`. + +**Implementation:** `frontend/templates/base.html` — inline JavaScript in the `
` section. + +--- + +## International Data Transfers + +When DocuElevate is configured to use third-party AI services (e.g., OpenAI, Azure Document Intelligence) +or cloud storage providers hosted outside the EEA, data transfers must be governed by appropriate safeguards: + +| Transfer Mechanism | Applicable To | +|---|---| +| **Standard Contractual Clauses (SCCs)** — EU Commission Decision 2021/914/EU | Transfers to US processors (OpenAI, Microsoft Azure, AWS, Google) | +| **UK International Data Transfer Agreements (IDTAs)** | Transfers from UK to non-adequate third countries | +| **Adequacy Decision** | UK ↔ EU (EU Commission decision C(2021) 4800), Switzerland ↔ EU, Japan ↔ EU (partial), Canada (commercial) | +| **Swiss SCCs / nFADP Art. 16** | Transfers from Switzerland to non-adequate third countries | + +> **Action for deployers:** When configuring DocuElevate with US-based AI providers (OpenAI, Azure, AWS), +> ensure you have executed or accepted the provider's Data Processing Agreement (DPA) which incorporates SCCs. +> Links to major provider DPAs: +> - OpenAI: https://openai.com/policies/data-processing-addendum +> - Microsoft Azure: https://aka.ms/DPA +> - Google Cloud: https://cloud.google.com/terms/data-processing-addendum +> - AWS: https://aws.amazon.com/agreement/ + +--- + +## Data Subject Rights — Handling Process + +All rights requests must be submitted to **docuelevate@christian-louis.de**. + +| Right | GDPR | CCPA/CPRA | PIPEDA | LGPD | APPI | +|---|---|---|---|---|---| +| Access / Know | Art. 15 | ✅ | ✅ | Art. 18 | ✅ | +| Rectification / Correction | Art. 16 | ✅ | ✅ | Art. 18 | ✅ | +| Erasure / Deletion | Art. 17 | ✅ | Limited | Art. 18 | ✅ | +| Data Portability | Art. 20 | — | — | Art. 18 | — | +| Object / Opt-out of processing | Art. 21 | ✅ (sale/sharing) | Withdraw consent | — | ✅ | +| Restriction of Processing | Art. 18 | — | — | — | — | +| Complaint to DPA | Art. 77 | CPPA / State AG | OPC (Canada) | ANPD (Brazil) | PPC (Japan) | + +### Response Timelines + +| Jurisdiction | Standard Response Time | Extension | +|---|---|---| +| EU / EEA / UK / Switzerland | 1 calendar month | +2 months for complex requests | +| US (CCPA/CPRA) | 45 days | +45 days when reasonably necessary | +| Canada (PIPEDA) | 30 days | Extensions allowed with notice | +| Brazil (LGPD) | 15 days | — | +| Japan (APPI) | Without delay (reasonable period) | — | +| Australia | 30 days | — | + +--- + +## Market-Specific Notes + +### Germany (GDPR + BDSG) +- BDSG supplements GDPR with stricter rules on employee data, video surveillance, and credit score processing. +- An **Impressum** (legal notice per §5 TMG) is provided at `/imprint`. +- Online Dispute Resolution platform link is included in the Impressum per EU ODR Regulation. + +### United Kingdom (UK GDPR + DPA 2018) +- Post-Brexit: UK GDPR mirrors EU GDPR with UK-specific adaptations via DPA 2018. +- Data transfers from the UK use IDTAs (UK equivalent of SCCs). +- ICO is the supervisory authority. Complaint rights are disclosed in the Privacy Notice. + +### Switzerland (nFADP) +- Swiss revised Federal Act on Data Protection (nFADP) entered into force 1 September 2023. +- Substantially equivalent to GDPR. Swiss residents' rights mirror GDPR rights. +- FDPIC (Federal Data Protection and Information Commissioner) is the supervisory authority. + +### United States (CCPA/CPRA and state laws) +- DocuElevate does **not** sell or share personal information for cross-context behavioural advertising. +- A "Do Not Sell or Share My Personal Information" link is therefore not required, but the Privacy Notice + explicitly confirms this position. +- Sensitive personal information is not used beyond what is strictly necessary to provide the service. +- Privacy Notice includes the required CCPA/CPRA disclosures (categories collected, purposes, rights). + +### Canada (PIPEDA + Québec Law 25) +- PIPEDA applies to commercial activities involving personal information in all Canadian provinces except + those with substantially similar provincial legislation (Québec, Alberta, BC — which have their own). +- Québec Law 25 (Bill 64, in force Sep 2023) adds GDPR-like rights including data portability and + de-indexation. Privacy impact assessments (PIAs) are required for high-risk processing. +- A designated Privacy Officer is available at the contact email. + +### Brazil (LGPD) +- LGPD applies to any processing of personal data of individuals located in Brazil, regardless of where + the controller is established. +- Legal bases used: performance of contract (Art. 7 VI) and legitimate interest (Art. 7 IX). +- ANPD (Autoridade Nacional de Proteção de Dados) is the supervisory authority. + +### Japan (APPI) +- APPI amendments effective April 2022 introduced data portability, the right to opt out of third-party + provision, and stricter requirements for sensitive personal information. +- Third-party disclosures require prior opt-in consent (with limited exceptions). +- The Personal Information Protection Commission (PPC) is the supervisory authority. + +### Australia (Privacy Act 1988 + APPs) +- The Australian Privacy Principles (APPs) govern the handling of personal information. +- The Privacy Act review (2023) recommended GDPR-like reforms; further legislative changes are expected. +- OAIC (Office of the Australian Information Commissioner) is the supervisory authority. + +--- + +## Periodic Review Schedule + +| Activity | Frequency | Owner | +|---|---|---| +| Privacy Notice review | Annually or on material change | Legal / Compliance | +| Cookie audit | Annually | Engineering | +| Data transfer safeguard review (SCCs, IDTAs) | Annually or on legal change | Legal / Compliance | +| Dependency CVE scan (`safety check`) | On every PR | Engineering (CI) | +| Security audit | Annually | Security | +| DPA register review | Annually | Legal / Compliance | + +--- + +## Related Documents + +- [`frontend/templates/privacy.html`](../frontend/templates/privacy.html) — User-facing Privacy Notice +- [`frontend/templates/cookies.html`](../frontend/templates/cookies.html) — User-facing Cookie Policy +- [`frontend/templates/terms.html`](../frontend/templates/terms.html) — Terms of Service +- [`frontend/templates/imprint.html`](../frontend/templates/imprint.html) — Impressum / Legal Notice +- [`frontend/templates/base.html`](../frontend/templates/base.html) — Cookie notice banner implementation +- [`SECURITY_AUDIT.md`](../SECURITY_AUDIT.md) — Security audit findings and mitigations +- [`docs/AuthenticationSetup.md`](AuthenticationSetup.md) — OAuth and authentication configuration diff --git a/frontend/templates/base.html b/frontend/templates/base.html index a3625dcd..d39e6e44 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -217,6 +217,47 @@ + + + + + diff --git a/frontend/templates/cookies.html b/frontend/templates/cookies.html index 7cca33ce..a177baee 100644 --- a/frontend/templates/cookies.html +++ b/frontend/templates/cookies.html @@ -16,21 +16,47 @@- DocuElevate only uses essential session cookies for the following purpose: + DocuElevate uses only strictly necessary session cookies for the following purpose:
These cookies are mandatory for the proper functioning of our service. Without these cookies, you would be required to log in repeatedly during your browsing session.
++ Because these cookies are strictly necessary for the service to function, they are exempt from prior-consent requirements under the EU ePrivacy Directive (Art. 5(3)) and equivalent national implementations. We do not set any optional, analytics, advertising, or tracking cookies. +
- The session cookies we use are temporary and are deleted when you close your browser. -
+| Name | +Type | +Purpose | +Duration | +
|---|---|---|---|
| session | +Strictly Necessary | +Maintains your authenticated session; required for login to function. | +Session (deleted on browser close or logout) | +
| cookieNoticeDismissed | +Strictly Necessary | +Stores your acknowledgement of the cookie notice so it is not shown repeatedly (stored in localStorage, not a cookie). | +Persistent (browser localStorage) | +
- For more information about how we handle your data, please see our Privacy Policy. + For more information about how we handle your data, please see our Privacy Notice.
- While most web browsers allow you to control cookies through their settings, please note that blocking or deleting our session cookies will prevent DocuElevate from functioning properly, as user authentication relies on these cookies. + Most web browsers allow you to control cookies through their settings. However, blocking or deleting our session cookies will prevent DocuElevate from functioning, as user authentication relies on these cookies. +
++ You may also clear the cookie notice acknowledgement stored in your browser's localStorage at any time via your browser's developer tools (Application → Local Storage).
- By using DocuElevate, you consent to our use of cookies as described in this policy. This Cookie Policy is part of and incorporated into our Terms of Service. + This Cookie Policy is part of and incorporated into our Terms of Service and Privacy Notice.
Last Updated: {{ build_date|default(current_date|default('April 7, 2024')) }}
-- The controller responsible for processing your personal data under the EU General Data Protection Regulation (GDPR) is DocuElevate. + The controller responsible for processing your personal data under the EU General Data Protection Regulation (GDPR) and equivalent privacy laws worldwide is: +
+
+ Christian Louis IT Beratung
+ Alter Steinweg 3, 20459 Hamburg, Germany
Contact Email: docuelevate@christian-louis.de
-- This notice applies to the DocuElevate web application, hosted at {{ request.url.scheme }}://{{ request.url.netloc }}/. + For all privacy-related requests (access, deletion, rectification, opt-out, or complaints), please contact us at the email address above. + We will respond within 30 days (or the period prescribed by applicable law).
- User Authentication: We use Google, Dropbox, and Microsoft OAuth for sign-in. Through these services, we may receive information such as your name, email address, and profile picture. + This notice applies to the DocuElevate web application, hosted at + {{ request.url.scheme }}://{{ request.url.netloc }}/. +
++ It covers all users globally, including those in the European Union (EU), European Economic Area (EEA), + Germany, United Kingdom (UK), Switzerland, Ukraine, United States (US), Canada, Latin America (Latam), + Asia-Pacific, and Japan. Market-specific disclosures are provided in dedicated sections below. +
++ User Authentication: We use OAuth 2.0 (Google, Dropbox, Microsoft/OneDrive) and optional + local authentication. Through OAuth, we may receive your name, email address, and profile picture.
- Purpose: We use this information to authenticate you, personalize your experience, and provide the core functionality of DocuElevate. + Document Processing: Documents you upload are processed for OCR (optical character recognition), + metadata extraction, and storage to your chosen cloud provider. Document content is processed only for the + purpose you initiate and is not stored beyond what is operationally necessary. +
++ Audit Logs: We maintain limited audit logs (action type, timestamp, user identifier) to + ensure service integrity and security. These logs do not include document content.
Legal Basis (GDPR Art. 6): Our primary legal bases for processing are:
- We may use cookies or similar technologies to maintain your session, remember your preferences, and enhance your user experience. + DocuElevate is designed with data minimization as a core principle (GDPR Art. 5(1)(c)):
-- For more information about our use of cookies, please visit our Cookie Policy. -
-- OAuth Providers: Google, Dropbox, and Microsoft. These providers may process your personal data according to their own privacy policies. -
-- No Additional Sharing: We do not share, sell, or otherwise disclose your personal data to third parties for advertising or marketing purposes. -
-- Cloud Storage Integration: We integrate with Google Drive, Dropbox, OneDrive and other storage providers to enable you to save and access your documents across services. -
-- We retain your personal data only as long as necessary to provide the DocuElevate service or to comply with legal obligations. -
-- If you wish to have your data deleted or your account removed, please contact us at docuelevate@christian-louis.de. -
-- We implement appropriate technical and organizational measures to protect your personal data against unauthorized access, alteration, disclosure, or destruction. -
-+ OAuth Providers (Google, Dropbox, Microsoft): When you choose to authenticate via + OAuth, the respective provider processes your credentials and may share limited profile information + with us. These providers maintain their own privacy policies. +
++ Cloud Storage Providers (Google Drive, Dropbox, OneDrive, Amazon S3, Nextcloud, WebDAV/SFTP/FTP): + Documents are stored in the cloud provider you configure. Your configured credentials are stored + encrypted in the application database and are used solely to perform the storage operations you request. +
++ AI Processing Services (OpenAI, Azure Document Intelligence, others): When you initiate + OCR or AI-based metadata extraction, document data is transmitted to the AI service you or your + administrator has configured. This transmission is governed by a data processing agreement with the + respective provider. +
++ No Sale or Sharing for Advertising: We do not sell, rent, or share your personal data + with third parties for advertising, marketing, or any purpose unrelated to providing the service. +
++ DocuElevate is hosted in the European Union / EEA by default. Where personal data is transferred + outside the EEA (for example to US-based AI service providers such as OpenAI), we rely on + appropriate safeguards including: +
++ You may request a copy of the relevant safeguards by contacting us at + docuelevate@christian-louis.de. +
++ We retain personal data only as long as strictly necessary to provide the DocuElevate service or to + comply with legal obligations: +
++ To request deletion of your account and all associated personal data, please contact us at + docuelevate@christian-louis.de. +
++ We implement appropriate technical and organisational measures (TOMs) to protect your personal data, + including: +
++ Under GDPR (and the UK GDPR / Swiss nFADP equivalent), you have the following rights: +
++ To exercise any of the above rights, contact us at + docuelevate@christian-louis.de. + We will respond within one calendar month (extendable by two further months for complex requests). +
++ If you are a resident of California or another US state with applicable privacy legislation + (including Virginia VCDPA, Colorado CPA, Connecticut CTDPA, Utah UCPA), the following additional + disclosures apply: +
++ To submit a verifiable consumer request, contact us at + docuelevate@christian-louis.de. + We will respond within 45 days (extendable by an additional 45 days when reasonably necessary). +
++ If you are located in Canada, the following applies under the Personal Information Protection and + Electronic Documents Act (PIPEDA) and applicable provincial legislation (including Québec Law 25 / + Bill 64): +
++ Direct privacy complaints to our Privacy Officer at + docuelevate@christian-louis.de, + or to the Office of the Privacy Commissioner of Canada. +
++ Brazil (LGPD – Lei Geral de Proteção de Dados, Law 13.709/2018): + If you are located in Brazil, you have the following rights under the LGPD: +
++ Other Latin American Countries: We also recognise applicable privacy laws in Argentina + (PDPA), Mexico (LFPDPPP), Chile, Colombia (Ley 1581), and others. Users in these jurisdictions may + exercise equivalent rights as outlined under their national law by contacting us. +
++ Contact: + docuelevate@christian-louis.de +
++ Japan (APPI – Act on the Protection of Personal Information): + Japanese residents may request disclosure, correction, addition or deletion, suspension of use, + erasure, or suspension of third-party provision of their personal information held by us. + Third-party disclosures require your prior consent except where permitted by law. +
++ Australia (Privacy Act 1988 and Australian Privacy Principles): + Australian residents may request access to and correction of their personal information. + We will respond to access requests within 30 days. Complaints may be lodged with the + Office of the Australian Information Commissioner (OAIC). +
++ South Korea (PIPA – Personal Information Protection Act): + Korean residents may request access, correction, deletion, and suspension of processing. + We handle personal information of Korean residents in accordance with the PIPA. +
++ Other APJ markets (Singapore PDPA, New Zealand Privacy Act, India DPDP Act): + We recognise the data protection rights afforded to residents of these jurisdictions under their + respective national laws. Contact us to exercise your rights. +
++ Contact: + docuelevate@christian-louis.de +
++ Users located in Ukraine are protected under the Law of Ukraine "On Personal Data Protection" + (No. 2297-VI). Your rights include access to, correction, blocking, and deletion of your personal + data, as well as the right to object to processing. +
++ Contact: + docuelevate@christian-louis.de +
++ We may update this notice from time to time to reflect changes in our practices or applicable laws. + The "Last Updated" date at the top of this page indicates when the notice was last revised. + Where changes are material, we will notify users via in-application notification or email where + appropriate. +
++ If you have any questions or concerns about this Privacy Notice or your personal data, please + contact us at + docuelevate@christian-louis.de. +
++ Please also review our Terms of Service, + Cookie Policy, and + License Information.