Documentation
¶
Overview ¶
Package credentialwire defines the credential wire vocabulary and admission limits. It has no dependency on a transport, generated messages, or the public SDK.
Index ¶
- Constants
- func ValidDeclaredTypeID(id string) bool
- func ValidDelivery(mode string) bool
- func ValidFailureCode(code string) bool
- func ValidFeature(feature string) bool
- func ValidFieldName(name string) bool
- func ValidIssuer(name string) bool
- func ValidPluginID(id string) bool
- func ValidPromptKind(kind string) bool
- func ValidRevocation(class string) bool
- func ValidSlot(name string) bool
- func ValidText(value string) bool
- func ValidTypeID(id string) bool
Constants ¶
const ( // Namespace identifies the descriptor package subject to credential admission. Namespace = "omniview.sdk.credential.v1" // Version identifies the exact wire cohort; equal unsupported versions cannot negotiate. Version uint32 = 1 // MaxFrameBytes bounds the encoded body before decoding. Sixteen full 64 KiB // values fill 1 MiB before keys or framing, independent of the field count cap. MaxFrameBytes = 1 << 20 // MaxMaterialBytes admits the measured 19,640-byte RSA-4096 PEM chain or // 18,709-byte signed OpenSSH certificate intact; each private key is a separate field. MaxMaterialBytes = 64 << 10 // MaxMaterialFields caps the number of separately named values in a credential. MaxMaterialFields = 32 // MaxTypes bounds schema declarations admitted from one inventory. MaxTypes = 64 // MaxIssuers bounds issuer declarations admitted from one inventory. MaxIssuers = 64 // MaxSlots limits the number of distinct requirements in one slot list. MaxSlots = 32 // MaxSources limits the number of scoped references a single operation can attach. MaxSources = 32 // MaxCandidates keeps a discovery pull bounded even for metadata-only candidates. MaxCandidates = 128 // MaxClaims caps the number of target assertions that require inspection. MaxClaims = 32 // MaxParentLeases bounds the direct dependencies recorded for one issued lease. MaxParentLeases = 16 // MaxScopeEntries bounds the reserved scope list without enabling its use. MaxScopeEntries = 32 // MaxPrincipalChain bounds the reserved delegation chain without enabling its use. MaxPrincipalChain = 8 // MaxIDBytes bounds ordinary wire identifiers, including local issuer and slot names. MaxIDBytes = 128 // MaxPluginIDBytes admits a full 255-byte filesystem component. State uses the // same component grammar but does not itself impose a wire length limit. MaxPluginIDBytes = 255 // MaxTypeIDBytes bounds the complete namespace.name/vN. A 255-byte plugin ID // and 128-byte local name still leave 126 decimal version digits after punctuation. MaxTypeIDBytes = 512 // MaxConnectionIDBytes matches native metadata. Existing provider-defined // connection IDs (such as a 143-byte EKS context) must not be truncated. MaxConnectionIDBytes = identity.MaxConnectionIDBytes // MaxLabelBytes keeps a metadata label small enough for bounded presentation. MaxLabelBytes = 256 // MaxClaimBytes prevents one target assertion from carrying a bulk value. MaxClaimBytes = 512 // MaxPendingBytes limits the continuation data the host may retain for a pending operation. MaxPendingBytes = 4 << 10 // MaxPrivateStateBytes limits sealed state returned to the issuing plugin. MaxPrivateStateBytes = 16 << 10 // MaxPromptAnswerBytes keeps protected answers at the original 16 KiB limit; // accepting larger certificates does not expand the prompt channel. MaxPromptAnswerBytes = 16 << 10 // MaxImportBytes admits the measured 204,549-byte eight-context inline kubeconfig // as a document, not a material field. Import larger configurations by context. MaxImportBytes = 512 << 10 // MaxHandleBytes keeps ordinary opaque lease and source references bounded. MaxHandleBytes = 512 // MaxURLBytes limits each proposed destination before destination policy is applied. MaxURLBytes = 2048 // MaxFeatures bounds work per advertisement, including names not known to this cohort. MaxFeatures = 32 // MaxDepth bounds the admission stack for nested messages. MaxDepth = 8 // MaxFrameFields bounds work for many tiny fields across an entire frame. MaxFrameFields = 16384 // MaxFrameNodes bounds the number of message nodes visited across an entire frame. MaxFrameNodes = 4096 // MaxImportDrafts bounds each collection of proposals in one import preview. MaxImportDrafts = 32 // MaxPromptKinds is the number of distinct v1 interaction variants. MaxPromptKinds = 4 )
const ( Bearer = "core.bearer/v1" // #nosec G101 -- Public schema ID, not a credential value. Basic = "core.basic/v1" X509 = "core.x509/v1" SSHKey = "core.ssh-key/v1" SSHCert = "core.ssh-cert/v1" OAuthTokenSet = "core.oauth-token-set/v1" // #nosec G101 -- Public schema ID, not a credential value. Opaque = "core.opaque/v1" TTLBound = "ttl-bound" Explicit = "explicit" Verified = "verified" DeviceCode = "device-code" OpenURL = "open-url" FormMFA = "form-mfa" ApprovalPending = "approval-pending" Active = "active" Revoked = "revoked" Unknown = "unknown" CredentialRequired = "CREDENTIAL_REQUIRED" // #nosec G101 -- Public status classification. ReauthenticationRequired = "REAUTHENTICATION_REQUIRED" AccessRequired = "ACCESS_REQUIRED" )
V1 names shared by raw admission and native credential declarations.
Variables ¶
This section is empty.
Functions ¶
func ValidDeclaredTypeID ¶
ValidDeclaredTypeID checks syntax, not ownership. The last dot separates the full installed plugin ID from the slot-style local name. Only the exact core namespace is reserved. N is positive decimal with no leading zero; its only size limit is the byte budget for the entire ID.
func ValidDelivery ¶
ValidDelivery requires explicit material delivery in v1. The injected and identity modes are reserved, not fallbacks for a missing or unknown mode.
func ValidFailureCode ¶
ValidFailureCode admits only reviewed codes for a credential status detail.
func ValidFeature ¶
ValidFeature admits the syntax credential.<slot-name>.vN, with a positive decimal N and no leading zero. Valid syntax does not imply a known feature.
func ValidFieldName ¶
ValidFieldName uses slot-name syntax, also permitting an interior underscore as a separator (as in private_key). Separators cannot be adjacent.
func ValidIssuer ¶
ValidIssuer accepts a local issuer name with the same grammar as a slot. The plugin namespace is a separate field on issuer references.
func ValidPluginID ¶
ValidPluginID admits the installed state-component grammar within the wire byte limit. It does not look up, normalize, or establish ownership of an ID.
func ValidPromptKind ¶
ValidPromptKind admits only a v1 interaction declaration, never a grant to prompt.
func ValidRevocation ¶
ValidRevocation admits only the three defined revocation assurance classes.
func ValidTypeID ¶
ValidTypeID accepts namespace.name/vN references. Only the seven canonical v1 IDs below exist in the reserved core namespace; none can be declared.
Types ¶
This section is empty.