ldap

package
v0.0.0-...-dc8d137 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanMappingsLDAPData

func CleanMappingsLDAPData(tomldata []string) []string

clean all the current group mappings from the ldap-toml secret

func CreateGroupMappings

func CreateGroupMappings(groupdn, role, header string, orgid int, root bool) []string

build the new group mappings object containing all the ldap-groups and group mappings for the ldap-toml config

func GetAllLDAPGroups

func GetAllLDAPGroups(namespace string) map[string]string

get all the groups from the ldap-groups configmap

func GetLDAPData

func GetLDAPData(namespace, datakey string) ([]string, error)

get ldap-toml secret data field in given namespace

func GetLDAPGroup

func GetLDAPGroup(namespace, tenantname string) string

get a specific group from the ldap-groups configmap the tenant/namespace name is input for search

func GetLDAPSecret

func GetLDAPSecret(namespace string) *v1.Secret

get ldap-toml secret in given namespace

func GetOrgIDFromLDAPSecret

func GetOrgIDFromLDAPSecret(namespace string, toml []string) []string

get all organization ids from the ldap-toml secret

func UpdateLDAPSecret

func UpdateLDAPSecret(namespace, datakey string, toml *v1.Secret, tomldata []string) *v1.Secret

Update the ldap secret with net ldap-toml data

Types

type GroupMapping

type GroupMapping struct {
	Header       string
	GroupDN      string
	OrgID        int
	OrgRole      string
	GrafanaAdmin bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL