v1alpha1

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MPL-2.0 Imports: 5 Imported by: 1

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(claims *UserClaims) (*jwt.UserClaims, error)

Types

type Limits

type Limits struct {
	UserLimits        `json:",inline"`
	common.NatsLimits `json:",inline"`
}

Limits Specifies the limits for this user

func (*Limits) DeepCopy

func (in *Limits) DeepCopy() *Limits

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Limits.

func (*Limits) DeepCopyInto

func (in *Limits) DeepCopyInto(out *Limits)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TimeRange

type TimeRange struct {
	// The start time in the format HH:MM:SS
	// +kubebuilder:validation:Pattern="^(((([0-1][0-9])|(2[0-3])):?[0-5][0-9]:?[0-5][0-9]+$))"
	// +kubebuilder:validation:Optional
	Start string `json:"start,omitempty"`
	// The end time in the format HH:MM:SS
	// +kubebuilder:validation:Pattern="^(((([0-1][0-9])|(2[0-3])):?[0-5][0-9]:?[0-5][0-9]+$))"
	// +kubebuilder:validation:Optional
	End string `json:"end,omitempty"`
}

func (*TimeRange) DeepCopy

func (in *TimeRange) DeepCopy() *TimeRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeRange.

func (*TimeRange) DeepCopyInto

func (in *TimeRange) DeepCopyInto(out *TimeRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type User

type User struct {
	// The account that issued this user JWT
	// +kubebuilder:validation:Optional
	IssuerAccount        string `json:"issuerAccount,omitempty"`
	UserPermissionLimits `json:",inline"`
	common.GenericFields `json:",inline"`
}

User holds user specific claims data

func (*User) DeepCopy

func (in *User) DeepCopy() *User

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.

func (*User) DeepCopyInto

func (in *User) DeepCopyInto(out *User)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserClaims

type UserClaims struct {
	// Common data for all JWTs
	common.ClaimsData `json:",inline"`
	// Specifies the user specific part of the JWT
	// +kubebuilder:validation:Optional
	User `json:"user,omitempty"`
}

Specifies claims of the JWT +kubebuilder:object:generate=true

func (*UserClaims) DeepCopy

func (in *UserClaims) DeepCopy() *UserClaims

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClaims.

func (*UserClaims) DeepCopyInto

func (in *UserClaims) DeepCopyInto(out *UserClaims)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserLimits

type UserLimits struct {
	// A list of CIDR specifications the user is allowed to connect from
	// Example: 192.168.1.0/24, 192.168.1.1/1 or 2001:db8:a0b:12f0::1/32
	// +kubebuilder:validation:Optional
	Src []string `json:"src,omitempty"`
	// Represents allowed time ranges the user is allowed to interact with the system
	Times []TimeRange `json:"times,omitempty"`
	// The locale for the times in the format "Europe/Berlin"
	// +kubebuilder:validation:Optional
	Locale string `json:"timesLocation,omitempty"`
}

UserLimits Specifies the limits for this user

func (*UserLimits) DeepCopy

func (in *UserLimits) DeepCopy() *UserLimits

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserLimits.

func (*UserLimits) DeepCopyInto

func (in *UserLimits) DeepCopyInto(out *UserLimits)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserPermissionLimits

type UserPermissionLimits struct {
	common.Permissions `json:",inline"`
	Limits             `json:",inline"`
	// Specifies if this user is allowed to use a bearer token to connect
	// +kubebuilder:validation:Optional
	BearerToken bool `json:"bearerToken,omitempty"`
	// Specifies the allowed connection types for this user
	// Allowed values are STANDARD, WEBSOCKET, LEAFNODE, LEAFNODE_WS, MQTT, MQTT_WS
	// +kubebuilder:validation:Enum=STANDARD;WEBSOCKET;LEAFNODE;LEAFNODE_WS;MQTT;MQTT_WS
	// +kubebuilder:validation:Optional
	AllowedConnectionTypes []string `json:"allowedConnectionTypes,omitempty"`
}

UserPermissionLimits Specifies the permissions and limits for this user

func (*UserPermissionLimits) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPermissionLimits.

func (*UserPermissionLimits) DeepCopyInto

func (in *UserPermissionLimits) DeepCopyInto(out *UserPermissionLimits)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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