Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
PolicyDecisionPoint |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) 2009, Swiss Federal Department of Defence Civil Protection and Sport | |
3 | * (http://www.vbs.admin.ch) | |
4 | * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch) | |
5 | * All rights reserved. | |
6 | * | |
7 | * Licensed under the Open Permis License which accompanies this distribution, | |
8 | * and is available at http://www.openpermis.org/BSDlicenceKent.txt | |
9 | */ | |
10 | package org.openpermis; | |
11 | ||
12 | import java.net.URI; | |
13 | import java.util.List; | |
14 | ||
15 | import org.openpermis.policy.AccessDecision; | |
16 | import org.openpermis.policy.TimeStamp; | |
17 | ||
18 | ||
19 | /** | |
20 | * Performs policy-based access decisions. | |
21 | * @since 0.1.0 | |
22 | */ | |
23 | public interface PolicyDecisionPoint { | |
24 | ||
25 | //---- Methods | |
26 | ||
27 | /** | |
28 | * Decides whether a subject may be given access to a target and what obligations | |
29 | * need to be fulfilled. | |
30 | * @param subject a {@link Subject} to identify the user requesting access and to provide | |
31 | * the roles assigned to her. | |
32 | * @param resource a {@link URI} to identify the resource that the subject wants to access. | |
33 | * @param actionName the name of the action that the subject wants to perform on the resource. | |
34 | * @param arguments an optional list of arguments for the action | |
35 | * that the subject wants to perform on the resource. | |
36 | * @param timeStamp the time at which the action is executed. | |
37 | * @return an {@link AccessDecision} containing the PDP's decision and the | |
38 | * obligations associated with the decision. | |
39 | * @throws PolicyDecisionException if the PDP fails to make an access decision. | |
40 | * @since 0.1.0 | |
41 | */ | |
42 | public AccessDecision getAccessDecision ( | |
43 | Subject subject, | |
44 | URI resource, | |
45 | String actionName, | |
46 | List<?> arguments, | |
47 | TimeStamp timeStamp | |
48 | ) | |
49 | throws PolicyDecisionException; | |
50 | ||
51 | } |