ストーリー
佐
佐藤CTO
来月から大手金融機関との取引が始まる。先方からセキュリティ監査の要求が来た
佐
佐藤CTO
SOC2 Type II レポートの提出、PCI DSS準拠の証明、ISMS認証の取得 — どれもコンプライアンスフレームワークへの準拠が求められている
あなた
フレームワークが多すぎて何から手をつければ…
あ
佐
佐藤CTO
まずは各フレームワークの目的と範囲を理解しよう。そのうえで、共通するコントロールを効率的に実装していく。実は7割は重複しているんだ
主要なコンプライアンスフレームワーク
フレームワーク比較
| フレームワーク | 目的 | 対象 | 認証/監査 | 有効期間 |
|---|
| SOC2 | サービス組織の信頼性証明 | SaaS/クラウドサービス企業 | 外部監査人によるレポート | Type I: 時点、Type II: 期間(通常12ヶ月) |
| ISO 27001 | 情報セキュリティマネジメント体系 | 全業種 | 認証機関による認証 | 3年(年次サーベイランス) |
| PCI DSS | カード情報の保護 | カード情報を扱う企業 | QSA/SAQ | 年次 |
| GDPR | EU市民の個人データ保護 | EU市民のデータを扱う企業 | 規制当局 | 継続的 |
| HIPAA | 医療情報の保護 | 医療関連企業(米国) | HHS | 継続的 |
SOC2(Service Organization Control 2)
Trust Services Criteria(5つの信頼原則)
| 原則 | 内容 | 具体例 |
|---|
| Security(セキュリティ) | 不正アクセスからの保護 | ファイアウォール、暗号化、アクセス制御 |
| Availability(可用性) | サービスの可用性の維持 | SLA、DR計画、監視 |
| Processing Integrity(処理の完全性) | データ処理の正確性と適時性 | データ検証、エラーハンドリング |
| Confidentiality(機密性) | 機密情報の保護 | 暗号化、アクセス制限、データ分類 |
| Privacy(プライバシー) | 個人情報の収集・利用・保管・開示 | プライバシーポリシー、同意管理 |
SOC2対応の技術的コントロール
// soc2-controls.ts - SOC2対応に必要な技術的コントロールの実装
// CC6.1: Logical and Physical Access Controls
interface AccessControlPolicy {
authentication: {
mfaRequired: boolean;
passwordPolicy: {
minLength: number;
requireUppercase: boolean;
requireLowercase: boolean;
requireNumbers: boolean;
requireSpecialChars: boolean;
expirationDays: number;
historyCount: number; // 過去N回のパスワード再利用禁止
};
sessionPolicy: {
maxIdleMinutes: number;
maxSessionHours: number;
concurrentSessionLimit: number;
};
};
authorization: {
model: 'RBAC' | 'ABAC';
leastPrivilege: boolean;
periodicReview: {
frequencyDays: number;
reviewer: string;
};
};
}
const soc2AccessControl: AccessControlPolicy = {
authentication: {
mfaRequired: true,
passwordPolicy: {
minLength: 12,
requireUppercase: true,
requireLowercase: true,
requireNumbers: true,
requireSpecialChars: true,
expirationDays: 90,
historyCount: 12,
},
sessionPolicy: {
maxIdleMinutes: 15,
maxSessionHours: 8,
concurrentSessionLimit: 3,
},
},
authorization: {
model: 'RBAC',
leastPrivilege: true,
periodicReview: {
frequencyDays: 90,
reviewer: 'Security Team',
},
},
};
// CC7.2: Monitoring Activities
interface MonitoringConfig {
logging: {
auditLogRetentionDays: number;
logTypes: string[];
immutableStorage: boolean;
encryptedAtRest: boolean;
};
alerting: {
securityEvents: AlertRule[];
responseTimeSla: Record<string, string>;
};
}
interface AlertRule {
name: string;
condition: string;
severity: 'critical' | 'high' | 'medium' | 'low';
notification: string[];
}
const soc2Monitoring: MonitoringConfig = {
logging: {
auditLogRetentionDays: 365,
logTypes: [
'authentication', // ログイン/ログアウト
'authorization', // 権限チェック
'data-access', // データアクセス
'data-modification', // データ変更
'system-configuration', // 設定変更
'admin-actions', // 管理者操作
],
immutableStorage: true, // ログの改ざん防止
encryptedAtRest: true,
},
alerting: {
securityEvents: [
{
name: 'Multiple Failed Logins',
condition: 'failed_login_count > 5 within 10min from same IP',
severity: 'high',
notification: ['#security-alerts', 'security@company.com'],
},
{
name: 'Privilege Escalation Attempt',
condition: 'unauthorized_access to admin endpoints',
severity: 'critical',
notification: ['#security-incidents', 'oncall-security'],
},
{
name: 'Data Export Above Threshold',
condition: 'data_export_rows > 10000 within 1hour',
severity: 'medium',
notification: ['#security-alerts'],
},
],
responseTimeSla: {
critical: '15 minutes',
high: '1 hour',
medium: '4 hours',
low: '24 hours',
},
},
};
ISO 27001(ISMS)
Annex A コントロール(ISO 27001
)
ISO 27001
Aには93のコントロールが4カテゴリに分類されています。
| カテゴリ | コントロール数 | 主な内容 |
|---|
| Organizational(組織的) | 37 | ポリシー、役割、サプライヤー管理 |
| People(人的) | 8 | 採用審査、教育訓練、退職時の対応 |
| Physical(物理的) | 14 | 入退室管理、機器管理、環境セキュリティ |
| Technological(技術的) | 34 | アクセス制御、暗号化、ネットワークセキュリティ |
ISMS構築のステップ
1. スコープ定義
│ 対象とする組織・システム・プロセスの範囲を決定
▼
2. リスクアセスメント
│ 資産の洗い出し → 脅威の特定 → リスク評価 → リスク対応計画
▼
3. 適用宣言書(SoA)作成
│ Annex Aの93コントロールの適用可否と理由を文書化
▼
4. コントロール実装
│ 技術的・組織的・人的・物理的コントロールの実装
▼
5. 内部監査
│ ISMS の有効性を自己評価
▼
6. マネジメントレビュー
│ 経営層によるISMSの見直し
▼
7. 認証審査(Stage 1 + Stage 2)
│ 認証機関による審査
▼
8. 継続的改善(PDCA)
年次サーベイランス審査 + 3年ごとの再認証
リスクアセスメントの実装例
// risk-assessment.ts
interface InformationAsset {
id: string;
name: string;
category: 'data' | 'system' | 'service' | 'people' | 'physical';
owner: string;
classification: 'Restricted' | 'Confidential' | 'Internal' | 'Public';
value: number; // 1-5(資産価値)
}
interface ThreatScenario {
id: string;
assetId: string;
threat: string;
vulnerability: string;
likelihood: number; // 1-5
impact: number; // 1-5
riskScore: number; // likelihood * impact
riskLevel: 'Very High' | 'High' | 'Medium' | 'Low' | 'Very Low';
treatment: 'Mitigate' | 'Transfer' | 'Avoid' | 'Accept';
controls: string[];
}
function calculateRiskLevel(likelihood: number, impact: number): string {
const score = likelihood * impact;
if (score >= 20) return 'Very High';
if (score >= 15) return 'High';
if (score >= 10) return 'Medium';
if (score >= 5) return 'Low';
return 'Very Low';
}
// リスクアセスメント例
const riskAssessment: ThreatScenario[] = [
{
id: 'RISK-001',
assetId: 'ASSET-DB-001',
threat: '外部攻撃者によるSQLインジェクション',
vulnerability: '入力バリデーション不足',
likelihood: 4,
impact: 5,
riskScore: 20,
riskLevel: 'Very High',
treatment: 'Mitigate',
controls: [
'A.8.25 Secure development lifecycle',
'A.8.26 Application security requirements',
'A.8.28 Secure coding',
],
},
{
id: 'RISK-002',
assetId: 'ASSET-CRED-001',
threat: '従業員の認証情報の漏洩',
vulnerability: 'フィッシング攻撃への脆弱性',
likelihood: 3,
impact: 4,
riskScore: 12,
riskLevel: 'Medium',
treatment: 'Mitigate',
controls: [
'A.6.3 Information security awareness, education and training',
'A.8.5 Secure authentication',
],
},
];
PCI DSS(Payment Card Industry Data Security Standard)
PCI DSS v4.0 の12要件
| 要件番号 | カテゴリ | 要件 |
|---|
| 1 | ネットワーク | ネットワークセキュリティコントロールの導入と維持 |
| 2 | ネットワーク | 全システムコンポーネントへのセキュアな設定の適用 |
| 3 | データ保護 | 保存されたアカウントデータの保護 |
| 4 | データ保護 | オープンな公衆ネットワークでの伝送時の暗号化 |
| 5 | 脆弱性管理 | 悪意のあるソフトウェアからの保護 |
| 6 | 脆弱性管理 | セキュアなシステムとソフトウェアの開発と維持 |
| 7 | アクセス制御 | ビジネス上の必要性に基づくアクセス制限 |
| 8 | アクセス制御 | ユーザーの識別とシステムコンポーネントへの認証 |
| 9 | 物理セキュリティ | カード会員データへの物理的アクセスの制限 |
| 10 | 監視 | システムコンポーネントおよびカード会員データへのアクセスのログ記録と監視 |
| 11 | テスト | セキュリティシステムおよびプロセスの定期的テスト |
| 12 | ポリシー | 情報セキュリティポリシーの維持 |
PCI DSS対応の技術的実装
// pci-dss-controls.ts
// 要件3: カード情報の保護
interface CardDataProtection {
storage: {
panEncryption: 'AES-256-GCM'; // PAN暗号化
panMasking: string; // 表示時のマスク(前6桁・後4桁のみ表示可)
cvvStorage: 'PROHIBITED'; // CVV保存禁止
pinStorage: 'PROHIBITED'; // PIN保存禁止
keyManagement: 'AWS KMS' | 'HSM';
keyRotationDays: number;
};
tokenization: {
enabled: boolean;
provider: string;
scope: string[];
};
}
const cardProtection: CardDataProtection = {
storage: {
panEncryption: 'AES-256-GCM',
panMasking: '****-****-****-1234', // 後4桁のみ
cvvStorage: 'PROHIBITED',
pinStorage: 'PROHIBITED',
keyManagement: 'AWS KMS',
keyRotationDays: 90,
},
tokenization: {
enabled: true,
provider: 'Stripe',
scope: ['payment-processing', 'recurring-billing'],
},
};
// 要件10: ログ記録と監視
interface PciAuditLog {
requiredEvents: string[];
retentionPolicy: {
onlineRetentionDays: number;
archiveRetentionMonths: number;
immutable: boolean;
};
syncRequirements: {
ntpServer: string;
maxDriftSeconds: number;
};
}
const pciAuditConfig: PciAuditLog = {
requiredEvents: [
'user-authentication', // ログイン成功/失敗
'access-to-cardholder-data', // カード情報へのアクセス
'admin-actions', // 管理者操作
'audit-log-access', // 監査ログ自体へのアクセス
'system-level-events', // システムイベント
'security-events', // セキュリティイベント
],
retentionPolicy: {
onlineRetentionDays: 90, // 即時利用可能: 3ヶ月
archiveRetentionMonths: 12, // アーカイブ: 12ヶ月
immutable: true, // ログの改ざん防止
},
syncRequirements: {
ntpServer: 'time.aws.com',
maxDriftSeconds: 1,
},
};
GDPR(General Data Protection Regulation)
7つの原則
| 原則 | 説明 | 技術的対策 |
|---|
| Lawfulness | 合法的な根拠に基づく処理 | 同意管理システム |
| Purpose Limitation | 目的の限定 | データカタログ、アクセス制御 |
| Data Minimisation | 必要最小限のデータ収集 | スキーマレビュー |
| Accuracy | データの正確性 | データ品質チェック |
| Storage Limitation | 保持期間の制限 | 自動削除ポリシー |
| Integrity & Confidentiality | セキュリティの確保 | 暗号化、アクセス制御 |
| Accountability | 説明責任 | 監査証跡、DPIA |
データ主体の権利への技術対応
// gdpr-data-subject-rights.ts
interface DataSubjectRightsHandler {
// アクセス権(第15条): データ主体のデータを全て提供
handleAccessRequest(userId: string): Promise<PersonalDataExport>;
// 削除権(忘れられる権利 第17条): データの完全削除
handleErasureRequest(userId: string): Promise<ErasureResult>;
// データポータビリティ権(第20条): 機械可読形式でデータ提供
handlePortabilityRequest(userId: string): Promise<PortableData>;
// 処理の制限権(第18条): データ処理の一時停止
handleRestrictionRequest(userId: string): Promise<void>;
}
// 削除権(忘れられる権利)の実装
class GdprErasureHandler {
async handleErasure(userId: string): Promise<ErasureResult> {
const result: ErasureResult = {
requestId: crypto.randomUUID(),
userId,
requestedAt: new Date().toISOString(),
systems: [],
};
// Step 1: 全システムからユーザーデータを特定
const dataSources = [
{ name: 'user-db', handler: this.eraseFromUserDb },
{ name: 'order-db', handler: this.anonymizeOrders },
{ name: 'analytics', handler: this.eraseFromAnalytics },
{ name: 'logs', handler: this.anonymizeLogs },
{ name: 'backups', handler: this.scheduleBackupPurge },
{ name: 'third-party', handler: this.notifyThirdParties },
];
for (const source of dataSources) {
try {
await source.handler(userId);
result.systems.push({ name: source.name, status: 'completed' });
} catch (error) {
result.systems.push({
name: source.name,
status: 'failed',
error: (error as Error).message,
});
}
}
// Step 2: 監査ログ記録(削除自体の記録は保持義務あり)
await this.auditLog.record({
action: 'GDPR_ERASURE',
userId,
result,
timestamp: new Date().toISOString(),
});
return result;
}
// 注文データは法的保持義務があるため匿名化
private async anonymizeOrders(userId: string): Promise<void> {
await prisma.order.updateMany({
where: { userId },
data: {
customerName: 'ANONYMIZED',
customerEmail: 'anonymized@deleted.local',
shippingAddress: 'ANONYMIZED',
phoneNumber: null,
},
});
}
}
interface ErasureResult {
requestId: string;
userId: string;
requestedAt: string;
systems: { name: string; status: string; error?: string }[];
}
interface PersonalDataExport {
format: 'JSON';
data: Record<string, unknown>;
generatedAt: string;
}
interface PortableData {
format: 'JSON' | 'CSV';
data: Record<string, unknown>;
}
監査準備のベストプラクティス
コントロールマッピング(フレームワーク横断)
| コントロール | SOC2 | ISO 27001 | PCI DSS | GDPR |
|---|
| アクセス制御 | CC6.1 | A.8.3 | 要件7,8 | Art.32 |
| 暗号化 | CC6.7 | A.8.24 | 要件3,4 | Art.32 |
| ログ監視 | CC7.2 | A.8.15 | 要件10 | Art.30 |
| インシデント対応 | CC7.3 | A.5.24-28 | 要件12 | Art.33,34 |
| 変更管理 | CC8.1 | A.8.32 | 要件6 | — |
| リスク管理 | CC3.1 | 6.1 | 要件12 | Art.35 |
ポイント: 共通するコントロールを1つの実装で複数のフレームワークに対応させる「統合コンプライアンスアプローチ」が効率的です。
まとめ
| ポイント | 内容 |
|---|
| SOC2 | 5つのTrust Services Criteriaに基づくサービス組織の信頼性証明 |
| ISO 27001 | PDCAサイクルによるISMS構築と93のAnnex Aコントロール |
| PCI DSS | カード情報保護の12要件、トークン化と暗号化が中核 |
| GDPR | データ主体の権利保護、忘れられる権利への技術対応 |
| 統合アプローチ | フレームワーク横断のコントロールマッピングで効率的に対応 |
チェックリスト
次のステップへ
次は「インシデント対応計画」です。セキュリティインシデントが発生した場合の対応プロセスとコミュニケーション計画を学びましょう。
推定読了時間: 30分