model

package
v0.0.0-...-2c1c132 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RBACDUBBOFilterName is the name of the dubbo rbac filter
	RBACDUBBOFilterName = "envoy.filters.dubbo.rbac"
	// RBACDubboFilterStatPrefix is the stat prefix for dubbo rbac filter
	RBACDubboFilterStatPrefix = "dubbo."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model represents a single rule from an authorization policy. The conditions of the rule are consolidated into permission or principal to align with the Envoy RBAC filter API.

func New

func New(r *dubbopb.Rule) (*Model, error)

New returns a model representing a single authorization policy.

func (*Model) Generate

func (m *Model) Generate(action rbacpb.RBAC_Action) (*rbacpb.Policy, error)

Generate generates the Envoy RBAC config from the model.

func (*Model) MigrateTrustDomain

func (m *Model) MigrateTrustDomain(tdBundle trustdomain.Bundle)

MigrateTrustDomain replaces the trust domain in source principal based on the trust domain aliases information.

Jump to

Keyboard shortcuts

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