feat: add support for deny by default access controls

This commit is contained in:
Stavros
2026-05-12 17:21:45 +03:00
parent a9eac7edd2
commit 3fd56272d2
7 changed files with 268 additions and 222 deletions
+8
View File
@@ -24,6 +24,9 @@ func NewDefaultConfiguration() *Config {
SessionMaxLifetime: 0, // disabled
LoginTimeout: 300, // 5 minutes
LoginMaxRetries: 3,
ACLS: ACLSConfig{
Policy: "allow",
},
},
UI: UIConfig{
Title: "Tinyauth",
@@ -114,6 +117,7 @@ type AuthConfig struct {
LoginTimeout int `description:"Login timeout in seconds." yaml:"loginTimeout"`
LoginMaxRetries int `description:"Maximum login retries." yaml:"loginMaxRetries"`
TrustedProxies []string `description:"Comma-separated list of trusted proxy addresses." yaml:"trustedProxies"`
ACLS ACLSConfig `description:"ACLs configuration." yaml:"acls"`
}
type UserAttributes struct {
@@ -223,6 +227,10 @@ type OIDCClientConfig struct {
Name string `description:"Client name in UI." yaml:"name"`
}
type ACLSConfig struct {
Policy string `description:"ACL policy for allow-by-default or deny-by-defaut, available options are allow and deny default is allow." yaml:"policy"`
}
// ACLs
type Apps struct {