sync_from_target

package
v0.68.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Overview

Package sync_from_target provides the tooling to build the file to export access providers from the data source to be imported into Raito. 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 {
	ActualName string `yaml:"actualName" json:"actualName"`
	// Who represents who has access to the 'what'. Nil means that the 'who' is unknown.
	What []WhatItem `yaml:"what" json:"what"`
}

type AccessProvider

type AccessProvider struct {
	ExternalId string  `json:"externalId"`
	Name       string  `json:"name"`
	NamingHint string  `json:"namingHint"`
	Type       *string `json:"type"`

	// Deprecated: use ActualName and What fields directory
	Access []*Access `yaml:"access" json:"access"`

	Action Action   `json:"action"`
	Policy string   `json:"policy"`
	Who    *WhoItem `yaml:"who" json:"who"`

	Owners *OwnersInput `json:"owners,omitempty"` // Deprecated, use RaitoOwnerTag instead

	// NotInternalizable means that the entire access provider is locked
	NotInternalizable       bool    `json:"notInternalizable"`
	WhoLocked               *bool   `json:"whoLocked"`
	WhoLockedReason         *string `json:"whoLockedReason"`
	InheritanceLocked       *bool   `json:"inheritanceLocked"`
	InheritanceLockedReason *string `json:"inheritanceLockedReason"`
	WhatLocked              *bool   `json:"whatLocked"`
	WhatLockedReason        *string `json:"whatLockedReason"`
	NameLocked              *bool   `json:"nameLocked"`
	NameLockedReason        *string `json:"nameLockedReason"`
	DeleteLocked            *bool   `json:"deleteLocked"`
	DeleteLockedReason      *string `json:"deleteLockedReason"`
	OwnersLocked            *bool   `json:"ownersLocked"`
	OwnersLockedReason      *string `json:"ownersLockedReason"`

	ActualName string `yaml:"actualName" json:"actualName"`
	// Who represents who has access to the 'what'. Nil means that the 'who' is unknown.
	What []WhatItem `yaml:"what" json:"what"`

	// Allows the plugin to indicate that the access provider is incomplete (because not all who items, what items or permissions could be handled)
	Incomplete *bool `json:"incomplete"`

	Tags []*tag.Tag `json:"tags"`
}

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

type AccessProviderFileCreator

type AccessProviderFileCreator interface {
	AddAccessProviders(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 *access_provider.AccessSyncFromTarget) (AccessProviderFileCreator, error)

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

type Action

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

func (Action) MarshalJSON

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

MarshalJSON marshals the enum as a quoted json string

func (*Action) UnmarshalJSON

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

UnmarshalJSON unmashals a quoted json string to the enum value

type OwnersInput added in v0.56.5

type OwnersInput struct {
	Users []string `yaml:"users" json:"users"`
}

type WhatItem

type WhatItem struct {
	DataObject  *data_source.DataObjectReference `yaml:"dataObject" json:"dataObject"`
	Permissions []string                         `yaml:"permissions" json:"permissions"`
}

type WhoItem

type WhoItem struct {
	Users           []string `yaml:"users" json:"users"`
	Groups          []string `yaml:"groups" json:"groups"`
	AccessProviders []string `yaml:"accessProviders" json:"accessProviders"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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