Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidCredentials = errors.New("Invalid Username or Password")
)
View Source
var NewLdapAuthenticator = func(server *LdapServerConf) ILdapAuther { return &ldapAuther{server: server, log: log.New("ldap")} }
Functions ¶
func AuthenticateUser ¶
func AuthenticateUser(query *LoginUserQuery) error
Types ¶
type ILdapAuther ¶
type ILdapAuther interface { Login(query *LoginUserQuery) error SyncSignedInUser(signedInUser *m.SignedInUser) error GetGrafanaUserFor(ldapUser *LdapUserInfo) (*m.User, error) SyncOrgRoles(user *m.User, ldapUser *LdapUserInfo) error }
type ILdapConn ¶
type ILdapConn interface { Bind(username, password string) error Search(*ldap.SearchRequest) (*ldap.SearchResult, error) StartTLS(*tls.Config) error Close() }
type LdapAttributeMap ¶
type LdapConfig ¶
type LdapConfig struct {
Servers []*LdapServerConf `toml:"servers"`
}
var LdapCfg LdapConfig
type LdapGroupToOrgRole ¶
type LdapServerConf ¶
type LdapServerConf struct { Host string `toml:"host"` Port int `toml:"port"` UseSSL bool `toml:"use_ssl"` StartTLS bool `toml:"start_tls"` SkipVerifySSL bool `toml:"ssl_skip_verify"` RootCACert string `toml:"root_ca_cert"` BindDN string `toml:"bind_dn"` BindPassword string `toml:"bind_password"` Attr LdapAttributeMap `toml:"attributes"` SearchFilter string `toml:"search_filter"` SearchBaseDNs []string `toml:"search_base_dns"` GroupSearchFilter string `toml:"group_search_filter"` GroupSearchFilterUserAttribute string `toml:"group_search_filter_user_attribute"` GroupSearchBaseDNs []string `toml:"group_search_base_dns"` LdapGroups []*LdapGroupToOrgRole `toml:"group_mappings"` }
type LdapUserInfo ¶
Click to show internal directories.
Click to hide internal directories.