Skip to content

Introduce cryptography module #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

c00kiemon5ter
Copy link
Member

@c00kiemon5ter c00kiemon5ter commented Aug 2, 2018

Based off of #519

  • Introduce cryptography module
  • Make use of the new cryptography module
  • Deprecate AESCipher

Related discussions at #519 and #417

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • Have you added information on what your changes do and why you chose this as your solution?
  • Have you written new tests for your changes?
  • Does your submission pass tests?
  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

This module provides cryptographic elements needed by saml2. There are separate
modules for symmetric and asymmetric cryptography, as well as pki related
operations.

The default symmetric cryptography method used is Fernet by the cryptography
library. Reference: https://cryptography.io/en/latest/fernet/

Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Replace AESCipher with the default symmetric method.
Use the default key generation method to generate a key for the server.
Warn about the use of aes attribute of authn.UsernamePasswordMako class.
Hide cryptography details behind the saml2.cryptography module.

Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
aes.py is deprecated and will be completely removed in a following release.
Users should switch to saml2.cryptography.symmetric instead.

Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
@c00kiemon5ter c00kiemon5ter force-pushed the refactor-cryptography-module branch from 6422e25 to a7763cd Compare August 2, 2018 12:06
@codecov-io
Copy link

codecov-io commented Aug 2, 2018

Codecov Report

Merging #526 into master will increase coverage by 0.03%.
The diff coverage is 79.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
+ Coverage   65.47%   65.51%   +0.03%     
==========================================
  Files         100      103       +3     
  Lines       25635    25681      +46     
==========================================
+ Hits        16785    16825      +40     
- Misses       8850     8856       +6
Impacted Files Coverage Δ
src/saml2/authn.py 0% <0%> (ø) ⬆️
src/saml2/sigver.py 70.57% <100%> (-0.24%) ⬇️
src/saml2/cryptography/pki.py 100% <100%> (ø)
src/saml2/cert.py 94.44% <100%> (-0.08%) ⬇️
src/saml2/aes.py 100% <100%> (+16.66%) ⬆️
src/saml2/server.py 72.47% <75%> (-0.05%) ⬇️
src/saml2/cryptography/symmetric.py 81.08% <81.08%> (ø)
src/saml2/cryptography/asymmetric.py 90.47% <90.47%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79d6798...a7763cd. Read the comment docs.

@c00kiemon5ter c00kiemon5ter merged commit 25bbf67 into IdentityPython:master Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants