Skip to Content
Security PoliciesData Classification Policy

Data Classification Policy

FieldValue
Document IDPOL-007
Version1.0
Effective Date2026-04-08
Next Review Date2027-04-08
ClassificationInternal
OwnerInformation Security Officer
Approved ByCEO, Paylithix Inc.
Parent PolicyInformation Security Policy (POL-001)

1. Purpose

This policy classifies the types of data handled by the Gatelithix Gateway, defines handling rules for each category, and establishes storage, transmission, retention, and disposal requirements. It ensures that cardholder data is protected according to its sensitivity, in compliance with PCI DSS 4.0.1 Requirements 3 and 4.

2. Scope

This policy applies to all data stored, processed, or transmitted by Gatelithix Gateway systems, including:

  • Cardholder data received from merchants via the API
  • Data stored in Cloud SQL databases (PCI and Core)
  • Data stored in Cloud KMS (encrypted key material)
  • Data in transit between services, processors, and clients
  • Data in logs, error messages, and monitoring systems
  • Data in backups and database snapshots
  • Data used in development and testing environments

3. Roles and Responsibilities

RoleResponsibility
Information Security OfficerClassifies data; defines handling rules; conducts annual data inventory review
Engineering LeadImplements technical controls for data handling; reviews code for data exposure
All EngineersHandle data according to classification; never introduce PAN into unauthorized systems
All PersonnelRecognize data sensitivity levels; report mishandled data immediately

4. Data Classification Levels

4.1 Classification Definitions

LevelNameDefinitionColor Code
L1ProhibitedData that must never be stored after authorization, regardless of encryptionRed
L2RestrictedCardholder data subject to PCI DSS protection requirementsOrange
L3ConfidentialBusiness-sensitive data requiring access controls and encryptionYellow
L4InternalOperational data requiring reasonable access controlsBlue
L5PublicInformation intended for public consumptionGreen

4.2 PCI Data Categories

L1: Prohibited — Sensitive Authentication Data (SAD)

Sensitive Authentication Data must never be stored after authorization, even if encrypted (PCI DSS 3.3.1).

Data ElementDescriptionStorageTransmissionLogging
CVV/CVC/CVV2Card verification valueNEVER storedTLS 1.2+ only; discarded from memory after processor callNEVER logged
Full Track DataMagnetic stripe dataNEVER storedNot applicable (e-commerce only)NEVER logged
PIN / PIN BlockPersonal identification numberNEVER storedNot applicable (CNP transactions only)NEVER logged

Gatelithix implementation: The vault service accepts CVV in the tokenization request, includes it in the processor API call, and discards it from memory. CVV is never written to any database, log, cache, or persistent storage.

L2: Restricted — Cardholder Data (CHD)

Data ElementDescriptionStorage RulesTransmission RulesLogging Rules
PAN (Primary Account Number)The full card numberEncrypted only (AES-256-GCM via Cloud KMS HSM); stored only in PCI Cloud SQL within the vault databaseTLS 1.2+ required; transmitted only between vault and processorsNEVER logged; masked to first 6 / last 4 in any display
Cardholder NameName on the cardStored in Core Cloud SQL if provided by merchantTLS 1.2+ requiredMay be logged with appropriate access controls
Expiration DateCard expiry (MM/YY)Stored in Core Cloud SQL as card metadataTLS 1.2+ requiredMay be logged (month/year only, no full date)
Service Code3-digit code from track dataNot applicable (e-commerce only)Not applicableNot applicable

PAN masking rules:

  • Display: show BIN (first 6 digits) and last 4 digits only (e.g., 424242******4242)
  • API responses: return bin and last4 fields; never return full PAN
  • Logs: never log any portion of PAN beyond BIN and last 4
  • Database (non-vault): store only bin (string) and last4 (string) — never the full PAN

L3: Confidential — Business-Sensitive Data

