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 ¶
- Variables
- func CORS(next http.Handler) http.Handler
- func Mount(mux *http.ServeMux, a *app.App)
- type AddGroupMemberRequest
- type AgentsResponse
- type AuditFeedResponse
- type BillingView
- type BindWorkloadRequest
- type CardFields
- type CreateAgentRequest
- type CreateGrantRequest
- type CreateGroupRequest
- type CreateItemRequest
- type CreateSessionRequest
- type CreateSessionResponse
- type EventsResponse
- type FillEvent
- type FillEventsRequest
- type FillLogin
- type FillLoginsRequest
- type FillLoginsResponse
- type FillPasskeysRequest
- type FillPasskeysResponse
- type FillRequestIn
- type FillRequestOut
- type FillSyncItem
- type FillSyncRequest
- type FillSyncResponse
- type FillTOTPEnrollRequest
- type FillTOTPEnrollResponse
- type FillTOTPRequest
- type FillTOTPResponse
- type GrantView
- type GrantsResponse
- type GroupMembersResponse
- type GroupsResponse
- type IdentityFields
- type ImportResponse
- type InviteRequest
- type InviteResponse
- type ItemsResponse
- type ProvisionResponse
- type RequestView
- type RequestsResponse
- type RotateItemRequest
- type RotateProvidersResponse
- type Server
- type SessionsResponse
- type UpdateItemRequest
- type UseRequest
- type UseResponse
- type VerifyIssuerRequest
- type VerifyIssuerResponse
- type VerifyItemResponse
- type WIFItemFields
- type WorkloadView
- type WorkloadsResponse
Constants ¶
This section is empty.
Variables ¶
var Spec []byte
Spec is the OpenAPI contract. SDKs, Blume /reference, and GET /openapi.json are this file. Do not handwrite clients.
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 ¶
Types ¶
type AddGroupMemberRequest ¶
type AgentsResponse ¶
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 CardFields ¶
type CreateAgentRequest ¶
type CreateAgentRequest struct {
Name string `json:"name"`
}
type CreateGrantRequest ¶
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 CreateSessionResponse ¶
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 FillLoginsRequest ¶
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 ¶
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 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 FillTOTPEnrollResponse ¶
type FillTOTPRequest ¶
type FillTOTPRequest struct {
UUID string `json:"uuid"`
}
type FillTOTPResponse ¶
type FillTOTPResponse struct {
TOTP string `json:"totp"`
}
type GrantsResponse ¶
type GrantsResponse struct {
Grants []GrantView `json:"grants"`
}
type GroupMembersResponse ¶
type GroupMembersResponse struct {
Members []protocol.GroupMember `json:"members"`
}
type GroupsResponse ¶
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 InviteRequest ¶
type InviteRequest struct {
Email string `json:"email"`
}
type InviteResponse ¶
type ItemsResponse ¶
type ProvisionResponse ¶
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 RotateProvidersResponse ¶
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
}
type SessionsResponse ¶
type UpdateItemRequest ¶
type UseRequest ¶
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 VerifyItemResponse ¶
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 WorkloadsResponse ¶
type WorkloadsResponse struct {
Workloads []WorkloadView `json:"workloads"`
}