Skip to content
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

Directory Backend Plus Auth Improvements #59

Merged
merged 8 commits into from
Oct 15, 2019
Merged

Conversation

eiyuki
Copy link
Contributor

@eiyuki eiyuki commented Aug 22, 2019

Add a directory backend and configurable authorization backends

Co-Authored-By: Dan James sddj@me.com
Co-Authored-By: Kevin Scheetz kevin.scheetz@gmail.com

  • Add directory backend

  • Add directory backend tests

  • Allow authentication to use different backends

  • Add memory backend for authentication

  • Add mongo db backend for authentication

  • Switch passwords from plaintext to hashed

  • Add API key authentication support

  • Add JWT authentication support

  • Support multiple authentication methods

  • Add script for generating passwords

  • Add scripts for adding users and api keys to the mongo authentication db

eiyuki and others added 4 commits August 22, 2019 15:04
Add a directory backend and configurable authorization backends

Co-Authored-By: Dan James <sddj@users.noreply.github.com>
Co-Authored-By: kscheetz <kscheetz@users.noreply.github.com>
- Sorted imports
- Bug fixes for python 2/3 compatibility
- Configure mongo db in .travis.yml
@clenk
Copy link
Contributor

clenk commented Aug 27, 2019

Hi @eiyuki, thanks for the extensive pull request! We need some time to go through this and we'll get to it as soon as we can. Also, I see you all have signed the CLA already. Thanks!

tox.ini Outdated Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
@emmanvg emmanvg self-requested a review August 30, 2019 18:53
# Conflicts:
#	README.rst
#	medallion/__init__.py
#	medallion/test/base_test.py
#	medallion/test/test_memory_backend.py
@codecov-io
Copy link

codecov-io commented Sep 3, 2019

Codecov Report

Merging #59 into master will decrease coverage by 5.45%.
The diff coverage is 74.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
- Coverage   93.81%   88.35%   -5.46%     
==========================================
  Files          22       33      +11     
  Lines        1842     2456     +614     
==========================================
+ Hits         1728     2170     +442     
- Misses        114      286     +172
Impacted Files Coverage Δ
medallion/backends/taxii/base.py 52.63% <ø> (ø)
medallion/scripts/run.py 0% <0%> (ø) ⬆️
medallion/backends/auth/mongodb_auth.py 0% <0%> (ø)
medallion/scripts/generate_user_password.py 0% <0%> (ø)
medallion/scripts/auth_db_utils.py 0% <0%> (ø)
medallion/test/test_directory_backend.py 100% <100%> (ø)
medallion/backends/auth/memory_auth.py 100% <100%> (ø)
medallion/filters/basic_filter.py 90.6% <100%> (ø) ⬆️
medallion/test/__init__.py 100% <100%> (ø) ⬆️
medallion/test/test_mongodb_backend.py 97.53% <100%> (ø) ⬆️
... and 26 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 0b37847...96179e9. Read the comment docs.

@emmanvg emmanvg added this to the 0.5.0 milestone Oct 11, 2019
@emmanvg emmanvg self-assigned this Oct 11, 2019
- created new directories for auth and taxii backend modules
- added hooks for the new scripts
- update test suite per aforementioned changes
- small code refactoring, readme updating
@emmanvg
Copy link
Contributor

emmanvg commented Oct 14, 2019

@eiyuki I made a couple of changes to the PR you opened. If you are fine with the changes I have made I think we are good to go with merging this code in!

@eiyuki
Copy link
Contributor Author

eiyuki commented Oct 15, 2019

@emmanvg We have looked over the changes, and everything looks good. Happy to see this get merged in.

Copy link
Contributor

@emmanvg emmanvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After verifying the changes in this PR we will be incorporating these changes in the next release. There could be improvements made to the directory_backend, but for a first implementation it should be a good start. Thanks for the other authentication improvements.

@emmanvg emmanvg merged commit b9441e1 into oasis-open:master Oct 15, 2019
@clenk
Copy link
Contributor

clenk commented Oct 15, 2019

Thank you for the contributions, @eiyuki, @sddj, and @kscheetz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants