本文へ移動
cccskills
無料GitHub で公開

cloud-retention-config

Configures cloud storage retention policies across AWS S3, Azure Blob Storage, and Google Cloud Storage. Covers lifecycle rules, object lock, legal hold, immutability policies, cross-region replication retention alignment, and compliance mode configuration. Activate for cloud retention, S3 lifecycle, Azure retention, GCP retention policy queries.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md14.5 KB
  • assets/template.md1.8 KB
  • references/standards.md2.7 KB
  • references/workflows.md3.4 KB
  • scripts/process.py7.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Cloud Storage Retention Configuration

Overview

Cloud storage platforms provide native retention and lifecycle management features that can enforce data retention schedules at the infrastructure level. Proper configuration ensures that personal data stored in cloud environments is automatically transitioned, archived, or deleted according to retention policies, while legal hold and object lock features prevent premature deletion of data subject to regulatory or litigation requirements. This skill covers configuration for the three major cloud platforms: AWS S3, Microsoft Azure Blob Storage, and Google Cloud Storage.

Legal Context

GDPR Article 5(1)(e) — Storage Limitation

Cloud storage retention policies are a technical implementation of the storage limitation principle, ensuring data is not retained beyond the period necessary for processing purposes.

GDPR Article 32 — Security of Processing

Retention configuration must include appropriate security measures, including encryption at rest, access controls, and audit logging for all retention-related operations.

GDPR Article 25 — Data Protection by Design and by Default

Cloud retention policies should be configured as default settings on all storage resources, rather than applied retroactively.

AWS S3 Lifecycle and Retention Configuration

S3 Lifecycle Rules

S3 Lifecycle rules automate transitions between storage classes and object expiration:

Lifecycle Rule Configuration for Orion Data Vault Corp

Rule NamePrefix/Tag FilterTransitionExpirationPurpose
customer-data-lifecycleprefix: customer-data/90 days → S3 Glacier Instant Retrieval; 365 days → S3 Glacier Deep Archive2,190 days (6 years)Customer transaction records — HMRC retention
marketing-data-lifecycletag: data-category=marketing180 days → S3 Intelligent-Tiering730 days (2 years)Marketing contact data — consent-based retention
analytics-data-lifecycleprefix: analytics/90 days → S3 Glacier Instant Retrieval790 days (26 months)Website analytics — ICO/CNIL recommended period
cctv-footage-lifecycleprefix: cctv/None30 daysCCTV footage — ICO CCTV Code of Practice
applicant-data-lifecycleprefix: recruitment/None180 days (6 months)Unsuccessful job applicant data
financial-records-lifecycleprefix: finance/365 days → S3 Glacier Deep Archive2,190 days (6 years)Financial and tax records — Companies Act 2006
employee-records-lifecycletag: data-category=employee730 days → S3 Glacier Deep ArchiveControlled by HR system (employment + 6 years)Employee HR records

S3 Lifecycle Rule — JSON Configuration Example

{
  "Rules": [
    {
      "ID": "customer-data-lifecycle",
      "Filter": {
        "Prefix": "customer-data/"
      },
      "Status": "Enabled",
      "Transitions": [
        {
          "Days": 90,
          "StorageClass": "GLACIER_IR"
        },
        {
          "Days": 365,
          "StorageClass": "DEEP_ARCHIVE"
        }
      ],
      "Expiration": {
        "Days": 2190
      },
      "NoncurrentVersionTransitions": [
        {
          "NoncurrentDays": 30,
          "StorageClass": "GLACIER_IR"
        }
      ],
      "NoncurrentVersionExpiration": {
        "NoncurrentDays": 2190
      }
    }
  ]
}

S3 Object Lock

S3 Object Lock prevents objects from being deleted or overwritten for a fixed retention period or indefinitely. It operates in two modes:

ModeBehaviourUse Case at Orion Data Vault Corp
Governance ModePrevents deletion by most users; users with s3:BypassGovernanceRetention permission can overrideStandard retention enforcement — allows DPO-approved early deletion for valid Art. 17 requests
Compliance ModePrevents deletion by ALL users, including root account, for the entire retention periodRegulatory records where deletion before expiry is legally prohibited (e.g., AML records under MLR 2017)

Object Lock Configuration

{
  "ObjectLockConfiguration": {
    "ObjectLockEnabled": "Enabled",
    "Rule": {
      "DefaultRetention": {
        "Mode": "GOVERNANCE",
        "Days": 2190
      }
    }
  }
}

Critical consideration for GDPR erasure: If using Compliance Mode, data subject erasure requests under Art. 17 cannot be fulfilled until the retention period expires. Use Governance Mode for data categories where erasure requests are possible, and reserve Compliance Mode only for data with mandatory statutory retention that overrides the right to erasure under Art. 17(3)(b).

S3 Legal Hold

Legal hold is an independent, on/off flag that prevents object deletion regardless of retention settings:

