acl

package
v0.13.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 8 Imported by: 19

Documentation

Overview

Package acl provides utilities for asserting cross-namespace access to GitOps Toolkit objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

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

Authorization is an ACL helper for asserting access to cross-namespace references.

func NewAuthorization

func NewAuthorization(kubeClient client.Client) *Authorization

NewAuthorization takes a controller runtime client and returns an Authorization object that allows asserting access to cross-namespace references.

func (*Authorization) HasAccessToRef

func (a *Authorization) HasAccessToRef(ctx context.Context, object client.Object, reference types.NamespacedName, acl *aclapi.AccessFrom) (bool, error)

HasAccessToRef asserts if a namespaced object has access to a cross-namespace reference based on the ACL defined on the referenced object.

Jump to

Keyboard shortcuts

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