access_provider

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

Package access_provider provides the tooling to build the Raito access provider import file. Simply use the NewAccessProviderFileCreator function by passing in the config coming from the CLI to create the necessary file(s). The returned AccessProviderFileCreator can then be used (using the AddAccessProvider function) to write AccessProvider to the file. Make sure to call the Close function on the creator at the end (tip: use defer).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access struct {
	DataObjectReference *data_source.DataObjectReference `json:"dataObjectReference"`
	Permissions         []string                         `json:"permissions"`
}

type AccessProvider

type AccessProvider struct {
	ExternalId        string   `json:"externalId"`
	NotInternalizable bool     `json:"notInternalizable"`
	Name              string   `json:"name"`
	NamingHint        string   `json:"namingHint"`
	Users             []string `json:"users"`
	Groups            []string `json:"groups"`
	AccessObjects     []Access `json:"accessObjects"`
	Action            Action   `json:"action"`
	Policy            string   `json:"policy"`
}

AccessProvider describes data access in the format that is suitable to be imported into Raito.x

type AccessProviderFileCreator

type AccessProviderFileCreator interface {
	AddAccessProvider(dataAccessList []AccessProvider) error
	Close()
	GetAccessProviderCount() int
}

AccessProviderFileCreator describes the interface for easily creating the access object import files to be imported by the Raito CLI.

func NewAccessProviderFileCreator

func NewAccessProviderFileCreator(config *data_access.DataAccessSyncConfig) (AccessProviderFileCreator, error)

NewAccessProviderFileCreator creates a new AccessProviderFileCreator based on the configuration coming from the Raito CLI.

type Action added in v0.8.0

type Action int
const (
	Promise Action = iota
	Grant
	Deny
	Mask
	Filtered
)

func (Action) MarshalJSON added in v0.8.0

func (s Action) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (*Action) UnmarshalJSON added in v0.8.0

func (s *Action) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

Jump to

Keyboard shortcuts

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