acltrie

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package acltrie contains a trie for gNMI path with a corresponding policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

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

Trie is the root of the ACL trie.

func FromPolicy

func FromPolicy(p *pathzpb.AuthorizationPolicy) (*Trie, error)

FromPolicy creates a new trie from a pathzpb.AuthorizationPolicy.

func (*Trie) Insert

func (t *Trie) Insert(r *pathzpb.AuthorizationRule) error

Insert inserts a new rule into the trie.

func (*Trie) Probe

func (t *Trie) Probe(path *gpb.Path, user string, mode pathzpb.Mode) pathzpb.Action

Probe returns the action for the given path, user, and mode; if there is no match, deny is returned

Jump to

Keyboard shortcuts

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