permissions

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const RoleAgentOperator = "agent_operator"

RoleAgentOperator is the fixed role of an mcp:operate agent token: the reader's actions plus reversible lifecycle operations and applying a deployment plan someone else made. Nothing that destroys, executes, reconfigures or reveals a secret.

View Source
const RoleAgentReader = "agent_reader"

RoleAgentReader is the fixed role of an mcp:read agent token: it reads the organization's endpoints, inventory, samples, logs and pending updates, and changes nothing.

View Source
const RolePulseReader = "pulse_reader"

RolePulseReader is the fixed role of a service token: kyPulse reads inventory, samples, logs and the audit feed of one organization and can change nothing.

Variables

This section is empty.

Functions

func Allows

func Allows(role string, action Action) bool

func PlatformAllows

func PlatformAllows(role string, action Action) bool

Types

type Action

type Action string

Action names are stable audit identifiers, not caller-supplied role checks.

const (
	ApplicationAdopt   Action = "application.adopt"
	ApplicationRelease Action = "application.release"
	SecretReveal       Action = "secret.reveal"
	ApplicationRead    Action = "application.read"
	ApplicationImport  Action = "application.import"
	ApplicationEdit    Action = "application.edit"
	ApplicationDestroy Action = "application.destroy"
	PlatformAdmin      Action = "platform.admin"
	OrganizationRead   Action = "organization.read"
	MembersManage      Action = "organization.members.manage"
	EnvironmentRead    Action = "environment.read"
	EnvironmentCreate  Action = "environment.create"
	EnvironmentUpdate  Action = "environment.update"
	EnvironmentDelete  Action = "environment.delete"
	AuditRead          Action = "organization.audit.read"
	EndpointRead       Action = "endpoint.read"
	EndpointEnroll     Action = "endpoint.enroll"
	EndpointUpdate     Action = "endpoint.update"
	EndpointRevoke     Action = "endpoint.revoke"
	// ContainerOperate is start, stop and restart: reversible lifecycle actions on a
	// container that already exists. Destroying one is a separate action, because undoing it
	// is not a matter of running the opposite command.
	ContainerOperate Action = "container.operate"
	// ContainerDestroy removes a container. It is separate from operating one because the
	// opposite command does not undo it, and the matrix gives it to administrators only.
	ContainerDestroy Action = "container.destroy"
	// ImagePull fetches an image onto an endpoint. It is not destructive, but it spends the
	// host's disk and bandwidth and will later spend a registry credential, so the matrix
	// stops at the operator.
	ImagePull Action = "image.pull"
	// ImageDestroy removes an image from an endpoint.
	ImageDestroy Action = "image.destroy"
	// ContainerLogs reads what a container has written. It is separate from reading a
	// container because a log is the application's own output: it carries whatever the
	// workload prints, which is where credentials and customer data turn up, so the matrix
	// stops it at the developer and audits every session.
	ContainerLogs Action = "container.logs"
	ContainerExec Action = "container.exec"
	// ContainerConfigure reads a container's full configuration and recreates or runs one; it exposes environment values, so it sits with exec.
	ContainerConfigure Action = "container.configure"
	// ApplicationDeploy mints and, in a later slice, applies a deployment plan. The matrix gives
	// it to developers because a plan is desired state made concrete, not host authority.
	ApplicationDeploy Action = "application.deploy"
	// RegistryRead lists registries and the anonymous-pull policy; rows never carry a secret.
	RegistryRead Action = "registry.read"
	// RegistryManage writes registries, their credentials and the anonymous-pull opt-in.
	RegistryManage Action = "registry.manage"
	// ApplicationPolicy creates, edits, deletes and resumes an application's update policy. A
	// policy deploys unattended as whoever saved it last, so the matrix stops at the organization
	// administrator.
	ApplicationPolicy Action = "application.policy"
	// ApplicationMigrate analyzes an application for a cluster, records its storage choices and
	// creates the destination application, copying the source's secret values into it. Only the
	// organization administrator, who may reveal those values anyway, holds it.
	ApplicationMigrate Action = "application.migrate"
	// ServiceTokensManage mints pairing codes for, lists and revokes the organization's
	// service tokens. A token reads the whole organization, so only its administrator
	// hands one out.
	ServiceTokensManage Action = "organization.service_tokens.manage"
	// AgentTokensManage creates, lists, re-scopes and revokes the organization's AI agent (MCP)
	// tokens. An operator-scope token restarts containers and applies updates unattended, so
	// only the organization administrator hands one out.
	AgentTokensManage Action = "organization.agent_tokens.manage"
	// SuiteRead reads the suite runner's status, catalog, plan and operations.
	SuiteRead Action = "suite.read"
	// SuiteManage installs, uninstalls, unmanages and upgrades suite apps through the runner.
	SuiteManage Action = "suite.manage"
)

Jump to

Keyboard shortcuts

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