Skip to content

Commit 9294796

Browse files
committed
Correct documentation for digest_algorithm and signing_algorithm
1 parent 0252ec9 commit 9294796

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
- Correct documentation for `signing_algorithm` and `digest_algorithm` configuration options.
4+
35
## 7.5.2 (2025-02-10)
46

57
- Include the XSD of the XML Encryption Syntax and Processing Version 1.1 to the schema validator

docs/howto/config.rst

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,27 +1369,37 @@ signing_algorithm
13691369

13701370
Default algorithm to be used. Example::
13711371

1372-
"service": {
1373-
"sp": {
1374-
"signing_algorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512",
1375-
"digest_algorithm": "http://www.w3.org/2001/04/xmlenc#sha512",
1376-
}
1377-
}
1372+
"signing_algorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512",
1373+
"digest_algorithm": "http://www.w3.org/2001/04/xmlenc#sha512",
13781374

13791375

13801376
digest_algorithm
13811377
"""""""""""""""""
13821378

13831379
Default algorithm to be used. Example::
13841380

1385-
"service": {
1386-
"idp": {
1387-
"signing_algorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512",
1388-
"digest_algorithm": "http://www.w3.org/2001/04/xmlenc#sha512",
1389-
}
1381+
"signing_algorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512",
1382+
"digest_algorithm": "http://www.w3.org/2001/04/xmlenc#sha512",
1383+
1384+
Note that previously the documentation suggested `signing_algorithm` and
1385+
`digest_algorithm` configuration belong in the `service.idp` or `service.sp` section
1386+
which was not correct.
1387+
1388+
There are constants for the identifiers of the algorithms in the `saml2.xmldsig` module.
1389+
For example::
1390+
1391+
1392+
from saml2 import xmldsig
1393+
1394+
{
1395+
"digest_algorithm": SHA512,
1396+
"signing_algorithm": xmldsig.SIG_RSA_SHA256,
1397+
"digest_algorithm": xmldsig.DIGEST_SHA256,
1398+
...
13901399
}
13911400

13921401

1402+
13931403
logout_responses_signed
13941404
"""""""""""""""""""""""
13951405

0 commit comments

Comments
 (0)