Skip to content

Commit 8e4deb7

Browse files
author
Hayim.Shaul@ibm.com
committed
fix
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
1 parent 45e5a75 commit 8e4deb7

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ Default values:
10071007
- **burst**: Token bucket capacity, absorbing short spikes without raising the sustained rate; values below `rate` are raised to `rate`
10081008
- **window**: Period over which the error and invalid-signature ratios are evaluated
10091009
- **minSamples**: Minimum number of observations in a window before a ratio can escalate a principal
1010-
- **errorRateThreshold**: Fraction of failing operations in a window that escalates a principal; `1` or more disables this trigger
1010+
- **errorRateThreshold**: Fraction of failing operations in a window that escalates a principal; a value greater than `1` disables this trigger
10111011
- **invalidSignatureRateThreshold**: Fraction of rejected verifications in a window that escalates a principal
10121012
- **quotaReductionFactor**: Multiplier applied to `rate` and `burst` while a principal is soft-limited; must be in `(0,1]`
10131013
- **softDuration**: Minimum time a principal stays on the reduced quota

docs/security/signature_observability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ token:
209209
| `burst` | `400` | Bucket capacity, absorbing short spikes without raising the sustained rate. Values below `rate` are raised to `rate`. |
210210
| `window` | `1m` | Evaluation period for the ratio thresholds. |
211211
| `minSamples` | `50` | Minimum observations in a window before a ratio can escalate a principal. |
212-
| `errorRateThreshold` | `0.5` | Failing-operation fraction that escalates. `1` or more disables this trigger. |
212+
| `errorRateThreshold` | `0.5` | Failing-operation fraction that escalates. A value greater than `1` disables this trigger. |
213213
| `invalidSignatureRateThreshold` | `0.2` | Rejected-verification fraction that escalates. Stricter than the error threshold: a healthy caller does not present bad signatures. |
214214
| `quotaReductionFactor` | `0.25` | Multiplier applied to `rate` and `burst` at level `soft`. Must be in `(0,1]`. |
215215
| `softDuration` | `5m` | Minimum time on a reduced quota. |

token/services/identity/throttle/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,11 @@ type Config struct {
9696
// escalate a principal. Zero selects DefaultMinSamples.
9797
MinSamples int `yaml:"minSamples,omitempty"`
9898
// ErrorRateThreshold is the failing-operation fraction that escalates. Zero selects
99-
// DefaultErrorRateThreshold; a value of 1 or more effectively disables this trigger.
99+
// DefaultErrorRateThreshold; a value greater than 1 disables this trigger.
100100
ErrorRateThreshold float64 `yaml:"errorRateThreshold,omitempty"`
101101
// InvalidSignatureRateThreshold is the rejected-verification fraction that escalates.
102-
// Zero selects DefaultInvalidSignatureRateThreshold.
102+
// Zero selects DefaultInvalidSignatureRateThreshold; a value greater than 1 disables
103+
// this trigger.
103104
InvalidSignatureRateThreshold float64 `yaml:"invalidSignatureRateThreshold,omitempty"`
104105
// QuotaReductionFactor multiplies Rate for a soft-limited principal. Zero selects
105106
// DefaultQuotaReductionFactor. Must be in (0,1].
@@ -181,10 +182,10 @@ func (c *Config) Defaults() error {
181182
}
182183

183184
if c.ErrorRateThreshold < 0 {
184-
return errors.Errorf("invalid errorRateThreshold [%g], expected a fraction in [0,1]", c.ErrorRateThreshold)
185+
return errors.Errorf("invalid errorRateThreshold [%g], expected a non-negative value (use > 1 to disable)", c.ErrorRateThreshold)
185186
}
186187
if c.InvalidSignatureRateThreshold < 0 {
187-
return errors.Errorf("invalid invalidSignatureRateThreshold [%g], expected a fraction in [0,1]", c.InvalidSignatureRateThreshold)
188+
return errors.Errorf("invalid invalidSignatureRateThreshold [%g], expected a non-negative value (use > 1 to disable)", c.InvalidSignatureRateThreshold)
188189
}
189190
if c.QuotaReductionFactor <= 0 || c.QuotaReductionFactor > 1 {
190191
return errors.Errorf("invalid quotaReductionFactor [%g], expected a fraction in (0,1]", c.QuotaReductionFactor)

0 commit comments

Comments
 (0)