Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs: add Prevent Value Reuse constraint to secret validation rules

Devin AId69e4d3206bb
diff --git a/docs/documentation/platform/secret-validation-rules.mdx b/docs/documentation/platform/secret-validation-rules.mdx
index d977528bad..6517cfbd2b 100644
--- a/docs/documentation/platform/secret-validation-rules.mdx
+++ b/docs/documentation/platform/secret-validation-rules.mdx
@@ -29,8 +29,9 @@ Each rule contains one or more constraints. A constraint specifies what to check
| **Regex Pattern** | The target must match a regular expression | Key must match `^[A-Z][A-Z0-9_]*$` |
| **Required Prefix** | The target must start with specific text | Value must start with `https://` |
| **Required Suffix** | The target must end with specific text | Key must end with `_SECRET` |
+| **Prevent Value Reuse** | The new value must not match any of the last N versions | Value must not match the last 10 versions |
-Each constraint can be applied to either the secret key or the secret value.
+Each constraint (except **Prevent Value Reuse**) can be applied to either the secret key or the secret value. **Prevent Value Reuse** applies only to the secret value.
### Scoping Rules
@@ -68,7 +69,7 @@ This means you can have different validation standards for different parts of yo
**Constraints**
- Click **Add Constraint** and choose from the available constraint types. For each constraint, select whether it applies to the secret **key** or **value**, then provide the constraint parameter (length, pattern, prefix, or suffix).
+ Click **Add Constraint** and choose from the available constraint types. For each constraint, select whether it applies to the secret **key** or **value**, then provide the constraint parameter (length, pattern, prefix, suffix, or number of previous versions).
You can add multiple constraints to a single rule. All constraints must pass for a secret to be accepted.
@@ -120,4 +121,12 @@ For example, you cannot have two separate "Regex Pattern on key" constraints in
This helps distinguish production secrets from those in other environments.
</Accordion>
+
+ <Accordion title="Prevent reuse of old secret values">
+ Create a rule with a **Prevent Value Reuse** constraint on the **secret value**:
+
+ - Previous versions: `10`
+
+ When a secret is updated, its new value is validated against the specified number of prior versions. This is useful for enforcing rotation policies and ensuring that secrets are not recycled.
+ </Accordion>
</AccordionGroup>