authorizationxacmlabacalfaxacml2

URL accessible at specific hours only XACML


I have a knotty problem (at least for me) to solve

In a nutshell:

  1. A web server exposing a single URL (static page)
  2. the URL should only be accessible between 9 am and 5 pm (everyday)
  3. the whole thing should be implemented through XACML

Questions

Thanks a lot


Solution

  • You'll need:

    In your case, the policy would look like the following:

    policy allowOfficeHours{
        apply firstApplicable
        rule allowOfficeHours{
            target clause current_time>"09:00:00":time and current_time<"17:00:00":time
            permit
        }
    }
    

    Plan of action

    Start

    1. Start with downloading the PDP of your choice. If you need free, then go to AuthZForce. You can ask and tag questions with here. Their main architect / dev is active here.
    2. Then download the ALFA plugin for Eclipse to start writing some policies.
    3. Finally, use AuthZForce's PEP SDK to write your own PEP. Look at Java servlet filters as an easy means to write a PEP. Check out this post and that one for tips.