publicapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package publicapi is the HTTP projection of the OpenAPI contract.

Same Bearer as MCP. Responses never include vault secrets. CLI, MCP, and generated SDKs are adapters over these operations.

POST /v1/fill/* is the native-host secret path. It is not on the OpenAPI contract and not an MCP tool.

Index

Constants

This section is empty.

Variables

View Source
var Spec []byte

Spec is the OpenAPI contract. SDKs, Blume /reference, and GET /openapi.json are this file. Do not handwrite clients.

View Source
var VaultOrigins = map[string]struct{}{
	"https://app.veil.nyc":  {},
	"http://127.0.0.1:4470": {},
	"http://localhost:4470": {},

	"veil-app://vault": {},
}

VaultOrigins are browser origins allowed to call origin with a human Bearer. Agents do not use CORS; they send Authorization from a process.

Functions

func CORS

func CORS(next http.Handler) http.Handler

CORS allows the vault SPA to call origin. OPTIONS is answered here so preflight never hits Bearer. Unknown origins get no ACAO.

func Mount

func Mount(mux *http.ServeMux, a *app.App)

Types

type AddGroupMemberRequest

type AddGroupMemberRequest struct {
	MemberKind string `json:"member_kind"`
	MemberID   string `json:"member_id"`
}

type AgentsResponse

type AgentsResponse struct {
	Agents []protocol.Principal `json:"agents"`
}

type AuditFeedResponse

type AuditFeedResponse struct {
	Events    []protocol.AuditFeedEvent `json:"events"`
	NextAfter int64                     `json:"next_after"`
}

AuditFeedResponse is one page of the org's committed audit feed — `next_after` is the id cursor for the following page.

type BillingView

type BillingView struct {
	Plan        string    `json:"plan"`
	Used        int64     `json:"used"`
	Included    *int64    `json:"included"`
	WindowStart time.Time `json:"window_start"`
	WindowEnd   time.Time `json:"window_end"`
	UpgradeURL  string    `json:"upgrade_url,omitempty"`
}

BillingView is the owner-facing billing state: plan as enforced by the Use gate plus this window's consumption against the free allowance. included is null when metering is off (cap unset) or the plan is paid.

type BindWorkloadRequest

type BindWorkloadRequest struct {
	Issuer   string              `json:"issuer"`
	Subject  string              `json:"subject"`
	Audience string              `json:"audience"`
	Claims   map[string][]string `json:"claims,omitempty"`
}

type CardFields

type CardFields struct {
	Number   string `json:"number,omitempty"`
	ExpMonth string `json:"exp_month,omitempty"`
	ExpYear  string `json:"exp_year,omitempty"`
	CVV      string `json:"cvv,omitempty"`
	Holder   string `json:"holder,omitempty"`
}

type CreateAgentRequest

type CreateAgentRequest struct {
	Name string `json:"name"`
}

type CreateGrantRequest

type CreateGrantRequest struct {
	Agent   string `json:"agent,omitempty"`
	Human   string `json:"human,omitempty"`
	Group   string `json:"group,omitempty"`
	Item    string `json:"item"`
	Level   string `json:"level"`
	Expires string `json:"expires,omitempty"`
}

type CreateGroupRequest

type CreateGroupRequest struct {
	Name string `json:"name"`
}

type CreateItemRequest

type CreateItemRequest struct {
	Name     string          `json:"name"`
	URI      string          `json:"uri,omitempty"`
	URIs     []string        `json:"uris,omitempty"`
	Tags     []string        `json:"tags,omitempty"`
	Kind     string          `json:"kind,omitempty"`
	Secret   string          `json:"secret,omitempty"`
	TOTPSeed string          `json:"totp_seed,omitempty"`
	Login    string          `json:"login,omitempty"`
	Card     *CardFields     `json:"card,omitempty"`
	Identity *IdentityFields `json:"identity,omitempty"`
	WIF      *WIFItemFields  `json:"wif,omitempty"`
}

type CreateSessionRequest

type CreateSessionRequest struct {
	Agent   string `json:"agent"`
	TTL     string `json:"ttl,omitempty"`
	MaxUses int    `json:"max_uses,omitempty"`
}

type CreateSessionResponse

type CreateSessionResponse struct {
	protocol.Session
	Token string `json:"token"`
}

type EventsResponse

type EventsResponse struct {
	Events []protocol.AuditEvent `json:"events"`
}

type FillEvent

type FillEvent struct {
	UUID     string `json:"uuid"`
	Kind     string `json:"kind,omitempty"`
	MintTOTP bool   `json:"mint_totp,omitempty"`
	TS       string `json:"ts,omitempty"`
}

FillEvent is one client-reported disclosure — the host served the secret from its sealed replica, so the release is attested here instead of implied by a /v1/fill/logins call. TS is the client's fill time.

type FillEventsRequest

type FillEventsRequest struct {
	Events []FillEvent `json:"events"`
}

type FillLogin

type FillLogin struct {
	Login    string `json:"login"`
	Name     string `json:"name"`
	Password string `json:"password"`
	UUID     string `json:"uuid"`
	TOTP     string `json:"totp,omitempty"`
}

type FillLoginsRequest

type FillLoginsRequest struct {
	URL      string `json:"url,omitempty"`
	UUID     string `json:"uuid,omitempty"`
	MintTOTP bool   `json:"mintTotp,omitempty"`
}

type FillLoginsResponse

type FillLoginsResponse struct {
	Entries []FillLogin `json:"entries"`
}

type FillPasskeysRequest

type FillPasskeysRequest struct {
	Origin         string          `json:"origin"`
	PublicKey      json.RawMessage `json:"publicKey"`
	RelatedOrigins []string        `json:"relatedOrigins,omitempty"`
}

type FillPasskeysResponse

type FillPasskeysResponse struct {
	Response json.RawMessage `json:"response"`
}

type FillRequestIn

type FillRequestIn struct {
	ItemID string `json:"item_id"`
	Device string `json:"device"`
}

FillRequest files a fill-approval ask: this device wants this item and a human must answer on another device — 1Password's "approve sign-in" posture. grant_id is synthetic ("fill:<item>") so open asks dedupe per item; approval resolves the row directly (no minted approval — the device polls for the decision, nothing else consumes it).

type FillRequestOut

type FillRequestOut struct {
	RequestID string                 `json:"request_id"`
	Status    protocol.RequestStatus `json:"status"`
	ExpiresAt time.Time              `json:"expires_at"`
}

type FillSyncItem

type FillSyncItem struct {
	Item     protocol.Item `json:"item"`
	Material string        `json:"material"`
}

type FillSyncRequest

type FillSyncRequest struct {
	Since string `json:"since,omitempty"`
}

type FillSyncResponse

type FillSyncResponse struct {
	Items  []FillSyncItem `json:"items"`
	Cursor string         `json:"cursor"`
}

type FillTOTPEnrollRequest

type FillTOTPEnrollRequest struct {
	UUID     string `json:"uuid"`
	TOTPSeed string `json:"totp_seed"`
}

type FillTOTPEnrollResponse

type FillTOTPEnrollResponse struct {
	UUID    string `json:"uuid"`
	HasTOTP bool   `json:"has_totp"`
}

type FillTOTPRequest

type FillTOTPRequest struct {
	UUID string `json:"uuid"`
}

type FillTOTPResponse

type FillTOTPResponse struct {
	TOTP string `json:"totp"`
}

type GrantView

type GrantView struct {
	ID          string     `json:"id"`
	OrgID       string     `json:"org_id"`
	AgentID     string     `json:"agent_id"`
	SubjectKind string     `json:"subject_kind"`
	ItemID      string     `json:"item_id"`
	Level       string     `json:"level"`
	ExpiresAt   *time.Time `json:"expires_at,omitempty"`
}

type GrantsResponse

type GrantsResponse struct {
	Grants []GrantView `json:"grants"`
}

type GroupMembersResponse

type GroupMembersResponse struct {
	Members []protocol.GroupMember `json:"members"`
}

type GroupsResponse

type GroupsResponse struct {
	Groups []protocol.Group `json:"groups"`
}

type IdentityFields

type IdentityFields struct {
	GivenName  string `json:"given_name,omitempty"`
	FamilyName string `json:"family_name,omitempty"`
	Address    string `json:"address,omitempty"`
	City       string `json:"city,omitempty"`
	Region     string `json:"region,omitempty"`
	Postal     string `json:"postal,omitempty"`
	Country    string `json:"country,omitempty"`
	Phone      string `json:"phone,omitempty"`
	Email      string `json:"email,omitempty"`
}

type ImportResponse

type ImportResponse struct {
	Names []string `json:"names"`
	Count int      `json:"count"`
}

type InviteRequest

type InviteRequest struct {
	Email string `json:"email"`
}

type InviteResponse

type InviteResponse struct {
	IdentityID  string `json:"identity_id"`
	Emailed     bool   `json:"emailed"`
	RecoveryURL string `json:"recovery_url,omitempty"`
}

type ItemsResponse

type ItemsResponse struct {
	Items []protocol.Item `json:"items"`
}

type ProvisionResponse

type ProvisionResponse struct {
	Subject string `json:"subject"`
	OrgID   string `json:"org_id"`
}

type RequestView

type RequestView struct {
	ID         string                 `json:"id"`
	AgentID    string                 `json:"agent_id"`
	ItemID     string                 `json:"item_id"`
	GrantID    string                 `json:"grant_id"`
	Action     protocol.ActionKind    `json:"action"`
	Status     protocol.RequestStatus `json:"status"`
	CreatedAt  time.Time              `json:"created_at"`
	ExpiresAt  time.Time              `json:"expires_at"`
	ResolvedAt *time.Time             `json:"resolved_at,omitempty"`
	ResolvedBy string                 `json:"resolved_by,omitempty"`
	ApprovalID string                 `json:"approval_id,omitempty"`
}

type RequestsResponse

type RequestsResponse struct {
	Requests []RequestView `json:"requests"`
}

type RotateItemRequest

type RotateItemRequest struct {
	ManagementItem string `json:"management_item,omitempty"`
	Interval       string `json:"interval,omitempty"`
	Secret         string `json:"secret,omitempty"`
}

type RotateProvidersResponse

type RotateProvidersResponse struct {
	ZeroTouchHosts []string `json:"zero_touch_hosts"`
	Assisted       bool     `json:"assisted"`
}

type Server

type Server struct {
	App      *app.App
	Identity func(ctx context.Context, token string) (protocol.Principal, error)
	// BillingSecret verifies Vortex-Signature on the billing webhook.
	// Empty disables the endpoint (404).
	BillingSecret string
	// BillingUpgradeURL is where capped owners are sent to subscribe —
	// the Vortex checkout/portal link once VOR-577 lands. Empty omits it.
	BillingUpgradeURL string
}

func (*Server) Mount

func (s *Server) Mount(mux *http.ServeMux)

type SessionsResponse

type SessionsResponse struct {
	Sessions []protocol.Session `json:"sessions"`
}

type UpdateItemRequest

type UpdateItemRequest struct {
	URI    string   `json:"uri,omitempty"`
	URIs   []string `json:"uris,omitempty"`
	Tags   []string `json:"tags,omitempty"`
	Login  string   `json:"login,omitempty"`
	Secret string   `json:"secret,omitempty"`
}

type UseRequest

type UseRequest struct {
	Item    string            `json:"item"`
	URL     string            `json:"url"`
	Method  string            `json:"method,omitempty"`
	Headers map[string]string `json:"headers,omitempty"`
	Body    string            `json:"body,omitempty"`
	BodyB64 string            `json:"body_b64,omitempty"`
}

type UseResponse

type UseResponse struct {
	Decision         protocol.Decision `json:"decision"`
	Reason           string            `json:"reason,omitempty"`
	ApprovalID       string            `json:"approval_id,omitempty"`
	RequestID        string            `json:"request_id,omitempty"`
	RequestExpiresAt *time.Time        `json:"request_expires_at,omitempty"`
	Status           int               `json:"status,omitempty"`
	Headers          http.Header       `json:"headers,omitempty"`
	Body             string            `json:"body,omitempty"`
	BodyB64          string            `json:"body_b64,omitempty"`
}

type VerifyIssuerRequest

type VerifyIssuerRequest struct {
	Issuer string `json:"issuer"`
}

type VerifyIssuerResponse

type VerifyIssuerResponse struct {
	Code    string `json:"code"`
	Issuer  string `json:"issuer"`
	Message string `json:"message"`
}

type VerifyItemResponse

type VerifyItemResponse struct {
	Item     string `json:"item"`
	Verified bool   `json:"verified"`
	Mode     string `json:"mode"`
}

type WIFItemFields

type WIFItemFields struct {
	TokenURL          string `json:"token_url"`
	AssertionTokenURL string `json:"assertion_token_url"`
	AssertionClientID string `json:"assertion_client_id"`
	AssertionSecret   string `json:"assertion_secret"`
	AssertionAudience string `json:"assertion_audience,omitempty"`
	FederationRuleID  string `json:"federation_rule_id"`
	OrganizationID    string `json:"organization_id,omitempty"`
	ServiceAccountID  string `json:"service_account_id,omitempty"`
	WorkspaceID       string `json:"workspace_id,omitempty"`
}

type WorkloadView

type WorkloadView struct {
	AgentID  string              `json:"agent_id"`
	Issuer   string              `json:"issuer"`
	Subject  string              `json:"subject"`
	Audience string              `json:"audience"`
	Claims   map[string][]string `json:"claims,omitempty"`
}

type WorkloadsResponse

type WorkloadsResponse struct {
	Workloads []WorkloadView `json:"workloads"`
}

Jump to

Keyboard shortcuts

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