xades4jxml-dsig

Storing the user name as part of the XAdES signature


Several users using a web app can electronically sign documents using the company key and certificate. The signature is produced in the XAdES format. I'd like to keep a trace, in the signature itself, of the user name who asked for signing. First, i'm not sure if it's a licit thing to do.

If so, does anyone know the XML element in which it makes sense to store that piece of information ? I just cannot find one that suits this need.


Solution

  • XML-DSIG/XAdES define elements that contain X509-related data (e.g. X509SubjectName). Usually each user would have his certificate and if you included the aforementioned elements they'd have the information you need.

    Since you have a single certificate I'd say any additional data is application-specific. You could use, for instance, a ds:Object element which is also signed. In xades4j you can do this using EnvelopedXmlObject.