service

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Auth paths
	AuthLoginPath    = "/auth/login"
	AuthCallbackPath = "/auth/callback"
)

The authentication process does the following 1 - Authenticate against a valid OIDC provider, currently only Google is supported 2 - Generate a chainloop signed JWT to be sent to the client

Variables

ProviderSet is service providers.

Functions

This section is empty.

Types

type AttestationService

type AttestationService struct {
	cpAPI.UnimplementedAttestationServiceServer
	// contains filtered or unexported fields
}

func NewAttestationService

func NewAttestationService(opts *NewAttestationServiceOpts) *AttestationService

func (*AttestationService) GetUploadCreds

There is another endpoint to get credentials via casCredentialsService.Get This one is kept since it leverages robot-accounts in the context of a workflow

type AuthService

type AuthService struct {
	pb.UnimplementedAuthServiceServer

	AuthURLs *AuthURLs
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(userUC *biz.UserUseCase, orgUC *biz.OrganizationUseCase, mUC *biz.MembershipUseCase, cbUC *biz.CASBackendUseCase, authConfig *conf.Auth, serverConfig *conf.Server, opts ...NewOpt) (*AuthService, error)

func (*AuthService) DeleteAccount

DeleteAccount deletes an account

func (*AuthService) RegisterCallbackHandler

func (svc *AuthService) RegisterCallbackHandler() http.Handler

func (*AuthService) RegisterLoginHandler

func (svc *AuthService) RegisterLoginHandler() http.Handler

type AuthURLs

type AuthURLs struct {
	Login string
	// contains filtered or unexported fields
}

type CASBackendService added in v0.14.0

type CASBackendService struct {
	pb.UnimplementedCASBackendServiceServer
	// contains filtered or unexported fields
}

func NewCASBackendService added in v0.14.0

func NewCASBackendService(uc *biz.CASBackendUseCase, providers backend.Providers, opts ...NewOpt) *CASBackendService

func (*CASBackendService) Create added in v0.14.0

func (*CASBackendService) Delete added in v0.14.0

Delete the CAS backend

func (*CASBackendService) List added in v0.14.0

func (*CASBackendService) Update added in v0.14.0

type CASCredentialsService

type CASCredentialsService struct {
	pb.UnimplementedCASCredentialsServiceServer
	// contains filtered or unexported fields
}

func NewCASCredentialsService

func NewCASCredentialsService(casUC *biz.CASCredentialsUseCase, casmUC *biz.CASMappingUseCase, casBUC *biz.CASBackendUseCase, opts ...NewOpt) *CASCredentialsService

func (*CASCredentialsService) Get

Get will generate temporary credentials to be used against the CAS service for the current organization

type CASRedirectService added in v0.16.0

type CASRedirectService struct {
	pb.UnimplementedCASRedirectServiceServer
	// contains filtered or unexported fields
}

func NewCASRedirectService added in v0.16.0

func NewCASRedirectService(casmUC *biz.CASMappingUseCase, casCredsUC *biz.CASCredentialsUseCase, conf *conf.Bootstrap_CASServer, opts ...NewOpt) (*CASRedirectService, error)

func (*CASRedirectService) GetDownloadURL added in v0.16.0

GetDownloadURL returns a signed URL to download the artifact from the CAS backend The URL includes a JWT token that is used to authenticate the request, this token has all the information required to validate the request The result would look like "https://cas.chainloop.dev/download/sha256:[DIGEST]?t=tokenJWT

func (*CASRedirectService) HTTPDownload added in v0.16.0

func (s *CASRedirectService) HTTPDownload(ctx khttp.Context) error

Custom HTTP handler that handles redirect to the CAS download URL This handler does 1 - Force the user to do an oauth login dance 2 - calls GetDownloadURL to generate a proper URL 3 - redirects to the generated URL NOTE: This code is similar to the one that gets autogenerated if we happened to use proto.http but we can't use it because we need custom redirection

type ContextService

type ContextService struct {
	pb.UnimplementedContextServiceServer
	// contains filtered or unexported fields
}

func NewContextService

func NewContextService(repoUC *biz.CASBackendUseCase, opts ...NewOpt) *ContextService

type IntegrationsService

type IntegrationsService struct {
	pb.UnimplementedIntegrationsServiceServer
	// contains filtered or unexported fields
}

func NewIntegrationsService

func NewIntegrationsService(uc *biz.IntegrationUseCase, wuc *biz.WorkflowUseCase, integrations sdk.AvailablePlugins, opts ...NewOpt) *IntegrationsService

func (*IntegrationsService) Deregister added in v0.11.1

func (*IntegrationsService) ListAttachments

func (*IntegrationsService) ListAvailable added in v0.11.1

func (*IntegrationsService) Register added in v0.11.1

type NewAttestationServiceOpts

type NewAttestationServiceOpts struct {
	WorkflowRunUC      *biz.WorkflowRunUseCase
	WorkflowUC         *biz.WorkflowUseCase
	WorkflowContractUC *biz.WorkflowContractUseCase
	OCIUC              *biz.CASBackendUseCase
	CredsReader        credentials.Reader
	IntegrationUseCase *biz.IntegrationUseCase
	CasCredsUseCase    *biz.CASCredentialsUseCase
	AttestationUC      *biz.AttestationUseCase
	FanoutDispatcher   *dispatcher.FanOutDispatcher
	CASMappingUseCase  *biz.CASMappingUseCase
	Opts               []NewOpt
}

type NewOpt

type NewOpt func(s *service)

func WithLogger

func WithLogger(logger log.Logger) NewOpt

type NewWorkflowRunServiceOpts

type NewWorkflowRunServiceOpts struct {
	WorkflowRunUC      *biz.WorkflowRunUseCase
	WorkflowUC         *biz.WorkflowUseCase
	WorkflowContractUC *biz.WorkflowContractUseCase
	CredsReader        credentials.Reader
	Opts               []NewOpt
}

type OrgMetricsService

type OrgMetricsService struct {
	pb.UnimplementedOrgMetricsServiceServer
	// contains filtered or unexported fields
}

func NewOrgMetricsService

func NewOrgMetricsService(uc *biz.OrgMetricsUseCase, opts ...NewOpt) *OrgMetricsService

func (*OrgMetricsService) TopWorkflowsByRunsCount

type OrganizationService

type OrganizationService struct {
	pb.UnimplementedOrganizationServiceServer
	// contains filtered or unexported fields
}

func NewOrganizationService

func NewOrganizationService(uc *biz.MembershipUseCase, opts ...NewOpt) *OrganizationService

func (*OrganizationService) SetCurrentMembership

type RobotAccountService

type RobotAccountService struct {
	pb.UnimplementedRobotAccountServiceServer
	// contains filtered or unexported fields
}

func NewRobotAccountService

func NewRobotAccountService(uc *biz.RobotAccountUseCase, opts ...NewOpt) *RobotAccountService

type StatusService

type StatusService struct {
	pb.UnimplementedStatusServiceServer
	// contains filtered or unexported fields
}

func NewStatusService

func NewStatusService(logingURL, version string, casClient *biz.CASClientUseCase) *StatusService

func (*StatusService) Infoz

func (*StatusService) Statusz

Only on readiness probes we check this service external dependencies

type WorkflowRunService

type WorkflowRunService struct {
	pb.UnimplementedWorkflowRunServiceServer
	// contains filtered or unexported fields
}

func NewWorkflowRunService

func NewWorkflowRunService(opts *NewWorkflowRunServiceOpts) *WorkflowRunService

type WorkflowService

type WorkflowService struct {
	pb.UnimplementedWorkflowServiceServer
	// contains filtered or unexported fields
}

func NewWorkflowService

func NewWorkflowService(uc *biz.WorkflowUseCase, opts ...NewOpt) *WorkflowService

func (*WorkflowService) ChangeVisibility added in v0.17.0

Jump to

Keyboard shortcuts

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