iamclient

package
v0.0.0-...-daa3d23 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCerbosPolicy

func RegisterCerbosPolicy(log logging.Logger) error

func RegisterService

func RegisterService(log logging.Logger) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(log logging.Logger, ory oryclient.OryClient, cfg Config) (*Client, error)

func (*Client) GetOAuthURL

func (c *Client) GetOAuthURL() string

func (*Client) RegisterAppClientSecrets

func (c *Client) RegisterAppClientSecrets(ctx context.Context, clientName, redirectURL, organisationid string) (string, string, error)

func (*Client) RegisterCerbosPolicy

func (c *Client) RegisterCerbosPolicy() error

func (*Client) RegisterRolesActions

func (c *Client) RegisterRolesActions() error

func (*Client) RegisterService

func (c *Client) RegisterService() error

type Config

type Config struct {
	IAMURL                       string `envconfig:"IAM_URL" required:"true"`
	ServiceRegister              bool   `envconfig:"SERVICE_REGISTER" default:"true"`
	ServiceName                  string `envconfig:"SERVICE_NAME" default:"capten-server"`
	ServiceRolesConfigFilePath   string `envconfig:"SERVICE_ROLES_CONFIG_FILE_PATH" default:"/data/service-config/roles.yaml"`
	CerbosResourcePolicyFilePath string `envconfig:"SERVICE_ROLES_CONFIG_FILE_PATH" default:"/data/cerbos-policy-config/resource-policy.yaml"`
	PolicyRegister               bool   `envconfig:"CERBOS_POLICY_REGISTER" default:"true"`
}

func NewConfig

func NewConfig() (Config, error)

type IAMRegister

type IAMRegister interface {
	RegisterAppClientSecrets(ctx context.Context, clientName, redirectURL, organisationid string) (string, string, error)
	GetOAuthURL() string
}

Jump to

Keyboard shortcuts

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