Repository navigation
Conversation
- Document the per-cached-user audit rate and its zero setting. - Describe the first fractional permit and the limiter cache lifetime. - Update the English and Chinese configuration references.
- Explain the saturated-counter reset in the English option reference. - Apply the same integer timer wording to the Chinese reference. - Retain the fractional-rate examples and cache boundary.
imbajin
left a comment
There was a problem hiding this comment.
Score: 6.5/10 · Confidence: high
Blocking: yes
Summary
Fractional audit-rate guidance depends on an unmerged server change and can lead operators to suppress audit output.
Evidence
Apache server master casts the rate to an integer; the linked server fix remains open in a fork.
Validation notes
Source inspection only; no running server test.
|
|
||
| At `0`, the authentication proxy emits no audit records. Authentication and authorization continue to run. | ||
|
|
||
| For a positive rate below `1`, the first record can be logged immediately. At `0.5`, subsequent records are at least two seconds apart while the user's |
There was a problem hiding this comment.
On current Apache HugeGraph master, RateLimiter.create(double) casts the rate to an integer, so 0.5 becomes zero and audit records are suppressed. The linked server fix is still open in the fork. Publishing this guidance first can cause operators to lose audit output. Please retain the current behavior until the fix reaches Apache, or clearly qualify the applicable server version. This is based on source inspection; I did not run the server.
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: yes. Summary: Apache master and 1.7.0 truncate auth.audit_log_rate to an integer, so the Chinese fractional-rate paragraph, like the English one already flagged, says 0.5 logs records when it suppresses them all.
|
|
||
| 设为 `0` 时,鉴权代理不输出审计日志,认证和授权照常执行。 | ||
|
|
||
| 设为大于 `0` 且小于 `1` 的值时,首条记录可立即输出。设为 `0.5` 时,只要用户的限额状态仍在缓存中,后续记录至少间隔两秒。 |
There was a problem hiding this comment.
Important: on Apache master and 1.7.0, RateLimiter.create casts the rate to int, so 0.5 yields a limit of 0 and no audit record is logged; this paragraph describes the unmerged fork fix. Keep the truncation wording here until that fix lands in apache/hugegraph, or name the server version that adds it.
| limiter remains in the cache. The limiter state is held in memory and resets when the cache entry is removed or the Server restarts. | ||
|
|
||
| For values of `1` or above, the record limit is the integer part of the rate, capped at `Integer.MAX_VALUE`. For example, `1.9` sets a limit of one record. | ||
| The existing timer runs once per second and clears the count only when it has reached the limit. A partial count carries forward. |
There was a problem hiding this comment.
Minor: "The existing timer" anchors the doc in time, and the Chinese page repeats it as 原有计时器. Write "A timer" here and 计时器 there.
Purpose
A configured audit rate between zero and one could fail when the per-user limiter was first created. It now allows one audit record per configured interval for each cached user limiter.
Main Changes
Verification
Checked the English and Chinese pages locally.
Server PR