Class CosignerRequirement
A requirement is a tree. The leaves name a cosigner, either by its
cosigner ID (cosigner(byte[])) or as the CA that issued the
certificate under validation (issuingCA(), whose cosigner ID is
the CA ID in the certificate's issuer). The interior nodes are quorums over
their members (atLeast(int, CosignerRequirement[]), with
anyOf(CosignerRequirement[]) and allOf(CosignerRequirement[]) as the
two common thresholds), so a policy such as "the CA and at least two
independent operators" is
CosignerRequirement.allOf(
CosignerRequirement.issuingCA(),
CosignerRequirement.atLeast(2,
CosignerRequirement.anyOf(operatorA1, operatorA2),
CosignerRequirement.anyOf(operatorB1),
CosignerRequirement.anyOf(operatorC1, operatorC2)))
Section 7.3 recommends that a relying party require the CA cosigner, for
authenticity, together with a quorum of additional cosigners, for
transparency. MerkleTreeCertificateValidator evaluates the
requirements in MerkleTreeCertificateValidator.ValidationParams
against the cosignatures that verified under the registered
MTCCosignerVerifierProvider; a cosigner that is not registered
never satisfies a leaf. A certificate whose subtree matches a trusted
subtree (Section 7.4) is accepted without reference to the requirements,
since a trusted subtree is one already known to satisfy them.
Instances are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CosignerRequirementallOf(CosignerRequirement... members) A requirement satisfied only when every member requirement is.static CosignerRequirementanyOf(CosignerRequirement... members) A requirement satisfied when any one of the member requirements is.static CosignerRequirementatLeast(int threshold, CosignerRequirement... members) A requirement satisfied when at leastthresholdof the member requirements are satisfied.static CosignerRequirementcosigner(byte[] cosignerId) A requirement satisfied by a valid cosignature from the cosigner with the given binary cosigner ID (seeTrustAnchorIDs).byte[]The cosigner ID acosigner(byte[])leaf names, or null for any other node.The members of a quorum node, or an empty list for a leaf.intThe number of members a quorum node needs satisfied, or 0 for a leaf.booleanTrue for theissuingCA()leaf.booleanisSatisfiedBy(Collection<byte[]> verifiedCosignerIds, byte[] caId) Evaluates this requirement against the cosigners whose cosignatures verified.static CosignerRequirementA requirement satisfied by a valid cosignature from the CA that issued the certificate being validated: the cosigner whose ID equals the CA ID carried in the certificate's issuer name.toString()A readable form, with cosigner IDs in dotted decimal:CA,32473.2.1,atLeast(2: 32473.2.1, 32473.2.2, 32473.2.3).
-
Method Details
-
cosigner
A requirement satisfied by a valid cosignature from the cosigner with the given binary cosigner ID (seeTrustAnchorIDs). -
issuingCA
A requirement satisfied by a valid cosignature from the CA that issued the certificate being validated: the cosigner whose ID equals the CA ID carried in the certificate's issuer name. Section 7.3 recommends every policy include this. -
atLeast
A requirement satisfied when at leastthresholdof the member requirements are satisfied.- Parameters:
threshold- the number of members that must be satisfied, from 1 to the number of membersmembers- the member requirements, at least one
-
anyOf
A requirement satisfied when any one of the member requirements is. -
allOf
A requirement satisfied only when every member requirement is. -
isSatisfiedBy
Evaluates this requirement against the cosigners whose cosignatures verified.- Parameters:
verifiedCosignerIds- the binary cosigner IDs whose cosignatures over the subtree verifiedcaId- the binary CA ID of the certificate's issuer, whichissuingCA()leaves match, or null if unknown- Returns:
- true if the requirement is satisfied
-
getCosignerId
public byte[] getCosignerId()The cosigner ID acosigner(byte[])leaf names, or null for any other node. -
isIssuingCA
public boolean isIssuingCA()True for theissuingCA()leaf. -
getThreshold
public int getThreshold()The number of members a quorum node needs satisfied, or 0 for a leaf. -
getMembers
The members of a quorum node, or an empty list for a leaf. -
toString
-