<div dir="ltr"><div>Today my RBAC work led me to a few conclusions:</div><div><br></div><div>1) django admin (the built in django UI) will be the mechanism administrators use to assign permissions to users and groups. This means the use of django admin with pulp is very likely (to me).<br></div><div><br></div><div>2) externally defined users and groups will need to be "replicated" to django's db at login time, probably using headers from the webserver This is consistent w/ the approach recommended here:  <a href="https://www.adelton.com/django/external-authentication-for-django-projects">https://www.adelton.com/django/external-authentication-for-django-projects</a></div><div><br></div><div>3) My PoC will include a test ldap running in a docker container and this solution also should work the same with Active Directory. This picks up two of the big three (the third being kerberos). I've been following the nginx reference implementation today to set this up:  <a href="https://www.nginx.com/blog/nginx-plus-authenticate-users/">https://www.nginx.com/blog/nginx-plus-authenticate-users/</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 3, 2020 at 5:35 PM Brian Bouterse <<a href="mailto:bmbouter@redhat.com">bmbouter@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Today I got basic object-level permissions experimentally working with django-guardian. The current plan is to use a django-guardian to provide object-level permissions and drf-access-policy to provide the actual authorization checks in the viewset. Django-guardian could provide the permission checks in the viewset code itself with decorators, but we wouldn't be getting the benefits drf-access-policy provides. It's easy to stitch them together to make something great I think. That's what I'll be making.<br></div><div><br></div><div>I also talked with @wibbit in the channel yesterday who expressed interest in testing the pulp_file PoC. They also confirmed it's basic scope would meet their needs.<br></div><div><br></div><div>Also, I got the non standard CRUD permission for "modify_content" working for FileRepository using django-guardian.</div><div><br></div><div>Lastly I focused on understanding the external users and groups use cases. Django has nothing built in for this. This article below suggests to have the webserver do it and send along the group info as headers. There are third-party libraries ( <a href="https://djangopackages.org/grids/g/authentication/" target="_blank">https://djangopackages.org/grids/g/authentication/</a> ) but those are authN specific, so we need to think carefully about what to do here.</div><div><br></div><div><a href="https://www.adelton.com/django/external-authentication-for-django-projects" target="_blank">https://www.adelton.com/django/external-authentication-for-django-projects</a> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 2, 2020 at 5:07 PM Brian Bouterse <<a href="mailto:bmbouter@redhat.com" target="_blank">bmbouter@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I've started experimenting with the basic drf-access-policy example and django-guardian and adapting it to be a RemoteAccessPolicy</div><div><br></div><div><a href="https://github.com/pulp/pulp_file/compare/master...bmbouter:rbac-PoC?expand=1" target="_blank">https://github.com/pulp/pulp_file/compare/master...bmbouter:rbac-PoC?expand=1</a></div><div><a href="https://github.com/pulp/pulpcore/compare/master...bmbouter:rbac-PoC?expand=1" target="_blank">https://github.com/pulp/pulpcore/compare/master...bmbouter:rbac-PoC?expand=1</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 1, 2020 at 5:30 PM Brian Bouterse <<a href="mailto:bmbouter@redhat.com" target="_blank">bmbouter@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This thread is where progress made on the RBAC design/implementation from anyone can be posted. This is designed to bring both transparency and inclusivity so anyone can get involved on a daily basis.</div><div><br></div><div>Today I outlined a scope of work document - <a href="https://hackmd.io/kZ1oYp8TTkeuC5KL_ffjGQ" target="_blank">https://hackmd.io/kZ1oYp8TTkeuC5KL_ffjGQ</a></div><div><br></div><div>Next tasks:</div><div>* test out django-guardian to bring object-level permissions outlined in SoW doc<br></div><div>* test out drf-access-policy to allow viewset-level permissions enforcement in SoW<br></div><div><br></div><div> Feedback and collaboration is welcome.</div><br></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>