Data ElementDescriptionHandling Rules
API keys (plaintext)Merchant API secret keysShown only at creation; stored as bcrypt hash; transmitted over TLS only
Webhook signing secretsHMAC keys for webhook verificationStored in Secret Manager; never logged; transmitted over TLS only
Cloud KMS key namesResource identifiers for encryption keysAccess restricted to authorized personnel; not publicly shared
Merchant credentialsProcessor API keys per merchantStored in Secret Manager; accessed only by connector services at runtime
Audit logsSecurity event recordsAppend-only; access restricted to ISO and authorized personnel
Database credentialsCloud SQL connection detailsIAM-based authentication; no static passwords; connection via Auth Proxy

L4: Internal — Operational Data

Data ElementDescriptionHandling Rules
Transaction metadataAmounts, currencies, statuses, timestampsAccess controlled; retained per business requirements
Merchant configurationRouting rules, pricing plans, connector settingsAccess controlled per RBAC
Gateway tokens (tok_...)References to vaulted card dataNot cardholder data; normal access controls apply
Short IDs (mrc_..., pay_...)Public-facing identifiersInternal use; may appear in URLs and logs
System logs (non-security)Application debug and info logsRetained per operational needs; no CHD content

L5: Public — Public Information

Data ElementDescriptionHandling Rules
API documentationPublished at docs.gatelithix.comPublicly accessible; version controlled
Error codes and messagesStandardized error responsesPublicly documented; must not contain CHD
Supported processor listStripe, NMI, FluidPay (deprecation track); TSYS plannedPublicly known

5. Handling Rules by Classification

5.1 Storage Requirements

LevelAt-Rest EncryptionStorage LocationAccess Control
L1 (Prohibited)N/A — must not be storedNowhereN/A
L2 (Restricted/PAN)AES-256-GCM via Cloud KMS HSMPCI Cloud SQL only (vault database)Vault service account only; no human query access to raw data
L2 (Restricted/other CHD)Cloud SQL default encryption (CMEK)Core Cloud SQLRBAC per Auth0 roles
L3 (Confidential)Cloud SQL CMEK or Secret ManagerCore Cloud SQL, Secret ManagerRole-restricted; need-to-know
L4 (Internal)Cloud SQL CMEKCore Cloud SQL, Cloud LoggingStandard RBAC
L5 (Public)Not requiredDocs site, public repositoriesPublicly accessible

5.2 Transmission Requirements

LevelEncryption in TransitAllowed Channels
L1 (Prohibited)TLS 1.2+ (during initial transmission only)HTTPS API call from merchant to vault; vault to processor API
L2 (Restricted/PAN)TLS 1.2+ mandatoryVault-to-processor over HTTPS; never over email, chat, or unencrypted channel
L2 (Restricted/other CHD)TLS 1.2+ mandatoryHTTPS API responses; never over email or chat
L3 (Confidential)TLS 1.2+ mandatoryHTTPS, SSH, encrypted email only
L4 (Internal)TLS recommendedHTTPS preferred; internal VPC traffic encrypted
L5 (Public)No requirementAny channel

5.3 Logging Restrictions

LevelLogging Rules
L1 (Prohibited)NEVER logged in any form — not even masked or hashed
L2 (Restricted/PAN)NEVER logged — BIN and last4 may be logged separately as L4 data
L2 (Restricted/other CHD)May be logged with access controls; never in debug logs exposed to general engineering
L3 (Confidential)Logged only in security audit trail; never in application debug logs
L4 (Internal)Standard logging with appropriate retention
L5 (Public)No restrictions

6. Development and Testing

6.1 Test Data Requirements

  1. Production cardholder data shall never be used in development, testing, or staging environments.
  2. All development and testing shall use designated test card numbers:
Test PANProcessorPurpose
4242424242424242Stripe (tok_visa)Successful Visa payment
4000000000000002Stripe (tok_chargeDeclined)Declined payment
5555555555554444Stripe (tok_mastercard)Successful Mastercard payment
378282246310005Stripe (tok_amex)Successful Amex payment
  1. Test CVV: any 3-digit number (e.g., 123). Test expiry: any future date (e.g., 12/29).
  2. Sandbox processor credentials (prefixed sk_test_*) shall be used for all non-production environments.
  3. The vault encrypts test PANs with the same encryption pipeline as production — security controls are not bypassed in test mode.

