Documentation ¶
Index ¶
- func NewLoginRateLimiter(storage stateStorage, maxNumber int) func() (util.Closer, error)
- func NewRedisStateStorage(client *redis.Client) *redisStateStorage
- type Authenticator
- type Server
- func (s *Server) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)
- func (s *Server) Create(_ context.Context, q *session.SessionCreateRequest) (*session.SessionResponse, error)
- func (s *Server) Delete(ctx context.Context, q *session.SessionDeleteRequest) (*session.SessionResponse, error)
- func (s *Server) GetUserInfo(ctx context.Context, q *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoginRateLimiter ¶ added in v1.5.3
NewLoginRateLimiter creates a function which enforces max number of concurrent login requests. Function returns closer that should be closed when loging request has completed or error if number of incomplete requests exceeded max number.
func NewRedisStateStorage ¶ added in v1.5.3
NewRedisStateStorage creates storage which leverages redis to establish distributed lock and store number of incomplete login requests.
Types ¶
type Authenticator ¶ added in v1.3.0
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a Session service
func NewServer ¶
func NewServer(mgr *sessionmgr.SessionManager, authenticator Authenticator, rateLimiter func() (util.Closer, error)) *Server
NewServer returns a new instance of the Session service
func (*Server) AuthFuncOverride ¶
func (s *Server) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)
AuthFuncOverride overrides the authentication function and let us not require auth to receive auth. Without this function here, ArgoCDServer.authenticate would be invoked and credentials checked. Since this service is generally invoked when the user has _no_ credentials, that would create a chicken-and-egg situation if we didn't place this here to allow traffic to pass through.
func (*Server) Create ¶
func (s *Server) Create(_ context.Context, q *session.SessionCreateRequest) (*session.SessionResponse, error)
Create generates a JWT token signed by Argo CD intended for web/CLI logins of the admin user using username/password
func (*Server) Delete ¶
func (s *Server) Delete(ctx context.Context, q *session.SessionDeleteRequest) (*session.SessionResponse, error)
Delete an authentication cookie from the client. This makes sense only for the Web client.
func (*Server) GetUserInfo ¶ added in v1.3.0
func (s *Server) GetUserInfo(ctx context.Context, q *session.GetUserInfoRequest) (*session.GetUserInfoResponse, error)