Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJWTSecretNotConfigured = errors.New("JWT_SECRET environment variable must be set with at least 32 bytes")
ErrJWTSecretNotConfigured is returned when JWT_SECRET is not set or too short
Functions ¶
func GenerateRandomSecret ¶ added in v1.10.0
GenerateRandomSecret creates a cryptographically secure random secret This can be used by administrators to generate a secure JWT_SECRET value
func ValidateJWTSecret ¶ added in v1.10.0
ValidateJWTSecret checks if the JWT secret meets security requirements SECURITY FIX: Validates that JWT secret is configured and meets minimum length
Types ¶
type Config ¶
type Config struct {
Port int
TLSCert string
TLSKey string
JWTSecret string
SessionTimeout int // minutes
IPWhitelistFile string
AuditLogFile string
RequiredGroup string
BlockRootLogin bool
MaxLoginAttempts int
LockoutDuration int // minutes
}
Config holds the application configuration
Click to show internal directories.
Click to hide internal directories.