|
1 /* |
|
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Name : TSipCSPlatSecPolicy.h |
|
16 * Part of : SIPServerCore |
|
17 * The security policy for Sip Server |
|
18 * Version : SIP/6.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 @internalComponent |
|
27 */ |
|
28 #ifndef TSIPCSPLATSECPOLICY_H |
|
29 #define TSIPCSPLATSECPOLICY_H |
|
30 |
|
31 |
|
32 /** |
|
33 * Number of different IPC ranges |
|
34 */ |
|
35 const TUint KSipCSPlatSecRangeCount = 5; |
|
36 |
|
37 |
|
38 /** |
|
39 * IPC ranges segmented into groups based on their capability requirements |
|
40 */ |
|
41 const TInt TSipCSPlatSecRanges[KSipCSPlatSecRangeCount] = |
|
42 { |
|
43 0, // IPC message 0 - 25 |
|
44 26, // IPC message 26 |
|
45 27, // IPC message 27 - 28 |
|
46 29, // IPC message 29 - 53 |
|
47 54 // Not Supported 54 -> |
|
48 }; |
|
49 |
|
50 /** |
|
51 * IPC segments and their capability requirements |
|
52 */ |
|
53 const TUint8 TSipCSPlatSecElementsIndex[KSipCSPlatSecRangeCount] = |
|
54 { |
|
55 CPolicyServer::EAlwaysPass, // Security policy for IPC 0-25 |
|
56 0, // Security policy for IPC 26 (WriteDeviceData) |
|
57 CPolicyServer::ECustomCheck, // Security policy for IPC 27-28 |
|
58 1, // Security policy for IPC 29-53 (NetworkServices) |
|
59 CPolicyServer::ENotSupported // Not Supported 54 -> |
|
60 }; |
|
61 |
|
62 /** |
|
63 * Capability sets and the action performed in case of failure |
|
64 */ |
|
65 const CPolicyServer::TPolicyElement TSipCSPlatSecElements[2] = |
|
66 { |
|
67 // Requires the user to have WriteDeviceData capability, |
|
68 // otherwise the message is completed with KErrPermissionDenied |
|
69 { _INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData), |
|
70 CPolicyServer::EFailClient }, |
|
71 |
|
72 // Requires the user to have NetworkServices capability, |
|
73 // otherwise the message is completed with KErrPermissionDenied |
|
74 { _INIT_SECURITY_POLICY_C1(ECapabilityNetworkServices), |
|
75 CPolicyServer::EFailClient } |
|
76 }; |
|
77 |
|
78 /** |
|
79 * Platform security policy that SIP Server uses. |
|
80 */ |
|
81 const CPolicyServer::TPolicy TSipCSPlatSecPolicy = |
|
82 { |
|
83 CPolicyServer::EAlwaysPass, // Specifies all connect attempts should pass |
|
84 KSipCSPlatSecRangeCount, // Number of ITC ranges |
|
85 TSipCSPlatSecRanges, // ITC Ranges |
|
86 TSipCSPlatSecElementsIndex, // Policy to ITC mapping array |
|
87 TSipCSPlatSecElements // Policies used in SIP Server |
|
88 }; |
|
89 |
|
90 #endif // TSIPCSPLATSECPOLICY_H |