aws s3api put-object-legal-hold \
  --bucket orion-data-vault-regulated \
  --key customer-data/2024/transaction-batch-0142.parquet \
  --legal-hold Status=ON

Legal hold must be:

  • Applied immediately upon receipt of a litigation hold notice
  • Tracked in the litigation hold management register (cross-reference: litigation-hold-mgmt skill)
  • Removed only upon written authorization from Legal counsel
  • Auditable — all legal hold changes logged via CloudTrail

Microsoft Azure Blob Storage Retention

Immutability Policies

Azure Blob Storage supports immutability policies at the container level:

Policy TypeBehaviourConfiguration
Time-based retentionPrevents modification and deletion for a specified intervalSet retention interval in days; can be locked (irreversible) or unlocked
Legal holdPrevents modification and deletion until all legal hold tags are clearedApply named legal hold tags; multiple holds can coexist

Time-Based Retention Policy Configuration

{
  "properties": {
    "immutabilityPeriodSinceCreationInDays": 2190,
    "allowProtectedAppendWrites": true,
    "allowProtectedAppendWritesAll": false
  }
}

Azure Lifecycle Management Rules

{
  "rules": [
    {
      "enabled": true,
      "name": "customer-data-retention",
      "type": "Lifecycle",
      "definition": {
        "filters": {
          "blobTypes": ["blockBlob"],
          "prefixMatch": ["customer-data/"]
        },
        "actions": {
          "baseBlob": {
            "tierToCool": {
              "daysAfterModificationGreaterThan": 90
            },
            "tierToArchive": {
              "daysAfterModificationGreaterThan": 365
            },
            "delete": {
              "daysAfterModificationGreaterThan": 2190
            }
          },
          "snapshot": {
            "delete": {
              "daysAfterCreationGreaterThan": 2190
            }
          }
        }
      }
    },
    {
      "enabled": true,
      "name": "analytics-data-retention",
      "type": "Lifecycle",
      "definition": {
        "filters": {
          "blobTypes": ["blockBlob"],
          "prefixMatch": ["analytics/"]
        },
        "actions": {
          "baseBlob": {
            "tierToCool": {
              "daysAfterModificationGreaterThan": 90
            },
            "delete": {
              "daysAfterModificationGreaterThan": 790
            }
          }
        }
      }
    }
  ]
}

Azure Legal Hold

az storage container legal-hold set \
  --account-name oriondatavault \
  --container-name regulated-data \
  --tags "litigation-2026-001" "regulatory-investigation-2026-003"

Azure Versioning and Soft Delete Interaction

When configuring retention, account for Azure's soft delete and versioning features:

FeatureRetention ImpactRecommended Setting
Blob soft deleteDeleted blobs retained for recovery periodSet to 14 days — ensure actual deletion occurs after soft delete period
Container soft deleteDeleted containers retained for recoverySet to 14 days
Blob versioningPrevious versions retainedApply lifecycle rules to versions; ensure expired versions are deleted

Google Cloud Storage Retention

Bucket-Level Retention Policy

GCP applies retention policies at the bucket level. Objects cannot be deleted or overwritten until the retention period expires:

{
  "retentionPolicy": {
    "retentionPeriod": "189216000",
    "isLocked": false
  }
}

The retentionPeriod is specified in seconds. Common values:

Retention PeriodSecondsUse Case
30 days2,592,000CCTV footage
6 months15,552,000Unsuccessful applicant data
26 months68,256,000Analytics data
2 years63,072,000Marketing data
6 years189,216,000Financial/tax records
7 years220,752,000Audit records

Locking a Retention Policy

gcloud storage buckets update gs://orion-regulated-finance \
  --lock-retention-policy

Warning: Locking a retention policy is IRREVERSIBLE. Once locked, the retention period cannot be reduced or removed. The bucket cannot be deleted until every object in it has met its retention period. Only lock policies for data categories with absolute statutory retention requirements that override Art. 17 rights.

GCP Object Hold

Hold TypeBehaviourUse Case
Temporary holdPrevents deletion; can be removed at any timeArt. 17 request pauses (assessment period); temporary preservation
Event-based holdPrevents deletion until the hold is released; retention period begins on hold releaseData where retention period starts from a future event (e.g., contract termination)
gcloud storage objects update gs://orion-regulated-data/customer-data/batch-0142.parquet \
  --temporary-hold

GCP Lifecycle Rules

{
  "lifecycle": {
    "rule": [
      {
        "action": {
          "type": "SetStorageClass",
          "storageClass": "NEARLINE"
        },
        "condition": {
          "age": 90,
          "matchesPrefix": ["customer-data/"]
        }
      },
      {
        "action": {
          "type": "SetStorageClass",
          "storageClass": "ARCHIVE"
        },
        "condition": {
          "age": 365,
          "matchesPrefix": ["customer-data/"]
        }
      },
      {
        "action": {
          "type": "Delete"
        },
        "condition": {
          "age": 2190,
          "matchesPrefix": ["customer-data/"]
        }
      }
    ]
  }
}

