mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
1e30b00f7e
This fixes misleading errors for ACL rules with an empty list of domains. This also enables admins to have a default policy with zero ACL rules as long as the default policy is not deny or bypass. It also adds a rule number to all ACL rule related log messages which is the position in the YAML list plus 1. Lastly it adds comprehensive per rule HIT/MISS logging when Authelia trace logging is enabled. This trace logging includes the rule number.
21 lines
458 B
Go
21 lines
458 B
Go
package authorization
|
|
|
|
// Level is the type representing an authorization level.
|
|
type Level int
|
|
|
|
const (
|
|
// Bypass bypass level.
|
|
Bypass Level = iota
|
|
// OneFactor one factor level.
|
|
OneFactor Level = iota
|
|
// TwoFactor two factor level.
|
|
TwoFactor Level = iota
|
|
// Denied denied level.
|
|
Denied Level = iota
|
|
)
|
|
|
|
const userPrefix = "user:"
|
|
const groupPrefix = "group:"
|
|
|
|
const traceFmtACLHitMiss = "ACL %s Position %d for subject %s and object %s (Method %s)"
|