ruleset: add support for exposed credentials checks
@@ -241,6 +241,7 @@ type RulesetRule struct {
Enabled bool `json:"enabled"`
ScoreThreshold int `json:"score_threshold,omitempty"`
RateLimit *RulesetRuleRateLimit `json:"ratelimit,omitempty"`
+ ExposedCredentialCheck *RulesetRuleExposedCredentialCheck `json:"exposed_credential_check,omitempty"`
}
// RulesetRuleRateLimit contains the structure of a HTTP rate limit Ruleset Rule.
@@ -255,6 +256,13 @@ type RulesetRuleRateLimit struct {
MitigationExpression string `json:"mitigation_expression"`
}
+// RulesetRuleExposedCredentialCheck contains the structure of an exposed
+// credential check Ruleset Rule.
+type RulesetRuleExposedCredentialCheck struct {
+ UsernameExpression string `json:"username_expression,omitempty"`
+ PasswordExpression string `json:"password_expression,omitempty"`
+}
+
// UpdateRulesetRequest is the representation of a Ruleset update.
type UpdateRulesetRequest struct {
Description string `json:"description"`