6.2 Code Review Data Checks

Every code review shall verify:

  • No PAN, CVV, or SAD appears in source code, comments, or test fixtures (except designated test PANs above)
  • No PAN is logged, included in error messages, or returned in API responses
  • Structured logging is used (not string concatenation that could leak sensitive fields)
  • json.Marshal is used for audit metadata serialization (not fmt.Sprintf)

7. Data Retention and Disposal

7.1 Retention Schedule

Data CategoryRetention PeriodJustification
Encrypted PAN (vault)Duration of token validity or merchant relationship + 90 daysRequired for recurring payments and refunds
Transaction records7 yearsFinancial record-keeping, dispute resolution
Audit logs (security)1 year minimum; 3 months immediately accessiblePCI DSS 10.5.1
Application logs90 daysOperational debugging
API key hashesDuration of key validity + 90 daysAuthentication records
Merchant configurationDuration of merchant relationship + 1 yearBusiness records
Cloud SQL backups30 days (automated), 1 year (monthly snapshots)Disaster recovery

7.2 Data Disposal

  1. When PAN data is no longer needed (token revoked, merchant offboarded), the encrypted PAN record shall be securely deleted from the vault database. This deletion is automated by the cmd/vault-purge Cloud Run job (Phase 110), which runs daily at 05:00 UTC and HARD-DELETEs vaulted_cards rows that have crossed any of three retention boundaries: soft-delete grace (7 days after deleted_at), post-revocation retention (90 days after revoked_at), or merchant offboarding (90 days after merchant_offboarded_at). The PCI Cloud SQL FK cascade atomically drops dependent gateway_tokens and processor_tokens rows.
  2. Secure deletion means: DELETE from Cloud SQL (which overwrites on SSD via GCP’s storage layer) plus the associated Cloud KMS key version may be scheduled for destruction per the Key Management Policy. True crypto-shred (KMS key-version destruction once no rows reference a given version) is deferred to v2.5+; Phase 110 ships only the row-level disposal half.
  3. Cloud SQL backups containing deleted PAN data expire per the retention schedule above. No manual extraction of individual records from backups is performed.
  4. When decommissioning a CDE system component, all data shall be securely deleted and the deletion documented.
  5. Paper documents containing cardholder data (if any) shall be cross-cut shredded. In practice, Gatelithix operates paperlessly — no CHD exists on paper.

Operational procedure for the automated purge job — including the first-week DRY-RUN rollout, manual trigger commands, and integration with the daily Req 10.4 log review — is documented in compliance/runbooks/vault-purge.md.

7.3 Automated Retention Enforcement

  1. A scheduled job shall review and purge expired data per the retention schedule.
  2. The purge job logs which records were deleted (by token reference, never by PAN) in the audit trail.
  3. The ISO reviews retention compliance quarterly.

8. Acceptable Use

  1. Cardholder data shall be accessed only for legitimate business purposes: payment processing, refund processing, dispute resolution, or security investigation.
  2. Cardholder data shall not be:
    • Copied to personal devices, USB drives, or personal cloud storage
    • Sent via email, chat, or any unencrypted communication channel
    • Used for purposes other than those listed above
    • Shared with unauthorized personnel or third parties
  3. Personnel who encounter cardholder data outside the vault (e.g., in a log file, error message, or database query result) shall immediately report it to the ISO for remediation.

9. Compliance and Enforcement

  1. Violations of this policy, particularly unauthorized storage or exposure of PAN or SAD, shall be treated as security incidents per the Incident Response Plan.
  2. Unauthorized PAN found outside the vault triggers the PCI DSS 12.10.7 response procedure: isolate the system, securely delete the data, investigate how it arrived there, and remediate the root cause.
  3. Intentional mishandling of cardholder data is grounds for immediate termination and potential legal action.

11. Document History

VersionDateAuthorChanges
1.02026-04-08Information Security OfficerInitial policy creation