okta

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAccess

func CheckAccess(authzCtx *authz.Context, existingResource types.ResourceWithLabels, verb string) error

CheckAccess gates access to update operations on resource records based on the origin label on the supplied resource.

A nil `existingResource` is interpreted as there being no matching existing resource in the cluster; if there is no user then there is no resource to overwrite, so access is granted

func CheckOrigin

func CheckOrigin(authzCtx *authz.Context, res types.ResourceWithLabels) error

CheckOrigin checks that the supplied resource has an appropriate origin label set. In this case "appropriate" means having the Okta origin set if and only if the supplied auth context has the built-in Okta role. An auth context without the Okta role may supply any origin value *other than* okta (including nil). Returns an error if the user origin value is "inappropriate".

Types

type Service

type Service struct {
	oktapb.UnimplementedOktaServiceServer
	// contains filtered or unexported fields
}

func NewService

func NewService(cfg ServiceConfig) (*Service, error)

NewService creates a new Okta gRPC service.

func (*Service) CreateOktaAssignment

func (s *Service) CreateOktaAssignment(ctx context.Context, req *oktapb.CreateOktaAssignmentRequest) (*types.OktaAssignmentV1, error)

CreateOktaAssignment creates a new Okta assignment resource.

func (*Service) CreateOktaImportRule

func (s *Service) CreateOktaImportRule(ctx context.Context, req *oktapb.CreateOktaImportRuleRequest) (*types.OktaImportRuleV1, error)

CreateOktaImportRule creates a new Okta import rule resource.

func (*Service) DeleteAllOktaAssignments

func (s *Service) DeleteAllOktaAssignments(ctx context.Context, _ *oktapb.DeleteAllOktaAssignmentsRequest) (*emptypb.Empty, error)

DeleteAllOktaAssignments removes all Okta assignments.

func (*Service) DeleteAllOktaImportRules

func (s *Service) DeleteAllOktaImportRules(ctx context.Context, _ *oktapb.DeleteAllOktaImportRulesRequest) (*emptypb.Empty, error)

DeleteAllOktaImportRules removes all Okta import rules.

func (*Service) DeleteOktaAssignment

func (s *Service) DeleteOktaAssignment(ctx context.Context, req *oktapb.DeleteOktaAssignmentRequest) (*emptypb.Empty, error)

DeleteOktaAssignment removes the specified Okta assignment resource.

func (*Service) DeleteOktaImportRule

func (s *Service) DeleteOktaImportRule(ctx context.Context, req *oktapb.DeleteOktaImportRuleRequest) (*emptypb.Empty, error)

DeleteOktaImportRule removes the specified Okta import rule resource.

func (*Service) GetOktaAssignment

func (s *Service) GetOktaAssignment(ctx context.Context, req *oktapb.GetOktaAssignmentRequest) (*types.OktaAssignmentV1, error)

GetOktaAssignment returns the specified Okta assignment resources.

func (*Service) GetOktaImportRule

func (s *Service) GetOktaImportRule(ctx context.Context, req *oktapb.GetOktaImportRuleRequest) (*types.OktaImportRuleV1, error)

GetOktaImportRule returns the specified Okta import rule resources.

func (*Service) ListOktaAssignments

ListOktaAssignments returns a paginated list of all Okta assignment resources.

func (*Service) ListOktaImportRules

ListOktaImportRules returns a paginated list of all Okta import rule resources.

func (*Service) UpdateOktaAssignment

func (s *Service) UpdateOktaAssignment(ctx context.Context, req *oktapb.UpdateOktaAssignmentRequest) (*types.OktaAssignmentV1, error)

UpdateOktaAssignment updates an existing Okta assignment resource.

func (*Service) UpdateOktaAssignmentStatus

func (s *Service) UpdateOktaAssignmentStatus(ctx context.Context, req *oktapb.UpdateOktaAssignmentStatusRequest) (*emptypb.Empty, error)

UpdateOktaAssignmentStatus will update the status for an Okta assignment.

func (*Service) UpdateOktaImportRule

func (s *Service) UpdateOktaImportRule(ctx context.Context, req *oktapb.UpdateOktaImportRuleRequest) (*types.OktaImportRuleV1, error)

UpdateOktaImportRule updates an existing Okta import rule resource.

type ServiceConfig

type ServiceConfig struct {
	// Backend is the backend to use.
	Backend backend.Backend

	// Logger is the logger to use.
	Logger logrus.FieldLogger

	// Authorizer is the authorizer to use.
	Authorizer authz.Authorizer

	// OktaImportRules is the Okta import rules service to use.
	OktaImportRules services.OktaImportRules

	// OktaAssignments is the Okta assignments service to use.
	OktaAssignments services.OktaAssignments
}

ServiceConfig is the service config for the Okta gRPC service.

func (*ServiceConfig) CheckAndSetDefaults

func (c *ServiceConfig) CheckAndSetDefaults() error

Jump to

Keyboard shortcuts

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