forcedotcom/sf-skills / plugins/builder/platform-trust-security/skills/platform-encryption-configure
platform-encryption-configure
VerifiedConfigure Salesforce Shield Platform Encryption — generate deployable encryption settings and encrypted-field metadata, and answer key-model and lifecycle questions. TRIGGER when: user wants to turn on deterministic encryption, encrypt a field, set up Cache-Only Keys, External Key Management, or replay detection, or mentions Shield Platform Encryption, encryption at rest, deterministic vs probabilistic encryption, encryptionScheme, PlatformEncryptionSettings, EncryptionKeySettings, BYOK, BYOKMS, tenant secrets, key rotation, or .settings-meta.xml / .field-meta.xml for encryption — even when they don't say 'Shield'. SKIP when: user needs a generic custom field with no encryption (use platform-custom-field-generate), needs the raw Metadata API type reference (use platform-metadata-api-context-get), or asks about Classic Encryption (encrypted text fields), which is a different feature. Use this skill for any Platform Encryption configuration, field-encryption, or key-model question.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.0 KB |
| assets/EncryptionKey.settings-meta.xml | config | 1.1 KB |
| assets/PlatformEncryption.settings-meta.xml | config | 955 B |
| assets/encrypted-field.field-meta.xml | config | 1.0 KB |
| examples/cache-only-keys.settings-meta.xml | config | 556 B |
| references/encryption-schemes.md | markdown | 2.4 KB |
| references/key-models.md | markdown | 2.4 KB |
| references/tenant-secret-lifecycle.md | markdown | 1.9 KB |
| scripts/validate-encryption-metadata.shexecutable | script | 1.8 KB |
scripts/validate-encryption-metadata.sh
View on GitHub#!/bin/bash
# Validate a Shield Platform Encryption settings/field XML file for the two
# deterministic contracts this skill must never get wrong:
# 1. enableReplayDetection=true requires enableCacheOnlyKeys=true (one-way dependency)
# 2. encryptionScheme must be one of the four valid enum values
#
# Usage: validate-encryption-metadata.sh <file.xml>
# validate-encryption-metadata.sh --help
# Output: prints "OK" on success; prints ERROR lines to stderr and exits 1 on failure.
set -euo pipefail
if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
echo "Usage: validate-encryption-metadata.sh <file.xml>"
echo "Checks: replay-detection dependency, encryptionScheme enum."
exit 0
fi
FILE="${1:-}"
if [[ -z "$FILE" ]]; then
echo "ERROR: no file given. Usage: validate-encryption-metadata.sh <file.xml>" >&2
exit 1
fi
if [[ ! -f "$FILE" ]]; then
echo "ERROR: file not found: $FILE" >&2
exit 1
fi
errors=0
# 1. Replay-detection one-way dependency.
if grep -q '<enableReplayDetection>true</enableReplayDetection>' "$FILE"; then
if ! grep -q '<enableCacheOnlyKeys>true</enableCacheOnlyKeys>' "$FILE"; then
echo "ERROR: enableReplayDetection=true requires enableCacheOnlyKeys=true in the same file." >&2
errors=$((errors + 1))
fi
fi
# 2. encryptionScheme enum.
scheme=$(grep -oE '<encryptionScheme>[^<]*</encryptionScheme>' "$FILE" | sed -E 's/<\/?encryptionScheme>//g' || true)
if [[ -n "$scheme" ]]; then
case "$scheme" in
ProbabilisticEncryption|CaseSensitiveDeterministicEncryption|CaseInsensitiveDeterministicEncryption|None) ;;
*)
echo "ERROR: invalid encryptionScheme '$scheme'. Must be one of: ProbabilisticEncryption, CaseSensitiveDeterministicEncryption, CaseInsensitiveDeterministicEncryption, None." >&2
errors=$((errors + 1))
;;
esac
fi
if [[ "$errors" -gt 0 ]]; then
exit 1
fi
echo "OK"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |