Skip to content

Commit df41968

Browse files
committed
Add docs
1 parent 604bec1 commit df41968

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

config.example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ jwt_auth_fail_limit = 3
169169
# This also defines the interval at which failed attempts are regularly checked and expired ones are cleaned up.
170170
# OPTIONAL, DEFAULT: 300
171171
jwt_auth_fail_timeout_seconds = 300
172+
# HTTP header to use to determine the real client IP, if the Signer is behind a proxy (e.g. nginx)
173+
# OPTIONAL. If missing, the client IP will be taken directly from the TCP connection.
174+
# trusted_ip_header = "X-Real-IP"
172175

173176
# [signer.tls_mode]
174177
# How to use TLS for the Signer's HTTP server; two modes are supported:

docs/docs/get_started/configuration.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,23 @@ path = "path/to/your/cert/folder"
388388

389389
Where `path` is the aforementioned folder. It defaults to `./certs` but can be replaced with whichever directory your certificate and private key file reside in, as long as they're readable by the Signer service (or its Docker container, if using Docker).
390390

391+
### Rate limit
392+
393+
The Signer service implements a rate limit system of 3 failed authentications every 5 minutes. These values can be modified in the config file:
394+
395+
```toml
396+
[signer]
397+
...
398+
jwt_auth_fail_limit = 3 # The amount of failed requests allowed
399+
jwt_auth_fail_timeout_seconds = 300 # The time window in seconds
400+
```
401+
402+
The rate limit is applied to the IP address of the client making the request. By default, the IP is extracted directly from the TCP connection. If you're running the Signer service behind a reverse proxy (e.g. Nginx), you can configure it to extract the IP from a custom HTTP header instead:
403+
404+
```toml
405+
[signer]
406+
trusted_ip_header = "X-Real-IP"
407+
```
391408

392409
## Custom module
393410

0 commit comments

Comments
 (0)