Cross-Region Replication Retention Alignment

When data is replicated across regions for availability or disaster recovery, retention policies must be aligned:

Alignment Requirements

  1. Identical retention periods: Replicated data in the destination region must have the same retention period as the source.
  2. Synchronized lifecycle rules: Lifecycle transitions and expirations must be configured identically on source and destination buckets/containers.
  3. Legal hold propagation: Legal holds applied in the source must also be applied in the destination. Configure automated propagation.
  4. Deletion propagation: When an object expires or is deleted in the source, the replica must also be deleted. Configure replication to handle delete markers.
  5. Jurisdictional considerations: If the destination region is in a different jurisdiction, confirm that the applicable retention requirements in that jurisdiction do not conflict with the source retention period.

Cross-Region Configuration Checklist

CheckAWSAzureGCP
Lifecycle rules match sourceApply identical S3 lifecycle rules to destination bucketApply identical lifecycle management policy to destination containerApply identical lifecycle rules to destination bucket
Retention/lock settings matchConfigure identical Object Lock settings on destinationApply identical immutability policy to destinationApply identical retention policy to destination
Delete marker replicationEnable DeleteMarkerReplication in replication configEnable blob change feed and handle deletesConfigure bucket notifications for deletion events
Legal hold synchronizationUse Lambda triggered by CloudTrail to propagate legal holdsUse Event Grid + Azure Function to propagate legal holdsUse Cloud Functions triggered by audit logs to propagate holds
MonitoringCloudWatch metrics on replication lagAzure Monitor replication metricsCloud Monitoring replication metrics

Compliance Monitoring

Monthly Cloud Retention Audit

  1. Policy drift detection: Compare active lifecycle rules and retention policies against the approved retention schedule. Flag any discrepancies.
  2. Coverage verification: Confirm that all storage buckets/containers holding personal data have applicable retention policies.
  3. Legal hold inventory: List all active legal holds across all cloud platforms. Cross-reference with the litigation hold register to identify holds that should have been released.
  4. Expiration verification: Sample recently expired objects to confirm they were actually deleted (not just transitioned or soft-deleted).
  5. Cross-region consistency: Verify that replicated buckets/containers maintain identical retention configuration.

Alert Configuration

AlertConditionAction
Policy removedRetention policy or lifecycle rule deleted from a regulated bucketImmediate alert to Cloud Security + DPO
Object lock bypasss3:BypassGovernanceRetention usedAlert to DPO; verify authorized deletion
Legal hold changeLegal hold applied or removedLog to litigation hold register; alert Legal
Retention policy unlock attemptAttempt to modify locked retention policyAlert to Cloud Security (should fail — investigate)
Replication lag > 24hCross-region replication behind by more than 24 hoursAlert IT Operations — potential retention gap in DR region

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Implements 42 CFR Part 2 protections for substance use disorder patient records. Covers written consent requirements stricter than HIPAA, re-disclosure prohibition, court order procedures, qualified service organization agreements, and 2024 amendments aligning Part 2 with HIPAA. Keywords: 42 CFR Part 2, substance use disorder, SUD records, re-disclosure, consent, Part 2 amendments.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Guides assessment of third-country adequacy decisions under GDPR Article 45 for international data transfers. Covers the current EC adequacy decisions list, adequacy assessment criteria, partial adequacy handling, and monitoring of adequacy decision reviews. Keywords: adequacy decision, Article 45, third country, adequate protection, EC adequacy list.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Implements age-gating mechanisms for online services to restrict access based on user age. Covers hard gates versus soft gates, neutral age prompts, re-verification triggers, circumvention prevention, and regulatory requirements under GDPR, COPPA, UK Online Safety Act, and DSA. Keywords: age gate, age restriction, neutral prompt, children, online services, access control.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Evaluates and implements age estimation and verification technologies for online services. Covers facial age estimation, digital ID verification, self-declaration with risk assessment, AI-based age estimation, and the accuracy versus privacy tradeoff. Includes ICO guidance and euCONSENT framework. Keywords: age verification, age estimation, facial analysis, digital ID, children, online safety.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Preparing EU AI Act compliance documentation for high-risk AI systems. Covers Annex III classification, technical documentation under Art. 11, conformity assessment, risk management systems, and CE marking requirements. Keywords: EU AI Act, high-risk AI, Annex III, conformity assessment, CE marking.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Implements GDPR Art. 22 automated decision-making and AI Act Art. 14 human oversight requirements for AI systems. Covers identification of solely automated decisions, meaningful human intervention design, logic explanation mechanisms, and contestation procedures. Keywords: Art. 22, automated decision, human oversight, AI Act, profiling, contestation.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

mukul975 のスキルをすべて見る

このスキルの問題を報告する