Documentation
¶
Index ¶
- Constants
- Variables
- func FlattenSubjectContext(subject string) ([]flat.Item, error)
- func GetAttributeFqn(namespace string, name string) string
- func GetAttributeRuleFromAttributeType(rule policy.AttributeRuleTypeEnum) string
- func GetAttributeRuleFromReadableString(rule string) (policy.AttributeRuleTypeEnum, error)
- func GetAttributeRuleOptions() []string
- func GetSubjectMappingOperatorChoiceFromEnum(enum policy.SubjectMappingOperatorEnum) string
- func GetSubjectMappingOperatorFromChoice(readable string) policy.SubjectMappingOperatorEnum
- func ParseSubjectString(subject string) (map[string]interface{}, error)
- func ParseToIDFqnIdentifier(value string) *common.IdFqnIdentifier
- func ParseToIDNameIdentifier(value string) *common.IdNameIdentifier
- func WithEndpoint(endpoint string, tlsNoVerify bool) handlerOptsFunc
- func WithProfile(profile *profiles.ProfileStore) handlerOptsFunc
- func WithSDKOpts(opts ...sdk.Option) handlerOptsFunc
- type CreateAttributeError
- type Handler
- func (h Handler) AssignKeyToAttribute(ctx context.Context, attr, keyID string) (*attributes.AttributeKey, error)
- func (h *Handler) AssignKeyToAttributeNamespace(ctx context.Context, namespace, keyID string) (*namespaces.NamespaceKey, error)
- func (h *Handler) AssignKeyToAttributeValue(ctx context.Context, value, keyID string) (*attributes.ValueKey, error)
- func (h Handler) Close() error
- func (h Handler) CreateAction(ctx context.Context, name string, metadata *common.MetadataMutable) (*policy.Action, error)
- func (h Handler) CreateAttribute(ctx context.Context, name string, rule string, namespace string, ...) (*policy.Attribute, error)
- func (h *Handler) CreateAttributeValue(ctx context.Context, attributeID string, value string, ...) (*policy.Value, error)
- func (h Handler) CreateKasKey(ctx context.Context, kasID string, keyID string, alg policy.Algorithm, ...) (*policy.KasKey, error)
- func (h Handler) CreateKasRegistryEntry(ctx context.Context, uri string, name string, metadata *common.MetadataMutable) (*policy.KeyAccessServer, error)
- func (h Handler) CreateNamespace(ctx context.Context, name string, metadata *common.MetadataMutable) (*policy.Namespace, error)
- func (h Handler) CreateNewSubjectMapping(ctx context.Context, attrValID string, actions []*policy.Action, ...) (*policy.SubjectMapping, error)
- func (h Handler) CreateObligation(ctx context.Context, namespace, name string, values []string, ...) (*policy.Obligation, error)
- func (h Handler) CreateObligationTrigger(ctx context.Context, attributeValue, action, obligationValue, clientID string, ...) (*policy.ObligationTrigger, error)
- func (h Handler) CreateObligationValue(ctx context.Context, obligation, value string, ...) (*policy.ObligationValue, error)
- func (h Handler) CreateProviderConfig(ctx context.Context, name, manager string, config []byte, ...) (*policy.KeyProviderConfig, error)
- func (h Handler) CreateRegisteredResource(ctx context.Context, name string, values []string, ...) (*policy.RegisteredResource, error)
- func (h Handler) CreateRegisteredResourceValue(ctx context.Context, resourceID string, value string, ...) (*policy.RegisteredResourceValue, error)
- func (h *Handler) CreateResourceMapping(attributeID string, terms []string, grpID string, ...) (*policy.ResourceMapping, error)
- func (h *Handler) CreateResourceMappingGroup(ctx context.Context, namespaceID string, name string, ...) (*policy.ResourceMappingGroup, error)
- func (h Handler) CreateSubjectConditionSet(ctx context.Context, ss []*policy.SubjectSet, metadata *common.MetadataMutable) (*policy.SubjectConditionSet, error)
- func (h Handler) DeactivateAttribute(ctx context.Context, id string) (*policy.Attribute, error)
- func (h *Handler) DeactivateAttributeValue(ctx context.Context, id string) (*policy.Value, error)
- func (h Handler) DeactivateNamespace(ctx context.Context, id string) (*policy.Namespace, error)
- func (h Handler) DecryptBytes(ctx context.Context, toDecrypt []byte, assertionVerificationKeysFile string, ...) (*bytes.Buffer, error)
- func (h Handler) DeleteAction(ctx context.Context, id string) error
- func (h Handler) DeleteKasGrantFromAttribute(ctx context.Context, attr_id string, kas_id string) (*attributes.AttributeKeyAccessServer, error)
- func (h Handler) DeleteKasGrantFromNamespace(ctx context.Context, ns_id string, kas_id string) (*namespaces.NamespaceKeyAccessServer, error)
- func (h Handler) DeleteKasGrantFromValue(ctx context.Context, val_id string, kas_id string) (*attributes.ValueKeyAccessServer, error)
- func (h Handler) DeleteKasRegistryEntry(ctx context.Context, id string) (*policy.KeyAccessServer, error)
- func (h Handler) DeleteObligation(ctx context.Context, id, fqn string) error
- func (h Handler) DeleteObligationTrigger(ctx context.Context, id string) (*policy.ObligationTrigger, error)
- func (h Handler) DeleteObligationValue(ctx context.Context, id, fqn string) error
- func (h *Handler) DeleteProviderConfig(ctx context.Context, id string) error
- func (h Handler) DeleteRegisteredResource(ctx context.Context, id string) error
- func (h Handler) DeleteRegisteredResourceValue(ctx context.Context, id string) error
- func (h *Handler) DeleteResourceMapping(id string) (*policy.ResourceMapping, error)
- func (h *Handler) DeleteResourceMappingGroup(ctx context.Context, id string) (*policy.ResourceMappingGroup, error)
- func (h Handler) DeleteSubjectConditionSet(ctx context.Context, id string) error
- func (h Handler) DeleteSubjectMapping(ctx context.Context, id string) (*policy.SubjectMapping, error)
- func (h Handler) Direct() *sdk.SDK
- func (h Handler) EncryptBytes(tdfType string, unencrypted []byte, attrValues []string, mimeType string, ...) (*bytes.Buffer, error)
- func (h Handler) GetAction(ctx context.Context, id string, name string) (*policy.Action, error)
- func (h Handler) GetAttribute(ctx context.Context, identifier string) (*policy.Attribute, error)
- func (h *Handler) GetAttributeValue(ctx context.Context, identifier string) (*policy.Value, error)
- func (h Handler) GetBaseKey(ctx context.Context) (*policy.SimpleKasKey, error)
- func (h Handler) GetKasKey(ctx context.Context, id string, key *kasregistry.KasKeyIdentifier) (*policy.KasKey, error)
- func (h Handler) GetKasRegistryEntry(ctx context.Context, identifer KasIdentifier) (*policy.KeyAccessServer, error)
- func (h Handler) GetNamespace(ctx context.Context, identifier string) (*policy.Namespace, error)
- func (h Handler) GetObligation(ctx context.Context, id, fqn string) (*policy.Obligation, error)
- func (h Handler) GetObligationValue(ctx context.Context, id, fqn string) (*policy.ObligationValue, error)
- func (h Handler) GetProviderConfig(ctx context.Context, id, name string) (*policy.KeyProviderConfig, error)
- func (h Handler) GetRegisteredResource(ctx context.Context, id, name string) (*policy.RegisteredResource, error)
- func (h Handler) GetRegisteredResourceValue(ctx context.Context, id, fqn string) (*policy.RegisteredResourceValue, error)
- func (h *Handler) GetResourceMapping(id string) (*policy.ResourceMapping, error)
- func (h *Handler) GetResourceMappingGroup(ctx context.Context, id string) (*policy.ResourceMappingGroup, error)
- func (h Handler) GetSubjectConditionSet(ctx context.Context, id string) (*policy.SubjectConditionSet, error)
- func (h Handler) GetSubjectMapping(ctx context.Context, id string) (*policy.SubjectMapping, error)
- func (h Handler) InspectTDF(toInspect []byte) (TDFInspect, []error)
- func (h Handler) ListActions(ctx context.Context, limit, offset int32) ([]*policy.Action, []*policy.Action, *policy.PageResponse, error)
- func (h *Handler) ListAttributeValues(ctx context.Context, attributeID string, state common.ActiveStateEnum, ...) ([]*policy.Value, *policy.PageResponse, error)
- func (h Handler) ListAttributes(ctx context.Context, state common.ActiveStateEnum, limit, offset int32) ([]*policy.Attribute, *policy.PageResponse, error)
- func (h Handler) ListKasGrants(ctx context.Context, kas_id, kas_uri string, limit, offset int32) ([]*kasregistry.KeyAccessServerGrants, *policy.PageResponse, error)
- func (h Handler) ListKasKeys(ctx context.Context, limit, offset int32, algorithm policy.Algorithm, ...) ([]*policy.KasKey, *policy.PageResponse, error)
- func (h Handler) ListKasRegistryEntries(ctx context.Context, limit, offset int32) ([]*policy.KeyAccessServer, *policy.PageResponse, error)
- func (h Handler) ListKeyMappings(ctx context.Context, limit, offset int32, keySystemID string, ...) (*kasregistry.ListKeyMappingsResponse, error)
- func (h Handler) ListNamespaces(ctx context.Context, state common.ActiveStateEnum, limit, offset int32) ([]*policy.Namespace, *policy.PageResponse, error)
- func (h Handler) ListObligationTriggers(ctx context.Context, namespace string, limit, offset int32) (*obligations.ListObligationTriggersResponse, error)
- func (h Handler) ListObligations(ctx context.Context, limit, offset int32, namespace string) ([]*policy.Obligation, *policy.PageResponse, error)
- func (h Handler) ListProviderConfigs(ctx context.Context, limit, offset int32) ([]*policy.KeyProviderConfig, *policy.PageResponse, error)
- func (h Handler) ListRegisteredResourceValues(ctx context.Context, resourceID string, limit, offset int32) ([]*policy.RegisteredResourceValue, *policy.PageResponse, error)
- func (h Handler) ListRegisteredResources(ctx context.Context, limit, offset int32) ([]*policy.RegisteredResource, *policy.PageResponse, error)
- func (h *Handler) ListResourceMappingGroups(ctx context.Context, limit, offset int32) ([]*policy.ResourceMappingGroup, *policy.PageResponse, error)
- func (h *Handler) ListResourceMappings(ctx context.Context, limit, offset int32) ([]*policy.ResourceMapping, *policy.PageResponse, error)
- func (h Handler) ListSubjectConditionSets(ctx context.Context, limit, offset int32) ([]*policy.SubjectConditionSet, *policy.PageResponse, error)
- func (h Handler) ListSubjectMappings(ctx context.Context, limit, offset int32) ([]*policy.SubjectMapping, *policy.PageResponse, error)
- func (h Handler) MatchSubjectMappings(ctx context.Context, selectors []string) ([]*policy.SubjectMapping, error)
- func (h Handler) PruneSubjectConditionSets(ctx context.Context) ([]*policy.SubjectConditionSet, error)
- func (h Handler) RemoveKeyFromAttribute(ctx context.Context, attr, keyID string) error
- func (h *Handler) RemoveKeyFromAttributeNamespace(ctx context.Context, namespace, keyID string) error
- func (h *Handler) RemoveKeyFromAttributeValue(ctx context.Context, value, keyID string) error
- func (h Handler) RotateKasKey(ctx context.Context, oldKeyID string, key *kasregistry.KasKeyIdentifier, ...) (*RotateKeyResult, error)
- func (h Handler) SetBaseKey(ctx context.Context, id string, key *kasregistry.KasKeyIdentifier) (*kasregistry.SetBaseKeyResponse, error)
- func (h Handler) UnsafeDeleteAttribute(ctx context.Context, id, fqn string) error
- func (h Handler) UnsafeDeleteAttributeValue(ctx context.Context, id, fqn string) error
- func (h Handler) UnsafeDeleteKasKey(ctx context.Context, id, kid, kasURI string) (*policy.KasKey, error)
- func (h Handler) UnsafeDeleteNamespace(ctx context.Context, id string, fqn string) error
- func (h Handler) UnsafeReactivateAttribute(ctx context.Context, id string) (*policy.Attribute, error)
- func (h Handler) UnsafeReactivateAttributeValue(ctx context.Context, id string) (*policy.Value, error)
- func (h Handler) UnsafeReactivateNamespace(ctx context.Context, id string) (*policy.Namespace, error)
- func (h Handler) UnsafeUpdateAttribute(ctx context.Context, id, name, rule string, valuesOrder []string) error
- func (h Handler) UnsafeUpdateAttributeValue(ctx context.Context, id, value string) error
- func (h Handler) UnsafeUpdateNamespace(ctx context.Context, id, name string) (*policy.Namespace, error)
- func (h Handler) UpdateAction(ctx context.Context, id, name string, metadata *common.MetadataMutable, ...) (*policy.Action, error)
- func (h *Handler) UpdateAttribute(ctx context.Context, id string, metadata *common.MetadataMutable, ...) (*policy.Attribute, error)
- func (h *Handler) UpdateAttributeValue(ctx context.Context, id string, metadata *common.MetadataMutable, ...) (*policy.Value, error)
- func (h Handler) UpdateKasKey(ctx context.Context, id string, metadata *common.MetadataMutable, ...) (*policy.KasKey, error)
- func (h Handler) UpdateKasRegistryEntry(ctx context.Context, id, uri, name string, metadata *common.MetadataMutable, ...) (*policy.KeyAccessServer, error)
- func (h Handler) UpdateNamespace(ctx context.Context, id string, metadata *common.MetadataMutable, ...) (*policy.Namespace, error)
- func (h Handler) UpdateObligation(ctx context.Context, id, name string, metadata *common.MetadataMutable, ...) (*policy.Obligation, error)
- func (h Handler) UpdateObligationValue(ctx context.Context, id, value string, ...) (*policy.ObligationValue, error)
- func (h Handler) UpdateProviderConfig(ctx context.Context, id, name, manager string, config []byte, ...) (*policy.KeyProviderConfig, error)
- func (h Handler) UpdateRegisteredResource(ctx context.Context, id, name string, metadata *common.MetadataMutable, ...) (*policy.RegisteredResource, error)
- func (h Handler) UpdateRegisteredResourceValue(ctx context.Context, id, value string, ...) (*policy.RegisteredResourceValue, error)
- func (h *Handler) UpdateResourceMapping(id string, attrValueID string, grpID string, terms []string, ...) (*policy.ResourceMapping, error)
- func (h *Handler) UpdateResourceMappingGroup(ctx context.Context, id string, namespaceID string, name string, ...) (*policy.ResourceMappingGroup, error)
- func (h Handler) UpdateSubjectConditionSet(ctx context.Context, id string, ss []*policy.SubjectSet, ...) (*policy.SubjectConditionSet, error)
- func (h Handler) UpdateSubjectMapping(ctx context.Context, id string, updatedSCSId string, ...) (*policy.SubjectMapping, error)
- func (h Handler) WithLabelMetadata(metadata *common.MetadataMutable, key, value string) func(*common.MetadataMutable) *common.MetadataMutable
- func (h Handler) WithReplaceLabelsMetadata(metadata *common.MetadataMutable, labels map[string]string) func(*common.MetadataMutable) *common.MetadataMutable
- type KasIdentifier
- type ResourceMapping
- type RotateKeyResult
- type TDFInspect
Constants ¶
const ( AttributeRuleAllOf = "ALL_OF" AttributeRuleAnyOf = "ANY_OF" AttributeRuleHierarchy = "HIERARCHY" )
const ( SubjectMappingOperatorIn = "IN" SubjectMappingOperatorNotIn = "NOT_IN" SubjectMappingOperatorInContains = "IN_CONTAINS" SubjectMappingOperatorUnspecified = "UNSPECIFIED" )
const ( TDF_TYPE_ZTDF = "ztdf" TDF_TYPE_TDF3 = "tdf3" // alias for TDF TDF_TYPE_NANO = "nano" MAX_ASSERTIONS_FILE_SIZE = int64(5 * 1024 * 1024) // 5MB )
Variables ¶
var ( SDK *sdk.SDK ErrUnauthenticated = errors.New("unauthenticated") )
var ( ErrTDFInspectFailNotValidTDF = errors.New("file or input is not a valid TDF") ErrTDFInspectFailNotInspectable = errors.New("file or input is not inspectable") ErrTDFUnableToReadAttributes = errors.New("unable to read attributes from TDF") ErrTDFUnableToReadUnencryptedMetadata = errors.New("unable to read unencrypted metadata from TDF") ErrTDFUnableToReadAssertions = errors.New("unable to read assertions") ErrTDFUnableToReadAssertionVerificationKeys = errors.New("unable to read assertion verification keys") )
var SubjectMappingOperatorEnumChoices = []string{SubjectMappingOperatorIn, SubjectMappingOperatorNotIn, SubjectMappingOperatorUnspecified}
Functions ¶
func FlattenSubjectContext ¶ added in v0.16.0
func GetAttributeFqn ¶
func GetAttributeRuleFromAttributeType ¶
func GetAttributeRuleFromAttributeType(rule policy.AttributeRuleTypeEnum) string
Provides the un-prefixed human-readable attribute rule
func GetAttributeRuleFromReadableString ¶
func GetAttributeRuleFromReadableString(rule string) (policy.AttributeRuleTypeEnum, error)
func GetAttributeRuleOptions ¶
func GetAttributeRuleOptions() []string
func GetSubjectMappingOperatorChoiceFromEnum ¶
func GetSubjectMappingOperatorChoiceFromEnum(enum policy.SubjectMappingOperatorEnum) string
func GetSubjectMappingOperatorFromChoice ¶
func GetSubjectMappingOperatorFromChoice(readable string) policy.SubjectMappingOperatorEnum
func ParseSubjectString ¶ added in v0.16.0
func ParseToIDFqnIdentifier ¶ added in v0.25.0
func ParseToIDFqnIdentifier(value string) *common.IdFqnIdentifier
ParseToIDFqnIdentifier creates an IdFqnIdentifier based on whether the input is a UUID or FQN
func ParseToIDNameIdentifier ¶ added in v0.25.0
func ParseToIDNameIdentifier(value string) *common.IdNameIdentifier
ParseToIDNameIdentifier creates an IdNameIdentifier based on whether the input is a UUID or name
func WithEndpoint ¶ added in v0.10.0
func WithProfile ¶ added in v0.10.0
func WithProfile(profile *profiles.ProfileStore) handlerOptsFunc
func WithSDKOpts ¶ added in v0.10.0
Types ¶
type CreateAttributeError ¶
func (*CreateAttributeError) Error ¶
func (e *CreateAttributeError) Error() string
type Handler ¶
type Handler struct {
OIDC_TOKEN string
// contains filtered or unexported fields
}
func New ¶
Creates a new handler wrapping the SDK, which is authenticated through the cached client-credentials flow tokens
func (Handler) AssignKeyToAttribute ¶ added in v0.21.0
func (h Handler) AssignKeyToAttribute(ctx context.Context, attr, keyID string) (*attributes.AttributeKey, error)
func (*Handler) AssignKeyToAttributeNamespace ¶ added in v0.21.0
func (h *Handler) AssignKeyToAttributeNamespace(ctx context.Context, namespace, keyID string) (*namespaces.NamespaceKey, error)
AssignKeyToAttributeNamespace assigns a KAS key to an attribute namespace
func (*Handler) AssignKeyToAttributeValue ¶ added in v0.21.0
func (h *Handler) AssignKeyToAttributeValue(ctx context.Context, value, keyID string) (*attributes.ValueKey, error)
AssignKeyToAttributeValue assigns a KAS key to an attribute value
func (Handler) CreateAction ¶ added in v0.21.0
func (Handler) CreateAttribute ¶
func (h Handler) CreateAttribute(ctx context.Context, name string, rule string, namespace string, values []string, metadata *common.MetadataMutable) (*policy.Attribute, error)
Creates and returns the created attribute
func (*Handler) CreateAttributeValue ¶
func (h *Handler) CreateAttributeValue(ctx context.Context, attributeID string, value string, metadata *common.MetadataMutable) (*policy.Value, error)
Creates and returns the created value
func (Handler) CreateKasKey ¶ added in v0.21.0
func (Handler) CreateKasRegistryEntry ¶
func (h Handler) CreateKasRegistryEntry(ctx context.Context, uri string, name string, metadata *common.MetadataMutable) (*policy.KeyAccessServer, error)
Creates the KAS registry and then returns the KAS
func (Handler) CreateNamespace ¶
func (h Handler) CreateNamespace(ctx context.Context, name string, metadata *common.MetadataMutable) (*policy.Namespace, error)
Creates and returns the created n
func (Handler) CreateNewSubjectMapping ¶
func (h Handler) CreateNewSubjectMapping(ctx context.Context, attrValID string, actions []*policy.Action, existingSCSId string, newScs *subjectmapping.SubjectConditionSetCreate, m *common.MetadataMutable) (*policy.SubjectMapping, error)
Creates and returns the created subject mapping
func (Handler) CreateObligation ¶ added in v0.25.0
func (h Handler) CreateObligation(ctx context.Context, namespace, name string, values []string, metadata *common.MetadataMutable) (*policy.Obligation, error)
func (Handler) CreateObligationTrigger ¶ added in v0.25.0
func (h Handler) CreateObligationTrigger(ctx context.Context, attributeValue, action, obligationValue, clientID string, metadata *common.MetadataMutable) (*policy.ObligationTrigger, error)
****** Obligation Triggers ******
func (Handler) CreateObligationValue ¶ added in v0.25.0
func (h Handler) CreateObligationValue(ctx context.Context, obligation, value string, triggers []*obligations.ValueTriggerRequest, metadata *common.MetadataMutable) (*policy.ObligationValue, error)
func (Handler) CreateProviderConfig ¶ added in v0.21.0
func (h Handler) CreateProviderConfig( ctx context.Context, name, manager string, config []byte, metadata *common.MetadataMutable) (*policy.KeyProviderConfig, error)
func (Handler) CreateRegisteredResource ¶ added in v0.21.0
func (h Handler) CreateRegisteredResource(ctx context.Context, name string, values []string, metadata *common.MetadataMutable) (*policy.RegisteredResource, error)
func (Handler) CreateRegisteredResourceValue ¶ added in v0.21.0
func (h Handler) CreateRegisteredResourceValue(ctx context.Context, resourceID string, value string, actionAttributeValues []*registeredresources.ActionAttributeValue, metadata *common.MetadataMutable) (*policy.RegisteredResourceValue, error)
func (*Handler) CreateResourceMapping ¶
func (h *Handler) CreateResourceMapping(attributeID string, terms []string, grpID string, metadata *common.MetadataMutable) (*policy.ResourceMapping, error)
Creates and returns the created resource mapping
func (*Handler) CreateResourceMappingGroup ¶ added in v0.21.0
func (h *Handler) CreateResourceMappingGroup(ctx context.Context, namespaceID string, name string, metadata *common.MetadataMutable) (*policy.ResourceMappingGroup, error)
Creates and returns the created resource mapping
func (Handler) CreateSubjectConditionSet ¶
func (h Handler) CreateSubjectConditionSet(ctx context.Context, ss []*policy.SubjectSet, metadata *common.MetadataMutable) (*policy.SubjectConditionSet, error)
Creates and returns the created subject condition set
func (Handler) DeactivateAttribute ¶
Deactivates and returns deactivated attribute
func (*Handler) DeactivateAttributeValue ¶
Deactivates and returns deactivated value
func (Handler) DeactivateNamespace ¶
Deactivates and returns the deactivated namespace
func (Handler) DecryptBytes ¶ added in v0.16.0
func (Handler) DeleteAction ¶ added in v0.21.0
func (Handler) DeleteKasGrantFromAttribute ¶
func (h Handler) DeleteKasGrantFromAttribute(ctx context.Context, attr_id string, kas_id string) (*attributes.AttributeKeyAccessServer, error)
func (Handler) DeleteKasGrantFromNamespace ¶ added in v0.10.0
func (h Handler) DeleteKasGrantFromNamespace(ctx context.Context, ns_id string, kas_id string) (*namespaces.NamespaceKeyAccessServer, error)
func (Handler) DeleteKasGrantFromValue ¶
func (h Handler) DeleteKasGrantFromValue(ctx context.Context, val_id string, kas_id string) (*attributes.ValueKeyAccessServer, error)
func (Handler) DeleteKasRegistryEntry ¶
func (h Handler) DeleteKasRegistryEntry(ctx context.Context, id string) (*policy.KeyAccessServer, error)
Deletes the KAS registry and returns the deleted KAS
func (Handler) DeleteObligation ¶ added in v0.25.0
func (Handler) DeleteObligationTrigger ¶ added in v0.25.0
func (Handler) DeleteObligationValue ¶ added in v0.25.0
func (*Handler) DeleteProviderConfig ¶ added in v0.21.0
func (Handler) DeleteRegisteredResource ¶ added in v0.21.0
func (Handler) DeleteRegisteredResourceValue ¶ added in v0.21.0
func (*Handler) DeleteResourceMapping ¶
func (h *Handler) DeleteResourceMapping(id string) (*policy.ResourceMapping, error)
func (*Handler) DeleteResourceMappingGroup ¶ added in v0.21.0
func (Handler) DeleteSubjectConditionSet ¶
func (Handler) DeleteSubjectMapping ¶
func (Handler) EncryptBytes ¶
func (Handler) GetAttribute ¶
func (*Handler) GetAttributeValue ¶
func (Handler) GetBaseKey ¶ added in v0.21.0
GetBaseKey retrieves a base key from the KAS registry. This is a stub function and needs to be implemented.
func (Handler) GetKasKey ¶ added in v0.21.0
func (h Handler) GetKasKey(ctx context.Context, id string, key *kasregistry.KasKeyIdentifier) (*policy.KasKey, error)
func (Handler) GetKasRegistryEntry ¶
func (h Handler) GetKasRegistryEntry(ctx context.Context, identifer KasIdentifier) (*policy.KeyAccessServer, error)
func (Handler) GetNamespace ¶
func (Handler) GetObligation ¶ added in v0.25.0
func (Handler) GetObligationValue ¶ added in v0.25.0
func (Handler) GetProviderConfig ¶ added in v0.21.0
func (Handler) GetRegisteredResource ¶ added in v0.21.0
func (Handler) GetRegisteredResourceValue ¶ added in v0.21.0
func (*Handler) GetResourceMapping ¶
func (h *Handler) GetResourceMapping(id string) (*policy.ResourceMapping, error)
func (*Handler) GetResourceMappingGroup ¶ added in v0.21.0
func (Handler) GetSubjectConditionSet ¶
func (Handler) GetSubjectMapping ¶
func (Handler) InspectTDF ¶
func (h Handler) InspectTDF(toInspect []byte) (TDFInspect, []error)
func (Handler) ListActions ¶ added in v0.21.0
func (*Handler) ListAttributeValues ¶
func (Handler) ListAttributes ¶
func (Handler) ListKasGrants ¶ added in v0.13.0
func (h Handler) ListKasGrants(ctx context.Context, kas_id, kas_uri string, limit, offset int32) ([]*kasregistry.KeyAccessServerGrants, *policy.PageResponse, error)
func (Handler) ListKasKeys ¶ added in v0.21.0
func (Handler) ListKasRegistryEntries ¶
func (h Handler) ListKasRegistryEntries(ctx context.Context, limit, offset int32) ([]*policy.KeyAccessServer, *policy.PageResponse, error)
func (Handler) ListKeyMappings ¶ added in v0.24.0
func (h Handler) ListKeyMappings( ctx context.Context, limit, offset int32, keySystemID string, keyUserIdentifier *kasregistry.KasKeyIdentifier, ) (*kasregistry.ListKeyMappingsResponse, error)
func (Handler) ListNamespaces ¶
func (Handler) ListObligationTriggers ¶ added in v0.26.0
func (h Handler) ListObligationTriggers(ctx context.Context, namespace string, limit, offset int32) (*obligations.ListObligationTriggersResponse, error)
func (Handler) ListObligations ¶ added in v0.25.0
func (h Handler) ListObligations(ctx context.Context, limit, offset int32, namespace string) ([]*policy.Obligation, *policy.PageResponse, error)
func (Handler) ListProviderConfigs ¶ added in v0.21.0
func (h Handler) ListProviderConfigs(ctx context.Context, limit, offset int32) ([]*policy.KeyProviderConfig, *policy.PageResponse, error)
func (Handler) ListRegisteredResourceValues ¶ added in v0.21.0
func (h Handler) ListRegisteredResourceValues(ctx context.Context, resourceID string, limit, offset int32) ([]*policy.RegisteredResourceValue, *policy.PageResponse, error)
func (Handler) ListRegisteredResources ¶ added in v0.21.0
func (h Handler) ListRegisteredResources(ctx context.Context, limit, offset int32) ([]*policy.RegisteredResource, *policy.PageResponse, error)
func (*Handler) ListResourceMappingGroups ¶ added in v0.21.0
func (h *Handler) ListResourceMappingGroups(ctx context.Context, limit, offset int32) ([]*policy.ResourceMappingGroup, *policy.PageResponse, error)
func (*Handler) ListResourceMappings ¶
func (h *Handler) ListResourceMappings(ctx context.Context, limit, offset int32) ([]*policy.ResourceMapping, *policy.PageResponse, error)
func (Handler) ListSubjectConditionSets ¶
func (h Handler) ListSubjectConditionSets(ctx context.Context, limit, offset int32) ([]*policy.SubjectConditionSet, *policy.PageResponse, error)
func (Handler) ListSubjectMappings ¶
func (h Handler) ListSubjectMappings(ctx context.Context, limit, offset int32) ([]*policy.SubjectMapping, *policy.PageResponse, error)
func (Handler) MatchSubjectMappings ¶ added in v0.16.0
func (Handler) PruneSubjectConditionSets ¶ added in v0.17.0
func (Handler) RemoveKeyFromAttribute ¶ added in v0.21.0
func (*Handler) RemoveKeyFromAttributeNamespace ¶ added in v0.21.0
func (h *Handler) RemoveKeyFromAttributeNamespace(ctx context.Context, namespace, keyID string) error
RemoveKeyFromAttributeNamespace removes a KAS key from an attribute namespace
func (*Handler) RemoveKeyFromAttributeValue ¶ added in v0.21.0
RemoveKeyFromAttributeValue removes a KAS key from an attribute value
func (Handler) RotateKasKey ¶ added in v0.21.0
func (h Handler) RotateKasKey( ctx context.Context, oldKeyID string, key *kasregistry.KasKeyIdentifier, newKey *kasregistry.RotateKeyRequest_NewKey, ) (*RotateKeyResult, error)
func (Handler) SetBaseKey ¶ added in v0.21.0
func (h Handler) SetBaseKey(ctx context.Context, id string, key *kasregistry.KasKeyIdentifier) (*kasregistry.SetBaseKeyResponse, error)
func (Handler) UnsafeDeleteAttribute ¶
Deletes and returns error if deletion failed
func (Handler) UnsafeDeleteAttributeValue ¶
Deletes and returns error if deletion failed
func (Handler) UnsafeDeleteKasKey ¶ added in v0.24.0
func (Handler) UnsafeDeleteNamespace ¶
Deletes and returns the deleted namespace
func (Handler) UnsafeReactivateAttribute ¶
func (h Handler) UnsafeReactivateAttribute(ctx context.Context, id string) (*policy.Attribute, error)
Reactivates and returns reactivated attribute
func (Handler) UnsafeReactivateAttributeValue ¶
func (h Handler) UnsafeReactivateAttributeValue(ctx context.Context, id string) (*policy.Value, error)
Reactivates and returns reactivated attribute
func (Handler) UnsafeReactivateNamespace ¶
func (h Handler) UnsafeReactivateNamespace(ctx context.Context, id string) (*policy.Namespace, error)
Reactivates and returns the reactivated namespace
func (Handler) UnsafeUpdateAttribute ¶
func (h Handler) UnsafeUpdateAttribute(ctx context.Context, id, name, rule string, valuesOrder []string) error
Deletes and returns error if deletion failed
func (Handler) UnsafeUpdateAttributeValue ¶
Deletes and returns error if deletion failed
func (Handler) UnsafeUpdateNamespace ¶
func (h Handler) UnsafeUpdateNamespace(ctx context.Context, id, name string) (*policy.Namespace, error)
Unsafely updates the namespace and returns the renamed namespace
func (Handler) UpdateAction ¶ added in v0.21.0
func (*Handler) UpdateAttribute ¶
func (h *Handler) UpdateAttribute( ctx context.Context, id string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum, ) (*policy.Attribute, error)
Updates and returns updated attribute
func (*Handler) UpdateAttributeValue ¶
func (h *Handler) UpdateAttributeValue(ctx context.Context, id string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.Value, error)
Updates and returns updated value
func (Handler) UpdateKasKey ¶ added in v0.21.0
func (Handler) UpdateKasRegistryEntry ¶
func (h Handler) UpdateKasRegistryEntry(ctx context.Context, id, uri, name string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.KeyAccessServer, error)
Updates the KAS registry and then returns the KAS
func (Handler) UpdateNamespace ¶
func (h Handler) UpdateNamespace(ctx context.Context, id string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.Namespace, error)
Updates and returns the updated namespace
func (Handler) UpdateObligation ¶ added in v0.25.0
func (h Handler) UpdateObligation(ctx context.Context, id, name string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.Obligation, error)
func (Handler) UpdateObligationValue ¶ added in v0.25.0
func (h Handler) UpdateObligationValue(ctx context.Context, id, value string, triggers []*obligations.ValueTriggerRequest, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.ObligationValue, error)
func (Handler) UpdateProviderConfig ¶ added in v0.21.0
func (h Handler) UpdateProviderConfig( ctx context.Context, id, name, manager string, config []byte, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.KeyProviderConfig, error)
func (Handler) UpdateRegisteredResource ¶ added in v0.21.0
func (h Handler) UpdateRegisteredResource(ctx context.Context, id, name string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.RegisteredResource, error)
func (Handler) UpdateRegisteredResourceValue ¶ added in v0.21.0
func (h Handler) UpdateRegisteredResourceValue(ctx context.Context, id, value string, actionAttributeValues []*registeredresources.ActionAttributeValue, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.RegisteredResourceValue, error)
func (*Handler) UpdateResourceMapping ¶
func (h *Handler) UpdateResourceMapping(id string, attrValueID string, grpID string, terms []string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.ResourceMapping, error)
TODO: verify updation behavior Updates and returns the updated resource mapping
func (*Handler) UpdateResourceMappingGroup ¶ added in v0.21.0
func (h *Handler) UpdateResourceMappingGroup(ctx context.Context, id string, namespaceID string, name string, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.ResourceMappingGroup, error)
TODO: verify updation behavior Updates and returns the updated resource mapping
func (Handler) UpdateSubjectConditionSet ¶
func (h Handler) UpdateSubjectConditionSet(ctx context.Context, id string, ss []*policy.SubjectSet, metadata *common.MetadataMutable, behavior common.MetadataUpdateEnum) (*policy.SubjectConditionSet, error)
Updates and returns the updated subject condition set
func (Handler) UpdateSubjectMapping ¶
func (h Handler) UpdateSubjectMapping(ctx context.Context, id string, updatedSCSId string, updatedActions []*policy.Action, metadata *common.MetadataMutable, metadataBehavior common.MetadataUpdateEnum) (*policy.SubjectMapping, error)
Updates and returns the updated subject mapping
func (Handler) WithLabelMetadata ¶
func (h Handler) WithLabelMetadata(metadata *common.MetadataMutable, key, value string) func(*common.MetadataMutable) *common.MetadataMutable
Append a label to the metadata
func (Handler) WithReplaceLabelsMetadata ¶
func (h Handler) WithReplaceLabelsMetadata(metadata *common.MetadataMutable, labels map[string]string) func(*common.MetadataMutable) *common.MetadataMutable
Replace all labels in the metadata
type KasIdentifier ¶ added in v0.21.0
type ResourceMapping ¶
type RotateKeyResult ¶ added in v0.21.0
type RotateKeyResult struct {
KasKey *policy.KasKey `json:"kas_key"`
RotatedResources *kasregistry.RotatedResources `json:"rotated_resources"`
}