@digitalbazaar/zcapld
Advanced tools
Changelog
6.0.0 - 2022-01-11
createRootCapability
helper function to construct root zcaps from
a root invocation target and a root controller.maxClockSkew
param that defaults to 300
seconds. This parameter
defines the maximum clock skew that will be accepted when comparing
capability expiration date-times against the current date (or other
specified date) and when comparing a capability invocation proof against
the capability's delegation proof.invocationTarget
. This eliminates
optionality, simplifying implementations.parentCapability
MUST be passed so that the chain can be auto-computed.
Passing capabilityChain
is no longer permitted.capabilityAction
when creating capability invocation
proofs and expectedAction
when verifying proofs; removing previous
optionality simplifies implementations.expires
is not permitted on root capabilities and is
required on delegated capabilities. Removing optionality here simplifies
implementations and improves security by reducing surface and providing
an "out" for zcaps that can not be easily revoked by causing them to
always expire eventually.currentDate
and date
parameters that were serving
the same purpose. These params are only used for verification and the date
parameter is used by the base class provided by jsonld-signatures, so the
currentDate
parameter has been removed; use date
instead, it is only
used for verification of proofs, not creation of proofs.invocationTarget
MUST be specified in capability invocation
proofs, it will not default to the invocationTarget
specified in the
capability. Removing this optionality removes complexity in implementations.capabilityChain
and capabilityChainMeta
that are passed
to inspectCapabilityChain
include entries for the root capability. The
verifyResult
is null
for the root zcap.allowTargetAttenuation=true
allows both path- or query-based
invocation target attenuation. Turning this on means a verifier will allow
accept delegations (and invocations) where a suffix has been added to the
parent zcap's invocation target (invoked zcap's invocation target). The
suffix must starts with /
or ?
if the invocation target prefix has no ?
and &
otherwise.invoker
and delegator
properties.
Only controller
is now permitted and it is required
, i.e., a ZCAP MUST
have a controller
property, the value of the ZCAP's id
property is not
considered a default controller value for the ZCAP. This change simplifies
ZCAP implementations and better reflects the fact that a delegation cannot
actually be restricted -- a system can only force users to use data model
and protocol-external mechanisms to delegate. This change keeps all
delegation within the data model/protocol for improved auditability.Changelog
5.2.0 - 2021-12-20
maxDelegationTtl
to enable checking that all zcaps in a
delegation chain have a time-to-live that is not greater than a certain
value. This check will have a default value shorter than Infinity
in
a future breaking version.requireChainDateMonotonicity
to enable checking that all
zcaps in a delegation chain have delegation proofs that were created using
dates that monotonically increase (i.e., no delegated zcap was delegated
any later than its parent). This check will be required in a future breaking
version.Changelog
5.1.3 - 2021-11-15
invocationTarget
from an invocation proof is checked against the
capability used and the expectedTarget
. The invocationTarget
from the
proof must both be in the expectedTarget
list (or a direct match if a
string value is used for expectedTarget
vs. an array) and it must also
match the invocationTarget
in the capability used (if
allowTargetAttenuation=true
then the capability's invocationTarget
may
be a path prefix for the invocationTarget
from the proof).Changelog
5.1.2 - 2021-07-21
Changelog
5.1.1 - 2021-07-21
proof
uses an expected context during proof validation.Changelog
5.1.0 - 2021-07-11
Changelog
5.0.0 - 2021-07-02
ZCAP_CONTEXT
in constants
as a convenience.documentLoader
to expose a convenience document loader that will load
ZCAP_CONTEXT
.extendDocumentLoader
for adding a custom document loader that extend
documentLoader
to load other documents.invocationTarget
to be set in order for match()
to find proofs based on expectedTarget
.
This helps ensure that the proof creator's intended invocationTarget
is
declared (important for systems that support RESTful attenuation) and it
enables more efficient proof verification when documents include multiple
capability invocation proofs that may have different invocation targets.expectedAction
is checked when looking for a matching proof,
not capabilityAction
.Changelog
4.0.0 - 2021-04-26
zcap-context@1.1.0
and refactor fetchInSecurityContext
API.@digitalbazaar/security-context@1.0.0
.Changelog
3.1.1 - 2021-04-15
jsonld-signatures@9
.Changelog
3.1.0 - 2021-04-08
jsonld.compact
step when a JSON-LD document has specific contexts.
This is a temporary measure until a zcap context is created.