HewlettPackard / jupyterhub-samlauthenticator

jupyterhub-samlauthenticator
MIT License
36 stars 25 forks source link

Role / Group Check #53

Closed 0nebody closed 4 years ago

0nebody commented 4 years ago

First pass at adding access restriction by roles / groups that are returned in the SAML response.

Developer Certificate of Origin Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Signed-off-by: Mitchel Haring mitchel.haring@gmail.com

distortedsignal commented 4 years ago

This is a non-trivial change, and I want to say thanks right off the bat.

You'll understand if it takes me some time to getting around to reviewing it, right? I can see getting this in on Friday (2020-06-26) or next week Monday (2020-06-29), but probably not before. I'll start getting you some unit tests before then, though.

distortedsignal commented 4 years ago

Hey, I'm sorry I haven't gotten to this yet. I'm still getting the IdP set up to create the SAML Responses so I can give you better tests.

codecov-commenter commented 4 years ago

Codecov Report

Merging #53 into master will decrease coverage by 1.73%. The diff coverage is 67.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
- Coverage   91.09%   89.36%   -1.74%     
==========================================
  Files           2        2              
  Lines         348      376      +28     
==========================================
+ Hits          317      336      +19     
- Misses         31       40       +9     
Impacted Files Coverage Δ
samlauthenticator/samlauthenticator.py 89.33% <67.85%> (-1.74%) :arrow_down:

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 cd97085...150dfa9. Read the comment docs.

distortedsignal commented 4 years ago

Cool, thanks for getting to my comments so quickly! If you want to merge my PR into your branch here, I think that we should be able to get this merged by the end of the week.

distortedsignal commented 4 years ago

Wait - my changes don’t account for your updates based on the review comments. I’ll make some changes and get back to you.

distortedsignal commented 4 years ago

Ok, I should have fixed my tests at this point. If you want to squash-and-merge my changes into your branch, I think that I would be more than happy to get these changes into the project.