Appearance
Naming Conventions
Establish consistent naming across policy examples, identifiers, and external claims. Use these rules when adding or updating examples in the policy docs.
What You'll Learn
- How to name keys, enums, ids/refs, and external claims consistently
- When to keep vendor or OS literals unchanged
- Examples for common fields like claimsMapping and retentionPolicyRef
Overview
Use readable, predictable case styles for different token types in examples. Favor lowerCamelCase for keys and enums, kebab-case for user-defined identifiers, and UPPER_SNAKE_CASE for environment variables.
Conventions
- JSON keys: lowerCamelCase
- Examples:
usPersonStatus,clearanceLevel,exportControlTraining,deliveryGuarantee,patternType.
- Examples:
- Enum values: lowerCamelCase
- Examples:
atLeastOnceConfirmed,memoryBacked,hostCertificateStore.
- Examples:
- User-defined identifiers (ids, refs, slugs): kebab-case (lowercase, digits, hyphens)
- Applies to:
id,providerId,adapterRef,retentionPolicyRef, etc. - Examples:
purview-gcc-high,worm-7y,worm-7y-itar.
- Applies to:
- Environment variables and placeholder tokens: UPPER_SNAKE_CASE
- Examples:
PROXY_USER,PROXY_PASS,PII_SALT,CUI_WATERMARK_SALT,<<CUI_LABEL_GUID>>.
- Examples:
- External identity claims (IdP-sourced) in examples: namespaced lowerCamelCase with
ext.prefix- Examples:
ext.usPersonVerified,ext.securityClearance,ext.exportTrainingCurrent. - Mapping pattern:
"claimsMapping": { "usPersonStatus": "ext.usPersonVerified" }.
- Examples:
- Sample usernames/workspace names in generic examples: kebab-case
- Examples:
jdoe-ws-alpha,eng-build-01.
- Examples:
Exceptions and Literals
- Preserve literal third-party or OS-specific names when required for correctness.
- Examples:
sublime_text.exe,CurrentUser_My,id_rsa.
- Examples:
- Keep vendor-native styles inside vendor-specific contexts.
- Example (Perforce):
P4CLIENT: "jdoe_ws_alpha"is acceptable and should remain underscore-delimited.
- Example (Perforce):
- Classification vocabulary uses prescribed formats and is not normalized to the above cases.
- Examples:
CUI//SP-CTI,ITAR,EAR99.
- Examples:
Example Updates
- Claims mapping (preferred style)
json
{
"configuration": {
"identity": {
"claimsMapping": {
"usPersonStatus": "ext.usPersonVerified",
"clearanceLevel": "ext.securityClearance",
"exportControlTraining": "ext.exportTrainingCurrent"
}
}
}
}- Retention policy references (kebab-case)
json
{
"complianceMetadata": { "retentionPolicyRef": "worm-7y" }
}Troubleshooting
- If a value is part of an external system contract (file name, registry store, IdP claim string), keep the exact literal and normalize only our example keys/ids around it.
- When in doubt, prefer clarity and add a short note indicating why a literal style was preserved.
