feat: configurable encryption algorithm types #924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The feature or problem addressed by this PR
Encrypt assertion session key and transport key algorithms were hardcoded.
closes: #821
What your changes do and why you chose this solution
Added
encrypt_assertion_session_key_algsandencrypt_assertion_cert_key_algsconfiguration options to specify algorithms which can be used for encrypting assertions. Both of them are lists and index represents algorithm priority (first one has highest priority).When there is not cert prvided in parameters program will try to find one in metadata. Keys in metadata are prioritized in following order.
use=encryptionand specifiedEncryptionMethodsuse=encryptionuse=encryptionIf key has
EncryptionMethodsprogram will make intersect with configuration options and will take algorithms by its priority. If intersect is empty or there is notEncryptionMethodprogram will use first ones from config options.Added paramters and their propagation to
Server.create_authn_responsespecifying session key and transport key algorithms forencrypt_cert_adviceandencrypt_cert_assertion. If they are not provided program will use first ones from new config options.For support
http://www.w3.org/2009/xmlenc11#rsa-oaeptransport key alg withMGF1xmlsec version>=1.3.0is required.Checklist