Skip to content

Commit 5ee9cd5

Browse files
committed
Documentation improvements
1 parent 868f0f1 commit 5ee9cd5

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

.github/ISSUE_TEMPLATE/signxml-issue.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Thank you for your interest in signxml. If you want to report an issue or make a
1515
- If you are looking for general technical help, please ensure you have read and understood the documentation for the software and standards this project builds upon. Issues that don't confirm that effort was taken to check the relevant documentation will be closed.
1616
- If you wish to report a bug, please provide a single script that yields a complete standalone reproduction of the observed behavior, together with an explanation of the expected behavior and any citations that may be needed to support the expectation. Issues that don't provide this information will be closed.
1717
- If you wish to make a feature request, please note that the maintainers' time is limited and you are invited to submit a pull request instead. Pull requests are expected to provide clean readable code, unit tests that cover the code and assert on the newly expected behavior, and documentation.
18+
- If you are looking for support and using this library in a for-profit project, please donate using the "Sponsor" button above. If you are wondering how much to donate, you can use the rule of thumb of $100 per hour spent addressing your issue.
1819
1920
Thank you for contributing. You can delete this text to edit your issue content.
2021

README.rst

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ SignXML: XML Signature in Python
33

44
*SignXML* is an implementation of the W3C `XML Signature <http://en.wikipedia.org/wiki/XML_Signature>`_ standard in
55
Python. This standard (also known as XMLDSig and `RFC 3275 <http://www.ietf.org/rfc/rfc3275.txt>`_) is used to provide
6-
payload security in `SAML 2.0 <http://en.wikipedia.org/wiki/SAML_2.0>`_ and
7-
`WS-Security <https://en.wikipedia.org/wiki/WS-Security>`_, among other uses. Two versions of the standard exist
8-
(`Version 1.1 <http://www.w3.org/TR/xmldsig-core1/>`_ and `Version 2.0 <http://www.w3.org/TR/xmldsig-core2>`_).
9-
*SignXML* implements all of the required components of the standard, and most recommended ones. Its features are:
6+
payload security in `SAML 2.0 <http://en.wikipedia.org/wiki/SAML_2.0>`_, `XAdES <https://en.wikipedia.org/wiki/XAdES>`_,
7+
and `WS-Security <https://en.wikipedia.org/wiki/WS-Security>`_, among other uses. Two versions of the standard are in
8+
use (`Version 1.1 <http://www.w3.org/TR/xmldsig-core1/>`_, a finalized
9+
`W3C Recommendation <https://www.w3.org/standards/types#REC>`_, and
10+
`Version 2.0 <http://www.w3.org/TR/xmldsig-core2>`_, a draft
11+
`W3C Working Group Note <https://www.w3.org/standards/types#NOTE>`_). *SignXML* implements all of the required components
12+
of the Version 1.1 standard, and most recommended ones. Its features are:
1013

1114
* Use of a libxml2-based XML parser configured to defend against
1215
`common XML attacks <https://docs.python.org/3/library/xml.html#xml-vulnerabilities>`_ when verifying signatures
@@ -117,8 +120,8 @@ Assuming ``metadata.xml`` contains SAML metadata for the assertion source:
117120
subject name that must be in the signing X.509 certificate given by the signature (verified as if it were a
118121
domain name), or ``ca_pem_file``/``ca_path`` to give a custom CA.
119122

120-
XML signature methods: enveloped, detached, enveloping
121-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123+
XML signature construction methods: enveloped, detached, enveloping
124+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122125
The XML Signature specification defines three ways to compose a signature with the data being signed: enveloped,
123126
detached, and enveloping signature. Enveloped is the default method. To specify the type of signature that you want to
124127
generate, pass the ``method`` argument to ``sign()``:
@@ -133,16 +136,16 @@ For detached signatures, the code above will use the ``Id`` or ``ID`` attribute
133136
``sign()``. To verify a detached signature that refers to an external entity, pass a callable resolver in
134137
``XMLVerifier().verify(data, uri_resolver=...)``.
135138

136-
See the `API documentation <https://xml-security.github.io/signxml/#id5>`_ for more.
139+
See the `API documentation <https://xml-security.github.io/signxml/#id5>`_ for more details.
137140

138141

139142
XML representation details: Configuring namespace prefixes and whitespace
140143
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141144
Some applications require a particular namespace prefix configuration - for example, a number of applications assume
142145
that the ``http://www.w3.org/2000/09/xmldsig#`` namespace is set as the default, unprefixed namespace instead of using
143146
the customary ``ds:`` prefix. While in normal use namespace prefix naming is an insignificant representation detail,
144-
it is significant for XML canonicalization and signature purposes. To configure the namespace prefix map when generating
145-
a signature, set the ``XMLSigner.namespaces`` attribute:
147+
it can be significant in some XML canonicalization and signature configurations. To configure the namespace prefix map
148+
when generating a signature, set the ``XMLSigner.namespaces`` attribute:
146149

147150
.. code-block:: python
148151
@@ -171,6 +174,10 @@ references for more information:
171174

172175
XAdES signatures
173176
~~~~~~~~~~~~~~~~
177+
`XAdES ("XML Advanced Electronic Signatures") <https://en.wikipedia.org/wiki/XAdES>`_ is a standard for attaching
178+
metadata to XML Signature objects. This standard is endorsed by the European Union as the implementation for its
179+
`eSignature <https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/eSignature+Overview>`_ regulations.
180+
174181
SignXML supports signing and verifying documents using `XAdES <https://en.wikipedia.org/wiki/XAdES>`_ signatures:
175182

176183
.. code-block:: python

signxml/xades/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
"""
22
`XAdES ("XML Advanced Electronic Signatures") <https://en.wikipedia.org/wiki/XAdES>`_ is a standard for attaching
3-
metadata to XML Signature objects. The standard is endorsed by the European Union. While a
4-
`W3C publication from 2003 <https://www.w3.org/TR/XAdES/>`_ exists on the standard, that page is out of date and
5-
further development was undertaken by `ETSI <https://www.etsi.org>`_. ETSI's approach to standards document publication
6-
and versioning is best described as idiosyncratic, with many documents produced over time with confusing terminology
7-
and naming. Documents are only available as PDFs, and there is no apparent way to track all publications on a given
8-
standard. The most recent and straighforward description of the standard appears to be in the following two documents:
3+
metadata to XML Signature objects. This standard is endorsed by the European Union as the implementation for its
4+
`eSignature <https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/eSignature+Overview>`_ regulations.
5+
While a `W3C publication from 2003 <https://www.w3.org/TR/XAdES/>`_ exists on the standard, that page is out of date
6+
and further development was undertaken by `ETSI <https://www.etsi.org>`_. ETSI's approach to standards document
7+
publication and versioning is best described as idiosyncratic, with many documents produced over time with confusing
8+
terminology and naming. Documents are only available as PDFs, and there is no apparent way to track all publications on
9+
a given standard. The most recent and straighforward description of the standard appears to be in the following two
10+
documents:
911
1012
* `ETSI EN 319 132-1 V1.1.1 (2016-04)
1113
<https://www.etsi.org/deliver/etsi_en/319100_319199/31913201/01.01.01_60/en_31913201v010101p.pdf>`_,

0 commit comments

Comments
 (0)