JAdES signatures
Prepare detached JAdES signatures, add trusted time and validation evidence, and renew archive protection while retaining originals.
Use detached JAdES for JSON or binary originals retained by the requesting support service. Signing Server signs the exact prepared input through its explicitly registered local DSS profile. The support service assembles and validates B-B, B-T, B-LT or B-LTA and owns preservation and renewal.
Prepare the signing request
Section titled “Prepare the signing request”Enable urn:se:idombud:signing:dss:jades:v1 in the requester's additional_signing_profiles, select the same root Profile and use the local JAdES task collection. Keep requester envelope signing, signer identification, exact-input consent, expiry and replay checks. This profile uses the existing browser route; it adds no standard Sweden Connect SigType or Baseline-level field.
Obtain the actual preknown static signing-leaf certificate before preparation. Use RS256 with RSA 2048–4096 bits, b64=false, crit=["b64","sigD"] and ObjectIdByURIHash over exactly one original. Bind the complete actual leaf DER in x5c and x5t#S256. Higher levels retain this static-certificate requirement.
Retain the exact original octets, including JSON whitespace, newlines and Unicode representation. Freeze the protected JSON bytes. The complete signing message is ASCII of the unpadded base64url protected header followed by one period. Its payload contribution is empty under this specific URI-hash mechanism; the original's SHA-256 is protected in sigD.hashV. Send that complete message, never its prehash or the original, as ToBeSignedBytes. The server hashes it exactly once for RSA prehash signing and never fetches the original URI.
Validate the signed DSS response, identity/consent result, request correlation and exact ordered task inputs before accepting its raw signature. Assemble B-B as exactly protected and signature, preserving both canonical unpadded base64url strings. Verify the original hash/reference, expected actual leaf and complete profile under your configured trust policy.
Add trusted time: B-T
Section titled “Add trusted time: B-T”Calculate SHA-256 over ASCII of the exact encoded signature member. This is neither raw RSA bytes nor a quoted JSON string. Submit the imprint to the configured timestamp API using imprint_kind=signature_value. Validate request correlation, imprint, nonce, configured TSA certificate/chain, policy, signature and time. Append exactly one sigTst with one RFC3161/RFC5816 token while the original signer certificate/status is still usable.
Higher levels add only header:{"etsiU":[...]}. Each array entry is canonical unpadded base64url of strict UTF-8 JSON containing exactly one supported property. Preserve every old string verbatim; append new entries without normalizing historical JSON. Clear or mixed component representations, attached payloads, extra signatures and canonicalization parameters are rejected.
Retain validation evidence: B-LT
Section titled “Retain validation evidence: B-LT”Append useful anyValData containing the missing signer and initial-TSA certificates and complete direct-issuer CRLs. Its nested xVals uses entries shaped as {"x509Cert":{"val":"<standard Base64 DER>"}}; nested rVals uses {"crlVals":[{"val":"<standard Base64 DER>"}]}. Token containers use tstTokens:[{"val":"<standard Base64 DER>"}]. DER values use standard canonical padded Base64, distinct from the outer base64url strings.
B-LT is exactly sigTst, anyValData. Only sigTst, anyValData and arcTst are supported as top-level unsigned components. Standalone xVals, rVals, tstVD, OCSP, delta/indirect CRLs and arbitrary ETSI properties are outside this selected subset. Deduplicate explicit material by DER identity while preserving immutable tokens. Embedded roots are material; establish trust through separately configured roots.
Validate the complete level offline with AIA, OCSP and CRL retrieval disabled. Reject missing, stale, revoked, forged, wrong-issuer or inconsistent evidence. Obtain preparation material only through administrator-controlled sources; document and evidence URLs never grant network access.
Protect and renew the archive: B-LTA
Section titled “Protect and renew the archive: B-LTA”Validate the complete existing artifact before renewal. Gather useful missing/fresh material for all existing signatures/timestamps and the configured next TSA. Append it in anyValData when needed, then append one arcTst. The returned token must match that preloaded chain and status evidence. Multiple consecutive useful anyValData entries may precede an archive so earlier encoded blocks stay unchanged while fresh or missing evidence is added. Empty and redundant material is rejected. Every completed generation ends in arcTst; there is no trailing tstVD.
For the selected single-original, b64=false URI-hash profile, the archive SHA-256 covers exactly:
original exact octets|| ASCII("." + protected + "." + signature + ".")|| ASCII(each preceding encoded etsiU string in order)There are no separators, quotes or decoded JSON between component strings. Exclude the new archive and all later entries. Unlike the original signing message, this input includes the original bytes. Send only its SHA-256 through the timestamp API using imprint_kind=original; validate the whole completed JAdES independently before output. Renewal preserves the previous prefix and never invokes the original document-signing key.
Historical status is evaluated at validated timestamp/proof-of-existence instants with archive coverage. An old CRL can remain historical evidence after nextUpdate; an unprotected stale CRL or claimed iat cannot establish historical validity. Renew before the latest usable protection expires. New timestamps cannot repair earlier tampering, missing evidence or an already broken protection chain.
Limits, failures and preservation
Section titled “Limits, failures and preservation”Original signing remains bounded to 16,384 prepared bytes per task and the shared DSS/form limits. Consumer originals are 1–16,777,216 bytes; completed JWS is at most 16,777,216 bytes with at most eight archives. Simultaneous JSON, DER, node and aggregate limits also apply. The downloadable contract map gives all limits; the complete integration guide gives exact encoding and recovery rules.
A mismatched or expired preparation, invalid evidence, timestamp outage, process loss or unknown outcome fails the requested level and retains the preceding accepted artifact. Output paths must be new. There is no silent downgrade, document re-signing, automatic timestamp retry or fresh-ID substitution; a consumed request ID remains consumed. Reconcile unknown issuance before further business action.
Assign a preservation owner. Retain the originals, every revision and encoded history, tokens, public chains/CRLs, independent trust/policy history and validation/correlation receipts. Monitor evidence and algorithm suitability, TSA changes and expiry; schedule renewal with outage margin. Draft expiry does not authorize deletion of durable transaction, receipt, audit or key history. This integration provides a consumer renewal operation rather than a hosted archival service.
See Signature levels and dependencies for level selection and Support service reference for request and response validation.