You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config.example.toml
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,14 @@ jwt_auth_fail_limit = 3
185
185
# OPTIONAL, DEFAULT: 300
186
186
jwt_auth_fail_timeout_seconds = 300
187
187
188
+
# HTTP header to use to determine the real client IP, if the Signer is behind a proxy (e.g. nginx)
189
+
# OPTIONAL. If missing, the client IP will be taken directly from the TCP connection.
190
+
# [signer.reverse_proxy]
191
+
# Unique: HTTP header name to use to determine the real client IP. Expected to appear only once in the request. Requests with multiple values of this header will be rejected.
192
+
# unique = "X-Real-IP"
193
+
# Rightmost: HTTP header name to use to determine the real client IP from a comma-separated list of IPs. Rightmost IP is the client IP. If the header appears multiple times, the last value will be used.
194
+
# rightmost = "X-Forwarded-For"
195
+
188
196
# [signer.tls_mode]
189
197
# How to use TLS for the Signer's HTTP server; two modes are supported:
190
198
# - type = "insecure": disable TLS, so the server runs in HTTP mode (not recommended for production).
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).
390
390
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. There're two options:
403
+
404
+
-`unique`: The name of the HTTP header that contains the IP. This header is expected to appear only once in the request. This is common when using `X-Real-IP`, `True-Client-IP`, etc. If a request is received that has multiple values for this header, it will be considered invalid and rejected.
405
+
-`rightmost`: The name of the HTTP header that contains a comma-separated list of IPs. The rightmost IP in the list is used. If the header appears multiple times, the last occurrence is used. This is common when using `X-Forwarded-For`.
0 commit comments