CZ-NIC / django-eidas-specific-node

GNU General Public License v3.0
2 stars 2 forks source link

Support cryptographic functions from AWS KMS #86

Open jtalir opened 4 years ago

jtalir commented 4 years ago

There should be a possibility to use https://aws.amazon.com/kms/ for cryptographic functions. One possible integration is described in the fork https://github.com/CZ-NIC/django-eidas-specific-node/compare/master...vrk-kpa:kms_support

Design

API

Settings

Requirements

setup.py: extras_require['aws_kms'] = ['boto3']

jiri-janousek commented 4 years ago

@tpazderka, could you make a design review? Thanks.

jiri-janousek commented 4 years ago

Hello @samikarvonen, could you join us for the design review? Thanks.

tpazderka commented 4 years ago

I do believe that the AwsKmsSigner should be able to prepare the needed structure for the signature withou the use of XmlSecSigner.

I think that the default implementation of creating the structure could be in the ABC as a _presign method?

samikarvonen commented 4 years ago

Yes, it would be better not to sign the xml twice. I just didn't find any simple way of preparing the xml for signing in my implementation. Also, I think specifying that exact version of boto3 is unnecessary latest should work just fine.

jiri-janousek commented 4 years ago

I do believe that the AwsKmsSigner should be able to prepare the needed structure for the signature withou the use of XmlSecSigner.

It isn't only about creating the structure but about filling the structure with certificate data and <ds:SignedInfo> data. AWS KMS client only signs the contents of <ds:SignedInfo> to fill <ds:SignatureValue>.