Authorization in DynaFed, Part 2

As we showed previously, there is an easy way to use the information derived from VOMS-server based on grid-mapfiles to authorize a specific user to access a specific part of the dynamic federation. This solution was based on 3 parts:

  1. a grid-mapfile listing the DNs of all users from all supported VOs with all possible roles
  2. a text file (accessfile) that specifies the different privileges for the different parts of the storage federation
  3. a python script that is doing the authentication and authorization based on the 2 previously mentioned files
While in this solution the grid-mapfile and accessfile can be changed anytime without the need to reload/restart the httpd and memcache process, there is also a simpler solution based on the internal authentication methods possible which however needs to restart httpd and memcache after each change. This one will be explained in the following.



Using the built in authentication in Dynafed, one can grant access to a specific part of the federation to a group or single user with:
  1. glb.allowusers[]: GRID-DN /atlas rl
  2. glb.allowgroups[]: atlas /atlas rl

Now, since the GRID-DN is given by a VOMS server lookup, like it is done by the edg-mkgridmap tool as explained previously, both methods can be combined. When using edg-mkgridmap without specifying an output file then the output is sent to stout and can be manipulated before writing to a file:

edg-mkgridmap --conf=/etc/edg-mkgridmap-atlas.conf|awk '{NF=NF-1;print "glb.allowusers[]: "$0" /atlas rl"}' > /etc/ugr/conf.d/atlas-auth.conf

using the same config files as in the blog post about using grid-mapfiles. This example will allow all users to have read and list permission for anything under /atlas using the built-in authentication mechanism of Dynafed.

To allow in addition all production jobs write access to /atlas/datadisk, one can add to /etc/ugr/ugr.conf:

gl.allowgroups[]: atlas/Role=production /atlas/datadisk rwld

Using this kind of authorization/authentication will work much faster than the current grid-mapfile implementation in python, but one has to keep in mind that 
  1. any group specific authorizations will only work with tools that can handle voms proxies, e.g. it will not work in web browsers
  2. when changing the /etc/ugr/conf.d/atlas-auth.conf then it will not be instantly be available in httpd
    1. there is configurable limit in httpd after which all config files are reload
    2. to apply changes instantly, httpd needs to be restarted
      1. the graceful option could be helpful here to not interrupt current requests



Comments

Popular posts from this blog

Grid-mapfile based authentication for DynaFed

Monitoring Dynafed with ELK