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 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 types.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,omitempty"` WhoLockedReason *string `json:"whoLockedReason,omitempty"` InheritanceLocked *bool `json:"inheritanceLocked,omitempty"` InheritanceLockedReason *string `json:"inheritanceLockedReason,omitempty"` WhatLocked *bool `json:"whatLocked,omitempty"` WhatLockedReason *string `json:"whatLockedReason,omitempty"` NameLocked *bool `json:"nameLocked,omitempty"` NameLockedReason *string `json:"nameLockedReason,omitempty"` DeleteLocked *bool `json:"deleteLocked,omitempty"` DeleteLockedReason *string `json:"deleteLockedReason,omitempty"` OwnersLocked *bool `json:"ownersLocked,omitempty"` OwnersLockedReason *string `json:"ownersLockedReason,omitempty"` 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,omitempty"` Tags []*tag.Tag `json:"tags"` // Share properties CommonWhatDataObject *string `json:"commonWhatDataObject,omitempty"` }
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 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"` }