release: 1.9.0: Per-application client IP allow-list and rate-limit overrides
Application sending controls: client IP allow-list for authorization, and level-2 rate limits that override the domain ceiling per application. Added: - Per-application **client IP allow-list** on the domain page: when enabled, - SQLite migration `0009_application_auth_ips.sql` (moves legacy trusted IPs Changed: - Application level-2 rate limit **overrides** the domain limit for that login - Domain export/import carries `auth_ip_restrict` / `auth_allowed_ips`; legacy - Panel help, Settings, and [guide.md](docs/guide.md) describe override semantics - [guide.md](docs/guide.md): full-backup section documents all four capture Full detail: CHANGELOG.md (1.9.0).
This commit is contained in:
+10
-3
@@ -199,12 +199,13 @@ func (s *Service) RateLimit(appID int64) (store.RateLimit, bool, error) {
|
||||
return s.store.GetRateLimit(store.RateLimitScopeApp, appID)
|
||||
}
|
||||
|
||||
// SaveRateLimit stores the application-level trusted-IP override (guide § Rate
|
||||
// limiting). The caller has validated the IPs and numbers (security.md); the
|
||||
// milter reads the row live, so no reload is needed.
|
||||
// SaveRateLimit stores the application-level rate limit (guide § Rate
|
||||
// limiting). The caller has validated the numbers (security.md); the milter
|
||||
// reads the row live, so no reload is needed.
|
||||
func (s *Service) SaveRateLimit(appID int64, rl store.RateLimit) error {
|
||||
rl.Scope = store.RateLimitScopeApp
|
||||
rl.RefID = appID
|
||||
rl.AllowedIPs = nil
|
||||
return s.store.SetRateLimit(rl)
|
||||
}
|
||||
|
||||
@@ -214,6 +215,12 @@ func (s *Service) ClearRateLimit(appID int64) error {
|
||||
return s.store.DeleteRateLimit(store.RateLimitScopeApp, appID)
|
||||
}
|
||||
|
||||
// UpdateAuthIPs sets client IP restriction for an application (guide § Rate
|
||||
// limiting — authorization). The caller has validated the IPs (security.md).
|
||||
func (s *Service) UpdateAuthIPs(appID int64, restrict bool, ips []string) error {
|
||||
return s.store.UpdateApplicationAuthIPs(appID, restrict, ips)
|
||||
}
|
||||
|
||||
// PurgeDomainSASL removes the SASL accounts of every application bound to a
|
||||
// domain. It must be called before the domain's registry rows are cascade-
|
||||
// deleted, while the logins are still known (product.md). The registry rows and
|
||||
|
||||
Reference in New Issue
Block a user