blob: 16ea94d1632eac12bc1d89066506cb7405be58b8 [file] [log] [blame]
Changhoon Yoonb856b812015-08-10 03:47:19 +09001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.security;
18
19import org.onosproject.core.ApplicationId;
20
21import java.security.Permission;
22import java.util.List;
23import java.util.Map;
24
25/**
26 * Security-Mode ONOS service.
27 */
28public interface SecurityAdminService {
29
30 /**
31 * Returns true if security policy has been enforced to specified application.
32 * @param appId application identifier
33 * @return true if secured.
34 */
35 boolean isSecured(ApplicationId appId);
36
37 /**
38 * Changes SecurityModeState of specified application to REVIEWED.
39 * @param appId application identifier
40 */
41 void review(ApplicationId appId);
42
43 /**
44 * Accepts and enforces security policy to specified application.
45 * @param appId application identifier
46 */
47 void acceptPolicy(ApplicationId appId);
48
49 /**
50 * Register application to SM-ONOS subsystem.
51 * @param appId application identifier
52 */
53 void register(ApplicationId appId);
54
55 /**
56 * Returns sorted developer specified permission Map.
57 * @param appId application identifier
58 * @return Map of list of permissions sorted by permission type
59 */
60 Map<Integer, List<Permission>> getPrintableSpecifiedPermissions(ApplicationId appId);
61
62 /**
63 * Returns sorted granted permission Map.
64 * @param appId application identifier
65 * @return Map of list of permissions sorted by permission type
66 */
67 Map<Integer, List<Permission>> getPrintableGrantedPermissions(ApplicationId appId);
68
69 /**
70 * Returns sorted requested permission Map.
71 * @param appId application identifier
72 * @return Map of list of permissions sorted by permission type
73 */
74 Map<Integer, List<Permission>> getPrintableRequestedPermissions(ApplicationId appId);
75
76
77}