v1alpha1

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

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

Go to latest
Published: Jul 2, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnforcementMode_name = map[int32]string{
	0: "ENFORCED",
	1: "PERMISSIVE",
}
View Source
var EnforcementMode_value = map[string]int32{
	"ENFORCED":   0,
	"PERMISSIVE": 1,
}
View Source
var RbacConfig_Mode_name = map[int32]string{
	0: "OFF",
	1: "ON",
	2: "ON_WITH_INCLUSION",
	3: "ON_WITH_EXCLUSION",
}
View Source
var RbacConfig_Mode_value = map[string]int32{
	"OFF":               0,
	"ON":                1,
	"ON_WITH_INCLUSION": 2,
	"ON_WITH_EXCLUSION": 3,
}

Functions

This section is empty.

Types

type AccessRule

type AccessRule struct {
	// Required. A list of service names.
	// Exact match, prefix match, and suffix match are supported for service names.
	// For example, the service name "bookstore.mtv.cluster.local" matches
	// "bookstore.mtv.cluster.local" (exact match), or "bookstore*" (prefix match),
	// or "*.mtv.cluster.local" (suffix match).
	// If set to ["*"], it refers to all services in the namespace.
	Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	// Optional. A list of HTTP paths or gRPC methods.
	// gRPC methods must be presented as fully-qualified name in the form of
	// packageName.serviceName/methodName.
	// Exact match, prefix match, and suffix match are supported for paths.
	// For example, the path "/books/review" matches
	// "/books/review" (exact match), or "/books/*" (prefix match),
	// or "*/review" (suffix match).
	// If not specified, it applies to any path.
	Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
	// Optional. A list of HTTP methods (e.g., "GET", "POST").
	// It is ignored in gRPC case because the value is always "POST".
	// If set to ["*"] or not specified, it applies to any method.
	Methods []string `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
	// Optional. Extra constraints in the ServiceRole specification.
	// The above ServiceRole examples shows an example of constraint "version".
	Constraints          []*AccessRule_Constraint `protobuf:"bytes,4,rep,name=constraints,proto3" json:"constraints,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

AccessRule defines a permission to access a list of services.

func (*AccessRule) Descriptor

func (*AccessRule) Descriptor() ([]byte, []int)

func (*AccessRule) GetConstraints

func (m *AccessRule) GetConstraints() []*AccessRule_Constraint

func (*AccessRule) GetMethods

func (m *AccessRule) GetMethods() []string

func (*AccessRule) GetPaths

func (m *AccessRule) GetPaths() []string

func (*AccessRule) GetServices

func (m *AccessRule) GetServices() []string

func (*AccessRule) ProtoMessage

func (*AccessRule) ProtoMessage()

func (*AccessRule) Reset

func (m *AccessRule) Reset()

func (*AccessRule) String

func (m *AccessRule) String() string

func (*AccessRule) XXX_DiscardUnknown

func (m *AccessRule) XXX_DiscardUnknown()

func (*AccessRule) XXX_Marshal

func (m *AccessRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessRule) XXX_Merge

func (dst *AccessRule) XXX_Merge(src proto.Message)

func (*AccessRule) XXX_Size

func (m *AccessRule) XXX_Size() int

func (*AccessRule) XXX_Unmarshal

func (m *AccessRule) XXX_Unmarshal(b []byte) error

type AccessRule_Constraint

type AccessRule_Constraint struct {
	// Key of the constraint.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// List of valid values for the constraint.
	// Exact match, prefix match, and suffix match are supported for constraint values.
	// For example, the value "v1alpha2" matches
	// "v1alpha2" (exact match), or "v1*" (prefix match),
	// or "*alpha2" (suffix match).
	Values               []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Definition of a custom constraint. The key of a custom constraint must match one of the "properties" in the "action" part of the "authorization" template (https://github.com/istio/istio/blob/master/mixer/template/authorization/template.proto).

func (*AccessRule_Constraint) Descriptor

func (*AccessRule_Constraint) Descriptor() ([]byte, []int)

func (*AccessRule_Constraint) GetKey

func (m *AccessRule_Constraint) GetKey() string

func (*AccessRule_Constraint) GetValues

func (m *AccessRule_Constraint) GetValues() []string

func (*AccessRule_Constraint) ProtoMessage

func (*AccessRule_Constraint) ProtoMessage()

func (*AccessRule_Constraint) Reset

func (m *AccessRule_Constraint) Reset()

func (*AccessRule_Constraint) String

func (m *AccessRule_Constraint) String() string

func (*AccessRule_Constraint) XXX_DiscardUnknown

func (m *AccessRule_Constraint) XXX_DiscardUnknown()

func (*AccessRule_Constraint) XXX_Marshal

func (m *AccessRule_Constraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessRule_Constraint) XXX_Merge

func (dst *AccessRule_Constraint) XXX_Merge(src proto.Message)

func (*AccessRule_Constraint) XXX_Size

func (m *AccessRule_Constraint) XXX_Size() int

func (*AccessRule_Constraint) XXX_Unmarshal

func (m *AccessRule_Constraint) XXX_Unmarshal(b []byte) error

type EnforcementMode

type EnforcementMode int32

$hide_from_docs RBAC ServiceRoleBinding enforcement mode, used to verify new ServiceRoleBinding configs work as expected before rolling to production. RBAC engine only logs results from configs that are in permissive mode, and discards result before returning to the user.

const (
	// Policy in ENFORCED mode has impact on user experience.
	// Policy is in ENFORCED mode by default.
	EnforcementMode_ENFORCED EnforcementMode = 0
	// Policy in PERMISSIVE mode isn't enforced and has no impact on users.
	// RBAC engine run policies in PERMISSIVE mode and logs stats.
	EnforcementMode_PERMISSIVE EnforcementMode = 1
)

func (EnforcementMode) EnumDescriptor

func (EnforcementMode) EnumDescriptor() ([]byte, []int)

func (EnforcementMode) String

func (x EnforcementMode) String() string

type RbacConfig

type RbacConfig struct {
	// Istio RBAC mode.
	Mode RbacConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.rbac.v1alpha1.RbacConfig_Mode" json:"mode,omitempty"`
	// A list of services or namespaces that should be enforced by Istio RBAC policies. Note: This field have
	// effect only when mode is ON_WITH_INCLUSION and will be ignored for any other modes.
	Inclusion *RbacConfig_Target `protobuf:"bytes,2,opt,name=inclusion,proto3" json:"inclusion,omitempty"`
	// A list of services or namespaces that should not be enforced by Istio RBAC policies. Note: This field have
	// effect only when mode is ON_WITH_EXCLUSION and will be ignored for any other modes.
	Exclusion            *RbacConfig_Target `protobuf:"bytes,3,opt,name=exclusion,proto3" json:"exclusion,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

RbacConfig defines the global config to control Istio RBAC behavior. This Custom Resource is a singleton where only one Custom Resource should be created globally in the mesh and the namespace should be the same to other Istio components, which usually is istio-system. Note: This is enforced in both istioctl and server side, new Custom Resource will be rejected if found any existing one, the user should either delete the existing one or change the existing one directly.

Below is an example of RbacConfig object "istio-rbac-config" which enables Istio RBAC for all services in the default namespace.

```yaml apiVersion: "config.istio.io/v1alpha1" kind: RbacConfig metadata:

name: istio-rbac-config
namespace: istio-system

spec:

mode: ON_WITH_INCLUSION
inclusion:
  namespaces: [ "default" ]

```

func (*RbacConfig) Descriptor

func (*RbacConfig) Descriptor() ([]byte, []int)

func (*RbacConfig) GetExclusion

func (m *RbacConfig) GetExclusion() *RbacConfig_Target

func (*RbacConfig) GetInclusion

func (m *RbacConfig) GetInclusion() *RbacConfig_Target

func (*RbacConfig) GetMode

func (m *RbacConfig) GetMode() RbacConfig_Mode

func (*RbacConfig) ProtoMessage

func (*RbacConfig) ProtoMessage()

func (*RbacConfig) Reset

func (m *RbacConfig) Reset()

func (*RbacConfig) String

func (m *RbacConfig) String() string

func (*RbacConfig) XXX_DiscardUnknown

func (m *RbacConfig) XXX_DiscardUnknown()

func (*RbacConfig) XXX_Marshal

func (m *RbacConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RbacConfig) XXX_Merge

func (dst *RbacConfig) XXX_Merge(src proto.Message)

func (*RbacConfig) XXX_Size

func (m *RbacConfig) XXX_Size() int

func (*RbacConfig) XXX_Unmarshal

func (m *RbacConfig) XXX_Unmarshal(b []byte) error

type RbacConfig_Mode

type RbacConfig_Mode int32
const (
	// Disable Istio RBAC completely, any other config in RbacConfig will be ignored and Istio RBAC policies
	// will not be enforced.
	RbacConfig_OFF RbacConfig_Mode = 0
	// Enable Istio RBAC for all services and namespaces.
	RbacConfig_ON RbacConfig_Mode = 1
	// Enable Istio RBAC only for services and namespaces specified in the inclusion field. Any other
	// services and namespaces not in the inclusion field will not be enforced by Istio RBAC policies.
	RbacConfig_ON_WITH_INCLUSION RbacConfig_Mode = 2
	// Enable Istio RBAC for all services and namespaces except those specified in the exclusion field. Any other
	// services and namespaces not in the exclusion field will be enforced by Istio RBAC policies.
	RbacConfig_ON_WITH_EXCLUSION RbacConfig_Mode = 3
)

func (RbacConfig_Mode) EnumDescriptor

func (RbacConfig_Mode) EnumDescriptor() ([]byte, []int)

func (RbacConfig_Mode) String

func (x RbacConfig_Mode) String() string

type RbacConfig_Target

type RbacConfig_Target struct {
	// A list of services.
	Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	// A list of namespaces.
	Namespaces           []string `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Target defines a list of services or namespaces.

func (*RbacConfig_Target) Descriptor

func (*RbacConfig_Target) Descriptor() ([]byte, []int)

func (*RbacConfig_Target) GetNamespaces

func (m *RbacConfig_Target) GetNamespaces() []string

func (*RbacConfig_Target) GetServices

func (m *RbacConfig_Target) GetServices() []string

func (*RbacConfig_Target) ProtoMessage

func (*RbacConfig_Target) ProtoMessage()

func (*RbacConfig_Target) Reset

func (m *RbacConfig_Target) Reset()

func (*RbacConfig_Target) String

func (m *RbacConfig_Target) String() string

func (*RbacConfig_Target) XXX_DiscardUnknown

func (m *RbacConfig_Target) XXX_DiscardUnknown()

func (*RbacConfig_Target) XXX_Marshal

func (m *RbacConfig_Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RbacConfig_Target) XXX_Merge

func (dst *RbacConfig_Target) XXX_Merge(src proto.Message)

func (*RbacConfig_Target) XXX_Size

func (m *RbacConfig_Target) XXX_Size() int

func (*RbacConfig_Target) XXX_Unmarshal

func (m *RbacConfig_Target) XXX_Unmarshal(b []byte) error

type RoleRef

type RoleRef struct {
	// Required. The type of the role being referenced.
	// Currently, "ServiceRole" is the only supported value for "kind".
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// Required. The name of the ServiceRole object being referenced.
	// The ServiceRole object must be in the same namespace as the ServiceRoleBinding
	// object.
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RoleRef refers to a role object.

func (*RoleRef) Descriptor

func (*RoleRef) Descriptor() ([]byte, []int)

func (*RoleRef) GetKind

func (m *RoleRef) GetKind() string

func (*RoleRef) GetName

func (m *RoleRef) GetName() string

func (*RoleRef) ProtoMessage

func (*RoleRef) ProtoMessage()

func (*RoleRef) Reset

func (m *RoleRef) Reset()

func (*RoleRef) String

func (m *RoleRef) String() string

func (*RoleRef) XXX_DiscardUnknown

func (m *RoleRef) XXX_DiscardUnknown()

func (*RoleRef) XXX_Marshal

func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RoleRef) XXX_Merge

func (dst *RoleRef) XXX_Merge(src proto.Message)

func (*RoleRef) XXX_Size

func (m *RoleRef) XXX_Size() int

func (*RoleRef) XXX_Unmarshal

func (m *RoleRef) XXX_Unmarshal(b []byte) error

type ServiceRole

type ServiceRole struct {
	// Required. The set of access rules (permissions) that the role has.
	Rules                []*AccessRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

ServiceRole specification contains a list of access rules (permissions). This represent the "Spec" part of the ServiceRole object. The name and namespace of the ServiceRole is specified in "metadata" section of the ServiceRole object.

func (*ServiceRole) Descriptor

func (*ServiceRole) Descriptor() ([]byte, []int)

func (*ServiceRole) GetRules

func (m *ServiceRole) GetRules() []*AccessRule

func (*ServiceRole) ProtoMessage

func (*ServiceRole) ProtoMessage()

func (*ServiceRole) Reset

func (m *ServiceRole) Reset()

func (*ServiceRole) String

func (m *ServiceRole) String() string

func (*ServiceRole) XXX_DiscardUnknown

func (m *ServiceRole) XXX_DiscardUnknown()

func (*ServiceRole) XXX_Marshal

func (m *ServiceRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceRole) XXX_Merge

func (dst *ServiceRole) XXX_Merge(src proto.Message)

func (*ServiceRole) XXX_Size

func (m *ServiceRole) XXX_Size() int

func (*ServiceRole) XXX_Unmarshal

func (m *ServiceRole) XXX_Unmarshal(b []byte) error

type ServiceRoleBinding

type ServiceRoleBinding struct {
	// Required. List of subjects that are assigned the ServiceRole object.
	Subjects []*Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"`
	// Required. Reference to the ServiceRole object.
	RoleRef *RoleRef `protobuf:"bytes,2,opt,name=roleRef,proto3" json:"roleRef,omitempty"`
	// $hide_from_docs
	// Indicates enforcement mode of the ServiceRoleBinding.
	Mode                 EnforcementMode `protobuf:"varint,3,opt,name=mode,proto3,enum=istio.rbac.v1alpha1.EnforcementMode" json:"mode,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

ServiceRoleBinding assigns a ServiceRole to a list of subjects. This represents the "Spec" part of the ServiceRoleBinding object. The name and namespace of the ServiceRoleBinding is specified in "metadata" section of the ServiceRoleBinding object.

func (*ServiceRoleBinding) Descriptor

func (*ServiceRoleBinding) Descriptor() ([]byte, []int)

func (*ServiceRoleBinding) GetMode

func (m *ServiceRoleBinding) GetMode() EnforcementMode

func (*ServiceRoleBinding) GetRoleRef

func (m *ServiceRoleBinding) GetRoleRef() *RoleRef

func (*ServiceRoleBinding) GetSubjects

func (m *ServiceRoleBinding) GetSubjects() []*Subject

func (*ServiceRoleBinding) ProtoMessage

func (*ServiceRoleBinding) ProtoMessage()

func (*ServiceRoleBinding) Reset

func (m *ServiceRoleBinding) Reset()

func (*ServiceRoleBinding) String

func (m *ServiceRoleBinding) String() string

func (*ServiceRoleBinding) XXX_DiscardUnknown

func (m *ServiceRoleBinding) XXX_DiscardUnknown()

func (*ServiceRoleBinding) XXX_Marshal

func (m *ServiceRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceRoleBinding) XXX_Merge

func (dst *ServiceRoleBinding) XXX_Merge(src proto.Message)

func (*ServiceRoleBinding) XXX_Size

func (m *ServiceRoleBinding) XXX_Size() int

func (*ServiceRoleBinding) XXX_Unmarshal

func (m *ServiceRoleBinding) XXX_Unmarshal(b []byte) error

type Subject

type Subject struct {
	// Optional. The user name/ID that the subject represents.
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// Optional. The group that the subject belongs to.
	Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"`
	// Optional. The set of properties that identify the subject.
	// In the above ServiceRoleBinding example, the second subject has two properties:
	//     service: "reviews"
	//     namespace: "abc"
	Properties           map[string]string `` /* 161-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Subject defines an identity or a group of identities. The identity is either a user or a group or identified by a set of "properties". The name of the "properties" must match the "properties" in the "subject" part of the "authorization" template (https://github.com/istio/istio/blob/master/mixer/template/authorization/template.proto).

func (*Subject) Descriptor

func (*Subject) Descriptor() ([]byte, []int)

func (*Subject) GetGroup

func (m *Subject) GetGroup() string

func (*Subject) GetProperties

func (m *Subject) GetProperties() map[string]string

func (*Subject) GetUser

func (m *Subject) GetUser() string

func (*Subject) ProtoMessage

func (*Subject) ProtoMessage()

func (*Subject) Reset

func (m *Subject) Reset()

func (*Subject) String

func (m *Subject) String() string

func (*Subject) XXX_DiscardUnknown

func (m *Subject) XXX_DiscardUnknown()

func (*Subject) XXX_Marshal

func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Subject) XXX_Merge

func (dst *Subject) XXX_Merge(src proto.Message)

func (*Subject) XXX_Size

func (m *Subject) XXX_Size() int

func (*Subject) XXX_Unmarshal

func (m *Subject) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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