pub struct FunctionConfig {Show 16 fields
pub imports: Vec<String>,
pub limits: Option<HandlerLimits>,
pub env: BTreeMap<String, String>,
pub secrets: BTreeMap<String, String>,
pub runtime: Runtime,
pub quota: FunctionQuota,
pub webhook: Option<WebhookConfig>,
pub invoke_targets: Vec<String>,
pub stats_topics: Vec<String>,
pub tenant_secret_names: Vec<String>,
pub upload_containers: Vec<String>,
pub blobstore_containers: Vec<String>,
pub egress_allowlist: Vec<String>,
pub blob_upload_site: Option<String>,
pub tenancy: Option<Tenancy>,
pub token_claims: Option<HandlerGraphqlTokenClaims>,
}Expand description
Fields§
§imports: Vec<String>Requested host capabilities (interface names).
limits: Option<HandlerLimits>Optional resource limits (mem / timeout / fuel).
env: BTreeMap<String, String>Static, non-secret environment.
secrets: BTreeMap<String, String>Env-var name → secret reference (ENV_VAR → HOST_ENV), resolved
server-side from the serve env at instantiation; the value is a
reference, never stored in the manifest or the control-plane store
(mirrors a site handler’s [handlers].secrets).
runtime: RuntimeExecution substrate (default wasm).
quota: FunctionQuotaUsage quota (FA-4). Absent / all-None ⇒ unlimited.
webhook: Option<WebhookConfig>Signed inbound-webhook ingress (FA-5). Absent ⇒ no webhook endpoint.
invoke_targets: Vec<String>Function-to-function invoke allowlist (FI): the target names this function
may call through the invoke capability. Each entry may use * wildcards
(* = any sibling, img-* = a family, resize = one literal). Deny by
default: empty ⇒ the function cannot invoke anything, even if it imports
invoke. Only consulted when imports contains invoke.
stats_topics: Vec<String>Declared bus: stats-topic templates for the read-only messaging-stats capability: each a
bus:-relative topic with an optional literal {tenant} placeholder the HOST fills with this
invocation’s resolved tenant (e.g. sync/{tenant}/import). A guest’s messaging-stats call for
a bus: topic must name one of these verbatim; the host substitutes the tenant, so the guest
can never read another tenant’s bus stats. Deny by default: empty ⇒ no bus stats readable. Only
consulted when imports contains messaging-stats.
tenant_secret_names: Vec<String>Per-component name allowlist for the per-tenant sealed-secret capability
(boatramp:handlers/tenant-secrets, task #493): the secret names this function may address
for its resolved tenant. Least-privilege: empty ⇒ deny-all. A name not in the list is
access-denied; the resolved tenant is always host-supplied. Only consulted when imports
contains a tenant-secrets:* right.
upload_containers: Vec<String>Per-component container allowlist for the guest blob-upload mint capability
(boatramp:handlers/blob-upload, S3 external ingress): the blob containers this function may
mint an upload credential for. Least-privilege: empty ⇒ deny-all. A container not in the
list is access-denied; the project is always host-forced from the resolved invocation scope,
and the site is host-forced from blob_upload_site. Only consulted
when imports contains a blob-upload:* right.
blobstore_containers: Vec<String>Per-component container allowlist for the plain wasi:blobstore capability (host-enforced
tenant confinement; same contract as crate::config::HandlerConfig::blobstore_containers):
the blob containers this function may open, {tenant}-templated against its host-resolved OWN
tenant. SEPARATE from upload_containers — no inheritance/fallback.
Empty on a multi-tenant function ⇒ deny-all (fail-closed); empty single-tenant ⇒ permissive.
Only consulted when imports contains wasi:blobstore.
egress_allowlist: Vec<String>Per-component outbound-TCP allowlist for the gated wasi:sockets capability (same contract
as crate::config::HandlerConfig::egress_allowlist): the host:port / ip:port /
CIDR:port targets this function may connect to. Empty ⇒ deny-all. A standalone
top-level function opts into outbound TCP by naming targets here; the engine’s
socket_addr_check then enforces it connect-only + SSRF-floored, and ONLY when the node
posture allow_guest_tcp_egress is on. Only consulted when imports contains wasi:sockets.
blob_upload_site: Option<String>The site a standalone top-level function mints blob-upload credentials for
(boatramp:handlers/blob-upload, S3 external ingress). A site handler mints for its own
host-routed site, but a standalone function has no single resolved site — so it names one here,
in its config (host-forced, never guest-supplied: the WIT surface still has no project/site
parameter). At bind time the host validates the named site actually exists in the function’s
(host-forced) project; the credential then lands objects at
hblob/{project-qualified-site}/{container}/{key} — the exact prefix the guest compat::blob
read path serves, so nothing new is invented. Absent, or naming a site that does not exist in
the project ⇒ fail-closed (no-resolved-site, the binding is not attached). A guest can
never override it. Only consulted when imports contains a blob-upload:* right.
tenancy: Option<Tenancy>In-site tenancy decision for this function’s sql/orm access (Dimension 0). Absent ⇒
undeclared (refused under the multi-tenant posture, treated as Disabled — plain
queries — under single-tenant/dev). Scoped opts into host-injected row scoping. Parsed via
the crate::tenancy::de_opt_tenancy bridge so it reads from RON (project.cfg) as well as
the stored JSON.
token_claims: Option<HandlerGraphqlTokenClaims>JWKS/issuer config verifying the app bearer for a crate::tenancy::TenantSource::Token
tenant source when this function is invoked over HTTP (the function analogue of a site’s
[handlers.graphql.data].claims_from_token). Absent ⇒ the token source can’t verify, so it
resolves no value (fail-closed); the domain/none sources don’t need it.
Trait Implementations§
Source§impl Clone for FunctionConfig
impl Clone for FunctionConfig
Source§impl Debug for FunctionConfig
impl Debug for FunctionConfig
Source§impl Default for FunctionConfig
impl Default for FunctionConfig
Source§impl<'de> Deserialize<'de> for FunctionConfigwhere
FunctionConfig: Default,
impl<'de> Deserialize<'de> for FunctionConfigwhere
FunctionConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FunctionConfig
Source§impl PartialEq for FunctionConfig
impl PartialEq for FunctionConfig
Source§impl Serialize for FunctionConfig
impl Serialize for FunctionConfig
impl StructuralPartialEq for FunctionConfig
Auto Trait Implementations§
impl Freeze for FunctionConfig
impl RefUnwindSafe for FunctionConfig
impl Send for FunctionConfig
impl Sync for FunctionConfig
impl Unpin for FunctionConfig
impl UnsafeUnpin for FunctionConfig
impl UnwindSafe for FunctionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.