This document defines the security boundary for Apache Reqsign. The
documentation is for maintainers, security reporters, downstream users, Apache
OpenDAL integrators, direct reqsign users, and automated security scanners
that need to decide whether a report describes a Reqsign vulnerability or a
responsibility of the embedding application, a cloud provider, or a deployment.
The canonical disclosure process is documented in SECURITY.md.
Reports that may affect reqsign security should be sent privately to
private@reqsign.apache.org before public disclosure. If you are unsure where
to send the report, use security@apache.org.
Reqsign is an in-process Rust library for signing HTTP API requests. Reqsign provides runtime-agnostic core traits, pluggable context adapters, credential-provider chains, and service-specific signing implementations for cloud providers.
Reqsign is not an identity provider, authorization service, key-management system, TLS stack, network sandbox, process sandbox, or multi-tenant broker. Reqsign does not decide whether a caller is allowed to access a resource but signs the HTTP request that a trusted caller gives it, using credentials that the trusted caller configured or allowed reqsign to discover.
The purpose of this document is to help maintainers triage security reports by answering four questions:
- What is Reqsign's security boundary?
- What security properties does Reqsign provide?
- What security responsibilities belong to OpenDAL, other embedding applications, configured credential sources, or cloud providers?
- Which disposition should be used for a report: Reqsign vulnerability, hardening request, user misuse, or out-of-scope deployment issue?
The most important premises are:
Reqsign trusts its caller to construct the request, choose the endpoint, choose service and region values, and configure credential-provider sources.
Reqsign must still preserve its own library boundary: sign according to the selected service contract, isolate cached credentials, avoid credential leaks, respect explicit provider-chain configuration, and handle inputs without memory-safety violations.
OpenDAL is Reqsign's primary integration and can use Reqsign to sign requests for custom keys and cloud-provider authentication. Other applications can also embed Reqsign directly. In every embedding, the host application remains responsible for its own user authentication, authorization, request construction, endpoint selection, and user-facing API behavior. OpenDAL-specific storage semantics, operator authorization, path policy, and backend trust decisions are covered by OpenDAL's own security model. Reqsign is responsible for the request-signing and credential-loading behavior described here.
A Reqsign deployment has these participants.
| Participant | Boundary summary |
|---|---|
| Host application | Trusted caller outside Reqsign's security boundary. |
| Reqsign | In-process signing library and the subject of this model. |
| Credential source | External source selected by the caller or documented Reqsign behavior. |
| Cloud provider or API service | External verifier and authorizer. |
| End user of the host application | Outside Reqsign's direct model. |
| Network attacker | Outside by default, except for Reqsign-owned leaks or transport weakening. |
- Host application: creates HTTP requests, configures Reqsign, selects service and region values, chooses credential sources, and decides which end-user input may reach Reqsign. Apache OpenDAL is the primary known host application, but the same boundary applies to other applications that embed Reqsign.
- Reqsign: signs HTTP requests and loads or receives signing credentials through its public APIs. This system model treats Reqsign as one library boundary.
- Credential sources: include configured local files, process environment, external commands, metadata endpoints, OAuth/token endpoints, and custom caller-provided credential sources.
- Cloud provider or API service: verifies the signed request and authorizes the resulting operation. Reqsign trusts provider-side authentication, authorization, token issuance, and response semantics.
- End user of the host application: must be authenticated, authorized, and sanitized by the host application before input is passed to Reqsign.
- Network attacker: is out of scope unless the report shows Reqsign weakens the configured transport or leaks secrets through Reqsign-owned behavior. TLS certificate validation, CA bundles, proxy policy, and socket behavior are delegated to the configured HTTP client and host environment.
Reqsign does not define a principal model. A configured Reqsign signing setup signs with the authority of its configured credentials. Every request signed by that setup uses the same Reqsign-level authority until the caller changes the credential or signing configuration.
A typical interaction looks like this:
Credential source <----> Reqsign <----> Host application <----> End user
|
v
Signed HTTP request
|
v
Cloud provider or API service
Host application policy, including OpenDAL storage semantics when Reqsign is used through OpenDAL, cloud provider enforcement, and deployment controls are separate boundaries.
Reqsign protects:
- signing credentials, temporary tokens, private keys, shared keys, bearer tokens, and reusable derived signing material;
- the request fields that the selected signing contract is expected to cover, including method, scheme, authority, path, query, signed headers, payload hash, expiry, service, region, and account values;
- explicit caller configuration for credential sources, signing method, service, region, expiry, and context capabilities;
- credential isolation between independent signing setups, unless the caller explicitly shares a signer, provider, or context;
- redaction of secret values in Reqsign-owned errors, debug output, logs, test helpers, and examples.
Reqsign's security boundary is the public library boundary plus the internal state that Reqsign owns behind that boundary.
The following properties are in scope for Reqsign security.
Reqsign must handle inputs accepted by public APIs without memory-safety violations, data races, panics across FFI-like boundaries, or inconsistent internal state.
Examples:
Signer::signmust not use a poisoned, stale, or unrelated credential in a way that violates its documented cache behavior.SigningRequest::buildandSigningRequest::applymust preserve request method, scheme, authority, path, query, and headers according to their API contract.- Request parsing, canonicalization, percent decoding, header normalization, JSON parsing, XML parsing, JWT construction, and credential-file parsing must not create memory unsafety or uncontrolled panics reachable through public APIs.
MaybeSendsupport must not introduce unsoundness in supported non-WASM andwasm32-unknown-unknownbuilds.
Reqsign does not decide whether the host application's end user is allowed to sign a request. That policy belongs to the host application. Once the trusted caller passes a request into Reqsign, Reqsign must not sign a different request than the request implied by the selected signing implementation.
Reqsign must not leak credentials between independent signers, credential providers, services, or contexts inside the same process.
Expected behavior:
- A request signed through
SignerB must not use credentials loaded by independentSignerA unless the caller explicitly shares a provider, context, or signer. - Replacing a credential provider with
with_credential_providermust clear the cached credential for that signer. - A provider chain must not fall back to disabled or removed provider slots
during
build(). - Default credential-provider builders must follow
docs/default-credential-provider-api.md:
explicit slot participation, positive
slot(provider)methods, removalno_slot()methods, and no fallback-based re-enabling of removed slots. - Temporary credentials must not be considered valid for signing or presigning
past the validity checks implemented by their
SigningCredential.
Sharing a Signer, provider, or Context across tenants, threads, async tasks,
or processes is a caller decision. It is in scope only if Reqsign violates its
own documented isolation or cache behavior.
AWS named SSO sessions retain refreshed access tokens and rotated refresh
material in memory. A provider and its clones share this state and serialize
refreshes for the same session; independently constructed providers do not
coordinate refreshes. Session state is keyed by the cache path, configuration
path, session name, start URL, and region. The AWS CLI cache is read through
Context and is never written. When the in-memory token expires, a newer disk
token may replace it. Recreating the provider discards its in-memory state;
after a process restart, the disk registration and refresh token must still be
usable. Legacy inline SSO configurations do not refresh, and Reqsign never
starts interactive login.
OAuth 2.0 refresh grants for Dropbox and OneDrive follow the same in-memory
model. Each RefreshTokenGrant retains only its latest refresh token; clones
share that state and serialize the complete exchange from reading the old token
through committing the new one. Independently constructed grants and processes
do not coordinate, and Reqsign never writes refresh tokens to disk. Refreshed
access tokens are cached only by Signer, not by the shared grant. If a
provider rotates a refresh token but its response is lost, Reqsign cannot
recover the server-side token; the caller must supply a new one. The shared
grant sends only the RFC 6749 form fields to its configured HTTPS token
endpoint, does not send HTTP Basic authentication at the same time, and does
not retry or discover another endpoint. The service crate rejects a refreshed
credential whose required expiration is missing or already past instead of
treating it as permanent.
Aliyun Drive refresh providers retain only the latest rotated refresh token in
memory. A provider and its clones share this state and serialize exchanges;
independently constructed providers do not coordinate. The exchange is sent only
to the provider's configured HTTPS token endpoint, which defaults to the
first-party endpoint, and tokens are never persisted. A successful, parseable
token response commits a non-empty rotated refresh token even when the
accompanying access token or expiry is unusable, because Aliyun Drive makes the
previous refresh token single-use. Access-token caching and refresh-on-expiry
remain in Signer. Reqsign exposes no refresh-token getter or persistence
callback. After a successful exchange, restarting with the initially configured
token may require a fresh authorized grant, or an application that manages and
persists its own exchange and supplies an access token.
Baidu Netdisk sends the client secret and single-use refresh token in the query of its HTTPS token endpoint. The host must serialize each authorization's exchanges and persist each replacement, including when the access credential is unusable. Loss of the response before persistence may require reauthorization.
OneDrive follows Microsoft's client types: a public-client exchange sends no client secret, while a confidential client sends its secret as an RFC 6749 form field. Microsoft documents no environment variable or shared configuration file for Microsoft Graph user tokens, and MSAL token caches are library-specific, so Reqsign exports no OneDrive default provider: it does not read MSAL token caches, run the Azure CLI, or discover a token endpoint. The token endpoint is the documented Microsoft Entra v2.0 endpoint for an explicit tenant, or an explicitly configured HTTPS endpoint such as a national cloud, and the caller owns that trust decision.
Reqsign must avoid exposing credentials through Debug output, error chains,
log lines, tracing spans, metrics labels, panic messages, and test helpers that
are part of shipped library behavior.
Secrets include, at minimum:
- access keys, secret keys, shared keys, private keys, signing keys, bearer tokens, session tokens, OAuth refresh tokens, OIDC tokens, metadata-service authorization tokens, account keys, tenant secrets, and serialized service account JSON;
- derived signing material that can be reused to authenticate requests;
- presigned URLs or query strings when the signature grants meaningful access.
Expected behavior:
- Credential
Debugimplementations redact secret fields. - Errors may identify the provider, slot, file path, status code, or credential type, but must not include secret values.
- Failed parsing of credential files, command output, token responses, or metadata responses must not include full secret-bearing payloads.
- Tests and examples should not encourage printing live credentials or presigned URLs in normal logs.
Request paths, endpoint hostnames, regions, account names, and provider names can be sensitive in some deployments. Reqsign does not treat them as credentials by default; callers that need stronger privacy must choose their logging and tracing sinks accordingly.
Reqsign's credential providers must use only the credential sources documented or explicitly configured for that provider chain.
Examples:
- A
Context::new()has no-op file, HTTP, environment, and command adapters. It must not silently read the process environment, local files, metadata endpoints, or external commands. - The facade crate's
default_context()may use OS environment variables, file reads, HTTP requests, and command execution through its default adapters. Those accesses must match the documented default providers for the selected service. no_env(),no_profile(),no_imds(),no_process(),no_web_identity(),no_oidc(),no_vm_metadata(), and similar removal methods must prevent the corresponding ambient source from participating.- A profile, config, or token-file provider must not read a path other than the configured path or the documented default path.
- A process provider must execute only the configured command and arguments. It must not invoke a shell implicitly unless that is explicitly part of the documented API.
- A metadata or token provider must send requests only to the endpoint implied by the provider contract or explicit caller configuration.
The AWS default credential provider propagates SSO errors before trying later
process, web-identity, ECS, or IMDS providers. An SSO failure must not silently
select a different identity. This policy belongs to the AWS default provider;
caller-constructed ProvideCredentialChain values retain their own error
policy. Disabling the SSO slot prevents it from participating.
AWS providers added with push_front have first priority. When the profile name
comes from AWS_PROFILE or the default name, available environment credentials
take precedence without examining the graph. When the profile slot explicitly
names a readable role chain, Reqsign validates the graph before choosing the
credential source. Cycles, dangling references, and invalid source declarations
fail even when environment credentials are available. A valid chain with
credential_source = Environment uses those credentials as its source and
returns the assumed identity. Other valid graphs keep the environment-first order.
A role chain selected for credential acquisition follows its declared source. Static credentials, SSO, and a credential process can supply credentials from a source profile. Acquisition errors and disabled required slots fail the selected chain. Signed STS calls in a role chain use the regional endpoint for the selected signing region.
A profile can specify a role and a web identity token file through the web identity slot. Role settings and credential process commands come from the merged config and credentials files. The web identity provider keeps the profile's role and token file paired when it uses profile settings. Both slots honor explicit provider settings. A web identity role selected by the profile slot fails on a disabled web identity slot or an error loading or exchanging the token.
AssumeRoleCredentialProvider and AssumeRoleWithWebIdentityCredentialProvider
send STS requests to the endpoint configured on the provider, including any path
prefix it carries; otherwise to the first of AWS_ENDPOINT_URL_STS,
AWS_ENDPOINT_URL, the selected profile's sts service endpoint_url, and the
profile's endpoint_url, unless
AWS_IGNORE_CONFIGURED_ENDPOINT_URLS or the profile's
ignore_configured_endpoint_urls is true; and otherwise to the regional or
partition default. Endpoint settings in the environment and the shared config
file are trusted caller configuration, as in the AWS SDKs. An http:// endpoint
carries the web identity token or signed request, and the returned temporary
credentials, in cleartext; choosing one is the caller's responsibility.
AWS shared configuration and region discovery are separate from credential
acquisition. Loading SharedConfig does not execute credential processes or
contact the network. IMDSv2 region fallback requires explicit opt-in and applies
a deadline to the complete metadata-token and region exchange. Exposed endpoint
settings remain the caller's responsibility to interpret.
Google's well-known ADC provider honors the CLOUDSDK_CONFIG directory from
Context. A missing file yields no credential. Other read or parsing errors
are returned to direct callers. The Google default provider chain logs provider
errors and proceeds to the next slot.
Google ADC impersonation files use the canonical OAuth token endpoint for
authorized-user and service-account source exchanges. The trusted credential
file supplies the target IAM Credentials URL. An external-account source uses
its configured endpoints and subject token source. OAuth client authentication
from the file is sent to its configured STS endpoint. Executable sources
require GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES=1 in the Context environment
before reading an executable's cached output or running the command.
GitHub credential discovery reads GH_TOKEN before GITHUB_TOKEN. When the
context has a command executor, it resolves the active stored account with
gh config get user --host github.com and reads that account's token with
gh auth token --hostname github.com --user <user> --no-refresh through the
configured CommandExecute. The explicit hostname keeps discovery on
GitHub.com regardless of GH_HOST or a local Git remote, and the explicit user
prevents GH_TOKEN or GITHUB_TOKEN in the child process environment from
shadowing the stored credential. Safe stored-token discovery requires GitHub CLI
2.40.0 or newer. --no-refresh keeps discovery read-only on GitHub CLI 2.103.0
and newer; older supported versions do not refresh stored tokens, so the
provider retries without the flag only after the CLI reports that specific flag
as unknown. The default provider does not read GH_ENTERPRISE_TOKEN or
GITHUB_ENTERPRISE_TOKEN, does not run a shell, and does not silently fall
through to another identity when a configured default slot fails. A command
executor that reports command execution as unavailable (no executor
configured, an unsupported target, or a confirmed cannot-spawn program), a
confirmed no-account response (gh config get user exiting with status 1 and
exactly could not find key "user" on stderr with no stdout), and an
explicit no oauth token found response yield no credential from the CLI slot;
any other command execution failure, including a NotFound source inside a
custom adapter's error, any other exit status, and malformed account or token
output fail instead of selecting anonymous access. The command-unavailable
marker permits anonymous fallback only during this account lookup; a
token-stage failure, including unavailability, still fails. Ordinary logins
accept legacy accounts such as A- and
john--doe; current registration rules are not used as a validity check, so
they only need to look like a login: ASCII letters, digits, and hyphens, not
starting with a hyphen, with at least one letter or digit. An enterprise
managed user name appends _ and the three-to-eight character alphanumeric
shortcode to a normalized username that has no leading, trailing, or
consecutive dashes, is at most 39 characters in total, and includes the setup
user's octo_admin form. A caller-supplied
ProvideCredentialChain keeps that chain's documented error policy. Command
output, including stderr, never appears in errors or Debug output. The
explicit anonymous provider is the only supported fallback when no credential
is found; signing with it removes any existing Authorization header, leaves
other headers and the URI unchanged, and is subject to GitHub's unauthenticated
rate limit.
The Cloudflare default credential provider reads only CLOUDFLARE_API_TOKEN
through the context environment. It does not read CLOUDFLARE_API_KEY or
CLOUDFLARE_EMAIL: Cloudflare's global API key authenticates with a different
header pair rather than the bearer token that the KV and D1 endpoints use. The
account, database, and namespace identifiers stay in the caller-built request
URL, so credential discovery never selects a resource. A present but unusable
token, or an invalid prepended provider, fails instead of falling through to
another source. Cloudflare assigns each token its permissions and optional
expiry when the token is created; Reqsign neither reads nor tracks that expiry,
so an expired token fails at the API. The signed Authorization header is
marked sensitive, and forwarding it to a different host is the caller's
responsibility.
The Vercel Blob default provider reads only BLOB_READ_WRITE_TOKEN. It does not
read Vercel OIDC, store, or API endpoint variables: those credentials need store
or operation context in the request. The Vercel Artifacts default provider reads
TURBO_TOKEN, then VERCEL_ARTIFACTS_TOKEN. The team or owner identifiers,
cache key, endpoint, and protocol headers stay in the caller-built request, so
credential discovery never selects a cache scope. Blob and Artifacts credentials
are separate types and environment sources; a token discovered for one service
never authenticates the other. A present but unusable token, or an invalid
prepended provider, fails instead of falling through to another identity. Each
signed Authorization header is marked sensitive, and forwarding it to a
different host is the caller's responsibility.
The Yandex Disk provider reads no environment variable, CLI token store, or
well-known credential file: Yandex documents no automatic token source, and
Reqsign exports no default provider for Yandex Disk. Signing requires an
explicit StaticCredentialProvider or another ProvideCredential. A supplied
token is an opaque value validated as non-empty visible ASCII, and signing
inserts a sensitive Authorization: OAuth header without changing the URI or
any other header. The caller owns the API host, version, resource path, query
parameters, and upload or download URLs. Reqsign does not implement Yandex
OAuth token issuance, refresh, or revocation, and forwarding a signed header to
a different host is the caller's responsibility.
Azure API key authentication uses a caller-supplied key or reads one caller-named variable through the context environment. The key is separate from Azure Storage credential discovery. Signing replaces only the selected header with a sensitive value, preserves the URI, and rejects presigning. The caller selects the endpoint and header, and replaces the signer or its credential provider when the key rotates.
For Azure Entra ID, the caller selects the token resource and API endpoint.
The default credential builder applies an explicit scope to the enabled token
providers and leaves the Storage environment slot under caller control. The
HTTP-based Entra exchanges resolve the authority from the provider or context
environment, falling back to Microsoft's public cloud. A client certificate
assertion uses the selected token endpoint as its audience, and the Azure
Pipelines exchange forwards the OIDC assertion as issued. The explicit Bearer
signer requires a bearer credential and replaces only Authorization with a
sensitive header.
If a trusted caller configures a malicious file path, command, environment implementation, metadata endpoint, HTTP client, or custom provider, using that source is caller responsibility. If Reqsign ignores explicit source removal, mixes sources from another signer, or silently adds a credential source, that is in scope.
Reqsign must construct and apply signatures according to the selected service's signing contract.
Examples:
- AWS SigV4, Azure Storage shared-key signing, Google service-account or token flows, Aliyun OSS, Huawei Cloud OBS, Oracle Cloud, Tencent COS, Volcengine TOS, Vercel Blob, and Vercel Artifacts signers must canonicalize method, path, query parameters, headers, payload hash rules, expiry, date, service, region, account, and provider-specific fields as required by their implemented contract.
- AWS SigV4 and SigV4a support a canonical payload hash supplied by the caller
for each request. An explicit hash must agree with any existing
x-amz-content-sha256header. The caller owns the body and selects whether header authentication generates a missing checksum header. - SigV4 and SigV4a normalize URI paths only when the caller enables it. Normalization applies before percent-encoding the canonical path. Header signing preserves the wire URI, and presigning preserves the wire path and existing query bytes when appending authentication parameters.
- SigV4 and SigV4a include temporary credential tokens in the canonical request
by default. When the caller selects
SessionTokenMode::Exclude, the token remains a sensitive header or a presigned query parameter and the signature does not cover it. Re-signing refreshes it along with the other AWS authentication fields. - S3
aws-chunkedsigning must use the initial request's signature, time, credential scope, and signing key for each signed chunk and trailer. The signing state keeps the derived key private. The caller owns the upload framing, checksum calculation, and retries. - Azure Storage Shared Key header signing for Blob, Queue, and File orders
x-ms-*names using Azure's character weights, normalizes their values, and groups decoded query parameters in the signature input. Table mode signs the generatedx-ms-datein the date field and includes only thecompselector from the query. Both formats use the complete encoded request path and preserve the wire URI and caller headers other thanx-ms-dateandAuthorization. A signed header value that cannot be read as text returnsRequestInvalidbefore any request changes are committed. - Azure Blob SAS generation for path-style endpoints removes the first segment
only after it matches the selected account. The User Delegation key request
and key cache use the same account root on the caller's endpoint. The cache
retains the requested key API version in its identity. The key response's
valid
SignedVersioncan equal or be newer than the request version and is signed asskv. The configured SAS version (sv) selects the signature format. - Azure Service SAS signs the selected storage resource and the version-specific fields, including a stored access policy identifier when supplied. Expiring grants use the signed expiry. Raw SAS generation can leave expiry to the stored policy. Blob Storage and Azure Files response overrides are signed from the decoded values and retain their original encoding on presigned URIs.
- Header-based signing must apply authorization data to headers without unintentionally moving authority to query parameters.
- Query-based signing and presigning must apply expiry and signed query parameters according to the provider's rules and must not leave stale signature material from a previous signing pass.
- Azure Account SAS issuance takes a Shared Key for the configured account and locally signs the caller-selected services, resource types, permissions, and validity window. The signed protocol, IP range, and encryption scope reflect the explicit grant configuration.
- OpenStack Swift TempURL signing must use the configured account or container key, never the Keystone identity token, and must cover the method, expiry, and the object path after one percent-decoding step, matching Swift's decoded request path, while preserving the caller's encoded path and query bytes in the outgoing URI. Absolute expiration signing must use the same caller-supplied decimal Unix seconds in the HMAC input and query, without reading the clock. The resulting URL is secret-bearing authorization material.
- Signing must use the request endpoint, authority, scheme, path, query, and headers selected by the trusted caller and signer implementation.
- A service-specific signer must not send credentials to an unrelated endpoint during signing-time credential refresh or token exchange.
Google Cloud Storage V4 signed URLs accept 1 through 604800 encoded whole
seconds. The signer appends authentication parameters to the original URI and
normalizes headers only in the canonical request. It synthesizes Host when
missing and omits the default port for the URI's scheme. The canonical payload
uses x-goog-content-sha256 if supplied and UNSIGNED-PAYLOAD otherwise. For
IAM signBlob, the OAuth token must cover the signing RPC. The resulting URL
has its own expiration.
Cloud Storage V4 POST policies sign the standard Base64 representation of the
UTF-8 JSON bytes supplied by the caller. The caller selects the policy
conditions, expiration, and multipart upload target. Signed policy fields
carry upload authority and are redacted from Reqsign's Debug output.
Provider-side acceptance or rejection is not by itself the security boundary. A compatibility bug that causes a legitimate request to fail may be a normal bug. It becomes security-relevant when it grants unintended authority, signs a meaningfully different request, exposes secret material, bypasses explicit caller configuration, or violates an in-scope provider contract.
Reqsign is designed to support custom request-signing implementations. OpenDAL is a primary consumer of this capability for custom key signing, and other host applications may provide their own custom signers too. Custom signers and credential providers are trusted code from Reqsign's perspective, but Reqsign's core abstractions must not make custom key signing unsound.
In scope:
- core trait objects must preserve the relationship between a credential type and its matching signer;
Signermust pass the credential selected by its provider to the configured request signer without cross-service or cross-signer substitution;- core request manipulation must not corrupt the request being signed;
- default helpers must not downgrade a custom caller's explicit
Context, credential provider, or request signer.
Out of scope by default:
- a caller-provided
ProvideCredential,SignRequest,FileRead,HttpSend,Env, orCommandExecuteimplementation intentionally leaks or misuses secrets; - a custom signing algorithm chosen by the caller is cryptographically weak;
- a host application, including OpenDAL, authorizes the wrong end user to invoke a custom signer.
Reqsign can read local credential files and execute local credential-helper commands when the caller configures adapters and providers that require those features.
The Azure Storage environment provider extracts Shared Key or SAS credentials
from AZURE_STORAGE_CONNECTION_STRING after checking dedicated credential
variables. The caller supplies the endpoint. The provider ignores endpoint
settings and keeps connection string contents out of its diagnostics.
Azure Storage providers use argument vectors for az account get-access-token
and azd auth token. The context's AZURE_TENANT_ID supplies the Azure CLI
tenant when the caller leaves it unset. The Azure Developer CLI provider is
explicit and requests tokens with --no-prompt. Command output is excluded
from errors for both providers.
In scope:
- Reqsign-owned default path expansion and provider path selection must match documented provider behavior.
- Errors and debug output from local resource access must not leak secret file contents or command output containing credentials.
- Command execution must not add shell interpretation, glob expansion, argument injection, or working-directory changes unless documented.
Out of scope by default:
- host filesystem permissions;
- a caller-configured credential file containing attacker-controlled content;
- a caller-configured credential process that is malicious;
- a host application giving untrusted tenants control over credential-file paths or credential-process commands.
Reqsign providers may use HTTP to retrieve metadata credentials, exchange tokens, refresh OAuth credentials, or call service-specific identity endpoints.
In scope:
- provider HTTP requests must include only the headers and body fields required by the provider contract;
- metadata-service authorization tokens must not be sent to unrelated hosts;
- token responses must be parsed without leaking full secret-bearing bodies in errors;
- explicit provider configuration that disables metadata or token sources must be respected.
Out of scope by default:
- TLS policy, CA bundle configuration, proxy behavior, DNS behavior, redirect policy, and timeout policy of the configured HTTP client;
- a trusted caller choosing an attacker-controlled endpoint;
- a metadata, OAuth, STS, or token service returning malicious or incorrect credentials, unless Reqsign violates parser robustness, credential isolation, or redaction while handling that response.
Koofr's explicit login exchange follows these constraints. The login provider
uses the official endpoint or a caller-configured absolute HTTP(S) endpoint and
rejects userinfo, query strings, fragments, dot segments, backslashes,
whitespace, and control characters before sending. It sends only the email and
application password in the request body and does not read ambient Koofr
credentials. The first-party SDK exchange returns no expiry: a cached token
remains until the caller replaces the Signer or starts a new provider/context
cache, and Koofr rejecting the token does not invalidate that cache. An
explicit http:// endpoint sends the exchange in cleartext; redirect policy
belongs to the configured HTTP client. A non-200 /token response produces
an error with a LoginResponseError source that contains only the HTTP status
code. Exchange diagnostics omit response bodies and headers, free-form server
fields, the endpoint, credentials, and parser and transport sources.
reqsign-core and the supported subset of services are expected to compile for
wasm32-unknown-unknown.
In scope:
- supported WASM builds must not accidentally enable OS environment access, local filesystem access, command execution, or network access through no-op context components;
- WASM-specific implementations must preserve the same credential isolation and redaction properties as native builds.
Out of scope by default:
- browser, worker, or embedding-runtime sandbox policy;
- JavaScript code outside Reqsign that provides custom context adapters;
- web platform credential storage selected by the host application.
The following are not Reqsign vulnerabilities by default.
Reqsign does not authenticate end users, authorize operations, or decide whether end-user input is allowed to become a request URL, header, query parameter, service name, region, credential-source path, command, or endpoint.
Examples:
- A web service lets tenants submit arbitrary URLs and then signs those URLs with the service's cloud credentials.
- A host application, including OpenDAL, maps an untrusted path to the wrong object before calling Reqsign.
- A multi-tenant application shares one signer across tenants that should have separate credentials.
These may be serious vulnerabilities in the host application, but they are not Reqsign vulnerabilities unless Reqsign violates one of the boundaries in section 4.
The trusted caller is responsible for choosing endpoints, HTTP clients, context adapters, credential providers, request signers, service names, regions, and accounts.
Examples:
- The caller configures an attacker-controlled S3-compatible endpoint and sends signed requests to it.
- The caller supplies a custom
HttpSendimplementation that logs request bodies and headers. - The caller supplies a custom
Envimplementation that returns attacker credentials. - The caller supplies a custom
SignRequestimplementation that signs the wrong bytes.
Cloud-provider policy and identity behavior belong to the provider and the operator of that account.
Examples:
- An IAM policy, bucket policy, role trust policy, OAuth scope, storage account policy, or service-account permission grants broader access than intended.
- A provider accepts a signature that should have been rejected.
- A provider returns expired, overprivileged, or incorrect temporary credentials.
Reqsign can fail safely when provider responses are malformed, but it does not prove provider-side authorization correctness.
Reqsign signs requests according to provider rules. It does not provide end-to-end authentication of response bytes, object contents, metadata, timestamps, ETags, or backend state.
Applications that need end-to-end integrity must add it above Reqsign and above their storage/API client.
Reqsign is not a default DoS shield.
Examples:
- A credential file is very large.
- A token endpoint responds slowly or returns a large body.
- A process credential helper hangs.
- A caller asks Reqsign to sign many requests concurrently.
Resource-exhaustion reports are Reqsign vulnerabilities only when they show Reqsign violates a documented bound, ignores configured timeout or cancellation behavior that Reqsign owns, or consumes resources independently of the operation requested by the trusted caller.
TLS certificate validation, CA bundles, proxies, redirect policy, DNS, socket options, and network egress controls are properties of the configured HTTP client and host environment. A report is in scope only if Reqsign silently weakens transport contrary to its documented meaning or sends Reqsign-owned secret material to an endpoint outside the provider contract.
Dependency freshness, GitHub Actions hardening, release signing, branch protection, and ASF infrastructure policy are important, but they are outside this library threat boundary unless a separate project policy says otherwise.
| Disposition | Use when |
|---|---|
VALID |
The report shows a violation of an in-scope boundary in section 4, reachable through documented Reqsign APIs or shipped Reqsign library behavior. |
VALID-HARDENING |
There is no clear security-boundary violation, but Reqsign's API, defaults, logging, or documentation make dangerous misuse common enough that maintainers choose to harden behavior or docs. |
OUT-OF-SCOPE: caller-authz |
The report depends on the host application forwarding unauthorized end-user input into Reqsign. |
OUT-OF-SCOPE: caller-config |
The report depends on a trusted caller choosing a malicious endpoint, provider, context adapter, credential file, command, HTTP client, service name, region, or custom signer. |
OUT-OF-SCOPE: provider-authz |
The report is about cloud-provider policy, role trust, OAuth scope, bucket policy, or provider-side signature verification rather than Reqsign behavior. |
OUT-OF-SCOPE: transport |
The report is about TLS, proxy, DNS, redirect, timeout, or socket behavior owned by the configured HTTP client or host environment. |
OUT-OF-SCOPE: infrastructure |
The report is about release, CI, dependency, or ASF infrastructure policy rather than the Reqsign library boundary. |
BY-DESIGN: property-not-provided |
The report asks Reqsign to provide a property explicitly not provided here, such as host-application authorization, endpoint trust, response integrity, or default DoS protection. |
MODEL-GAP |
The report cannot be classified by this document. Treat this as evidence that the model needs revision. |
SignerB signs a request with credentials cached by unrelatedSignerA.- A credential
Debugimplementation prints a secret access key, account key, private key, session token, or OAuth token. no_imds()is configured, but the built provider still contacts IMDS.Context::new()reads environment variables, local files, HTTP endpoints, or external commands without the caller installing adapters.- A process credential provider executes through a shell when the API only accepts a program and argument vector.
- A token-provider error includes the full JSON response body containing an access token.
- Query presigning leaves a stale signature parameter from a previous signing pass and grants access to a request different from the current request.
- A signer canonicalizes an attacker-controlled header in a way that signs a different authority, path, or query than the caller's request.
- A malformed credential file or token response triggers memory unsafety or an uncontrolled panic through a normal public API call.
OUT-OF-SCOPE: caller-config: a caller signs an attacker-supplied URL with production credentials.OUT-OF-SCOPE: caller-config: a caller configures an attacker-controlled S3-compatible endpoint and that endpoint receives signed requests.OUT-OF-SCOPE: caller-authz: a host application, including OpenDAL, authorizes the wrong tenant before calling Reqsign.OUT-OF-SCOPE: provider-authz: a bucket policy, IAM role, service account, storage account, or OAuth scope is overprivileged.OUT-OF-SCOPE: caller-config: a caller-provided custom signer intentionally logs the canonical request and secret key.OUT-OF-SCOPE: provider-authz: a cloud provider accepts a bad signature due to a provider-side verifier bug.OUT-OF-SCOPE: caller-config: a credential-helper command configured by the caller is malicious.BY-DESIGN: property-not-provided: a credential file is huge and the caller did not provide resource limits.
- A default provider chain is surprising but still follows documented behavior.
- A common integration misuse, especially in OpenDAL usage, is easy enough that many users repeat it.
- A provider error includes non-secret operational context that can be sensitive in some deployments.
- A service's signing behavior is correct for one compatible backend but should document differences for another compatible backend.
The following decisions are part of this model.
| Topic | Decision |
|---|---|
| Host application trust | Reqsign treats OpenDAL and other embedding applications as trusted callers that authorize users, choose endpoints, construct requests, and decide which inputs may be signed. |
| Custom key signing | Caller-provided custom signers and providers are trusted code, but Reqsign must preserve type relationships, request integrity, credential isolation, and explicit customization. |
| No-op context default | Context::new() and Context::default() must remain no-op for file reads, HTTP sends, environment reads, and command execution. Ambient access belongs to explicit adapters such as default_context(). |
| Default credential providers | Future API changes around DefaultCredentialProvider must follow docs/default-credential-provider-api.md; reintroducing configure_*, disable_*(bool), or build-time fallback re-enabling of removed slots is a design regression unless explicitly approved. |
| Credential redaction | Credentials and reusable signing material are secrets and must be redacted. Paths, endpoints, regions, account names, and provider names are operational context by default. |
| Presigned URLs | Presigned URLs and signed query strings can grant access and should be treated as secret-bearing material when emitted by Reqsign-owned logs, errors, or debug output. |
| Transport | Reqsign delegates TLS, proxy, DNS, redirect, and socket policy to the configured HTTP client and host environment. |
| OpenDAL integration boundary | OpenDAL-level storage semantics, operator authorization, path policy, and backend trust decisions are covered by OpenDAL's own security model, not this Reqsign model. Other host applications own equivalent application-level policy in their own security models. |
| Version binding | A report should be triaged against the threat model version present in the affected release tag or maintenance branch. |
| Capability drift | When credential loading, request signing, context capabilities, WASM support, or custom signing APIs change, this file should be updated in the same pull request or a linked follow-up. |
We will revisit this threat model when any of the following changes:
- A credential provider starts storing credentials outside process memory.
- A context adapter gains a new filesystem, network, process, or environment capability.
- A default credential-provider chain changes order, defaults, or disabling semantics.
- A signing implementation changes canonicalization, expiry, payload hash, or presigning behavior.
- A new service crate, provider family, or token exchange flow is added.
- A new OpenDAL integration or non-OpenDAL embedding relies on Reqsign for custom key signing in a way that changes the trusted-caller boundary.
- WASM support gains a new runtime capability.
- A vulnerability report is classified as
MODEL-GAP. - The project decides to treat a previously caller-owned property as a Reqsign-provided property.
Apache Reqsign is a top-level ASF project. OpenDAL remains the
primary integration this model expects maintainers to consider. Reqsign is a
reusable library: direct reqsign users and other embedding applications get
the same Reqsign security properties and retain the same host-application
responsibilities.
Reqsign owns:
- documented credential loading behavior;
- request canonicalization and signing behavior;
- credential caching and isolation;
- redaction of Reqsign-owned credentials and signing material;
- documented behavior of Reqsign-provided runtime capabilities and defaults.
OpenDAL and other host applications own:
- end-user authentication and authorization;
- storage path policy and namespace mapping;
- choice of endpoint, service, region, account, signer, credential provider, and context adapter;
- whether signed requests or presigned URLs may be exposed to end users;
- deployment controls such as network egress policy, TLS configuration, process sandboxing, and resource limits.
For OpenDAL, this threat model is additive. It does not replace OpenDAL's threat model or the Apache Software Foundation disclosure process. For other embedding applications, this model defines only Reqsign's library boundary; the embedding application must define its own authorization, input-validation, endpoint-trust, and deployment boundaries.