ldap

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package ldap contains an AuthProvider implementation that uses a remote LDAP server for authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a new LDAPAuthProvider.

Types

type AuthProvider

type AuthProvider struct {
	common.AuthProvider
	// contains filtered or unexported fields
}

AuthProvider implements an auth provider that uses an LDAP server as the authentication backend. Access to groups in LDAP is supplied through annotations on VDIRoles.

func (*AuthProvider) Authenticate

func (a *AuthProvider) Authenticate(req *types.LoginRequest) (*types.AuthResult, error)

Authenticate is called for API authentication requests. It should generate a new JWTClaims object and serve an AuthResult back to the API.

func (*AuthProvider) Close

func (a *AuthProvider) Close() error

Close just returns nil as connections are not persistent

func (*AuthProvider) CreateUser

func (a *AuthProvider) CreateUser(*types.CreateUserRequest) error

CreateUser should handle any logic required to register a new user in kVDI.

func (*AuthProvider) DeleteUser

func (a *AuthProvider) DeleteUser(string) error

DeleteUser should remove a VDIUser.

func (*AuthProvider) GetUser

func (a *AuthProvider) GetUser(username string) (*types.VDIUser, error)

GetUser should retrieve a single VDIUser.

func (*AuthProvider) GetUsers

func (a *AuthProvider) GetUsers() ([]*types.VDIUser, error)

GetUsers should return a list of VDIUsers.

func (*AuthProvider) Reconcile

func (a *AuthProvider) Reconcile(ctx context.Context, reqLogger logr.Logger, c client.Client, cluster *appv1.VDICluster, adminPass string) error

Reconcile just makes sure that we are able to succesfully set up a connection. The generated admin password is ignored for now in place of configuring admin groups.

func (*AuthProvider) Setup

func (a *AuthProvider) Setup(c client.Client, cluster *appv1.VDICluster) error

Setup implements the AuthProvider interface and sets a local reference to the k8s client and vdi cluster.

func (*AuthProvider) UpdateUser

func (a *AuthProvider) UpdateUser(string, *types.UpdateUserRequest) error

UpdateUser should update a VDIUser.

Jump to

Keyboard shortcuts

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