Versions in this module Expand all Collapse all v8 v8.0.2 Oct 4, 2024 v8.0.2-rc0 Sep 27, 2024 v8.0.1 Mar 21, 2024 v8.0.1-rc1 Mar 21, 2024 v8.0.1-rc0 Mar 21, 2024 v8.0.0 Jan 30, 2024 Changes in this version + const CurrentUserKey + const KEY_DELIM + const LDAPNoTLS + const LDAPWithTLS + const PrivLevelAdmin + const PrivLevelFederation + const PrivLevelInvalid + const PrivLevelOperations + const PrivLevelPortal + const PrivLevelReadOnly + const PrivLevelSteering + const PrivLevelUnauthenticated + const TenantIDInvalid + var DefaultParams = SCRYPTComponents + func AuthenticateUserDN(userDN string, password string, cfg *config.ConfigLDAP) (bool, error) + func CheckLDAPUser(form PasswordForm, cfg *config.ConfigLDAP) (bool, error) + func CheckLocalUserIsAllowed(username string, db *sqlx.DB, ctx context.Context) (bool, error, error) + func CheckLocalUserPassword(form PasswordForm, db *sqlx.DB, ctx context.Context) (bool, error, error) + func CheckLocalUserToken(token string, db *sqlx.DB, timeout time.Duration) (bool, string, error) + func ConnectToLDAP(cfg *config.ConfigLDAP) (*ldap.Conn, error) + func DerivePassword(password string) (string, error) + func GetUserUcdn(form PasswordForm, db *sqlx.DB, ctx context.Context) (string, error) + func InitUsersCache(interval time.Duration, db *sql.DB, timeout time.Duration) + func IsCommonPassword(pw string) bool + func IsGoodLoginPair(username string, password string) (bool, error) + func IsGoodPassword(password string) (bool, error) + func LoadPasswordBlacklist(filePath string) error + func LookupUserDN(username string, cfg *config.ConfigLDAP) (string, bool, error) + func ParseClientCertificateUID(cert *x509.Certificate) (string, error) + func VerifyClientCertificate(r *http.Request, rootCertsDirPath string, insecureSkipVerify bool) error + func VerifySCRYPTPassword(password string, scryptPassword string) error + type CurrentUser struct + Capabilities pq.StringArray + ID int + PrivLevel int + Role int + RoleName string + TenantID int + UCDN string + UserName string + func GetCurrentUser(ctx context.Context) (*CurrentUser, error) + func GetCurrentUserFromDB(DB *sqlx.DB, user string, timeout time.Duration) (CurrentUser, error, error, int) + func (cu CurrentUser) Can(permission string) bool + func (cu CurrentUser) MissingPermissions(permissions ...string) []string + type PasswordForm struct + Password string + Username string + type SCRYPTComponents struct + Algorithm string + DK []byte + DKLen int + N int + P int + R int + Salt []byte + SaltLen int v8.0.0-rc6 Jan 24, 2024 v8.0.0-rc5 Jan 17, 2024 v8.0.0-rc4 Oct 23, 2023 v8.0.0-rc3 Oct 3, 2023 v8.0.0-rc2 Sep 25, 2023 v8.0.0-rc1 Sep 22, 2023 Other modules containing this package github.com/apache/trafficcontrol