pam

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package pam implements the pam grpc service protocol to the daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	authd.UnimplementedPAMServer
	// contains filtered or unexported fields
}

Service is the implementation of the PAM module service.

func NewService

func NewService(ctx context.Context, userManager *users.Manager, brokerManager *brokers.Manager, permissionManager *permissions.Manager) Service

NewService returns a new PAM GRPC service.

func (Service) AvailableBrokers

func (s Service) AvailableBrokers(ctx context.Context, _ *authd.Empty) (*authd.ABResponse, error)

AvailableBrokers returns the list of all brokers with their details.

func (Service) CheckGlobalAccess

func (s Service) CheckGlobalAccess(ctx context.Context, method string) error

CheckGlobalAccess denies all requests not coming from the root user.

func (Service) EndSession

func (s Service) EndSession(ctx context.Context, req *authd.ESRequest) (empty *authd.Empty, err error)

EndSession asks the broker associated with the sessionID to end the session.

func (Service) GetAuthenticationModes

func (s Service) GetAuthenticationModes(ctx context.Context, req *authd.GAMRequest) (resp *authd.GAMResponse, err error)

GetAuthenticationModes fetches a list of authentication modes supported by the broker depending on the session information.

func (Service) GetPreviousBroker

func (s Service) GetPreviousBroker(ctx context.Context, req *authd.GPBRequest) (*authd.GPBResponse, error)

GetPreviousBroker returns the previous broker set for a given user, if any. If the user is not in our cache, it will try to check if it’s on the system, and return then "local".

func (Service) IsAuthenticated

func (s Service) IsAuthenticated(ctx context.Context, req *authd.IARequest) (resp *authd.IAResponse, err error)

IsAuthenticated returns broker answer to authentication request.

func (Service) SelectAuthenticationMode

func (s Service) SelectAuthenticationMode(ctx context.Context, req *authd.SAMRequest) (resp *authd.SAMResponse, err error)

SelectAuthenticationMode set given authentication mode as selected for this sessionID to the broker.

func (Service) SelectBroker

func (s Service) SelectBroker(ctx context.Context, req *authd.SBRequest) (resp *authd.SBResponse, err error)

SelectBroker starts a new session and selects the requested broker for the user.

func (Service) SetDefaultBrokerForUser

func (s Service) SetDefaultBrokerForUser(ctx context.Context, req *authd.SDBFURequest) (empty *authd.Empty, err error)

SetDefaultBrokerForUser sets the default broker for the given user.

Jump to

Keyboard shortcuts

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