mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
aa64d0c4e5
* Added `ActiveDirectory` suite for integration tests with Samba AD * Updated documentation * Minor styling refactor to suites * Clean up LDAP user provisioning * Fix Authelia home splash to reference correct link for webmail * Add notification message for password complexity errors * Add password complexity integration test * Rename implementation default from rfc to custom * add specific defaults for LDAP (activedirectory implementation) * add docs to show the new defaults * add docs explaining the importance of users filter * add tests * update instances of LDAP implementation names to use the new consts where applicable * made the 'custom' case in the UpdatePassword method for the implementation switch the default case instead * update config examples due to the new defaults * apply changes from code review * replace schema default name from MSAD to ActiveDirectory for consistency * fix missing default for username_attribute * replace test raising on empty username attribute with not raising on empty Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
50 lines
2.0 KiB
Go
50 lines
2.0 KiB
Go
package handlers
|
|
|
|
// TOTPRegistrationAction is the string representation of the action for which the token has been produced.
|
|
const TOTPRegistrationAction = "RegisterTOTPDevice"
|
|
|
|
// U2FRegistrationAction is the string representation of the action for which the token has been produced.
|
|
const U2FRegistrationAction = "RegisterU2FDevice"
|
|
|
|
// ResetPasswordAction is the string representation of the action for which the token has been produced.
|
|
const ResetPasswordAction = "ResetPassword"
|
|
|
|
const authPrefix = "Basic "
|
|
|
|
// AuthorizationHeader is the basic-auth HTTP header Authelia utilises.
|
|
const AuthorizationHeader = "Proxy-Authorization"
|
|
const remoteUserHeader = "Remote-User"
|
|
const remoteNameHeader = "Remote-Name"
|
|
const remoteEmailHeader = "Remote-Email"
|
|
const remoteGroupsHeader = "Remote-Groups"
|
|
|
|
var protoHostSeparator = []byte("://")
|
|
|
|
const (
|
|
// Forbidden means the user is forbidden the access to a resource.
|
|
Forbidden authorizationMatching = iota
|
|
// NotAuthorized means the user can access the resource with more permissions.
|
|
NotAuthorized authorizationMatching = iota
|
|
// Authorized means the user is authorized given her current permissions.
|
|
Authorized authorizationMatching = iota
|
|
)
|
|
|
|
const operationFailedMessage = "Operation failed."
|
|
const authenticationFailedMessage = "Authentication failed. Check your credentials."
|
|
const userBannedMessage = "Please retry in a few minutes."
|
|
const unableToRegisterOneTimePasswordMessage = "Unable to set up one-time passwords." //nolint:gosec
|
|
const unableToRegisterSecurityKeyMessage = "Unable to register your security key."
|
|
const unableToResetPasswordMessage = "Unable to reset your password."
|
|
const mfaValidationFailedMessage = "Authentication failed, please retry later."
|
|
|
|
const ldapPasswordComplexityCode = "0000052D"
|
|
|
|
const testInactivity = "10"
|
|
const testRedirectionURL = "http://redirection.local"
|
|
const testResultAllow = "allow"
|
|
const testUsername = "john"
|
|
|
|
const movingAverageWindow = 10
|
|
const msMinimumDelay1FA = float64(250)
|
|
const msMaximumRandomDelay = int64(85)
|