All Classes Files Functions Variables Pages
IntrusionPrevention.idl
Go to the documentation of this file.
1 /**
2  * @file IntrusionPrevention.idl
3  * @brief API for Intrusion Prevention
4  * @version 2
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <common.idl>
9 
10 module webadmin {
11 
12 const long UpdateTimeNever = 0;
13 
14 enum IntrusionPreventionAction {
15  IntrusionPreventionActionDropAndLog,
16  IntrusionPreventionActionLog,
17  IntrusionPreventionActionNothing
18 };
19 
20 struct BlackList {
21  kerio::web::KId id;
22  string name;
23  string url;
24  IntrusionPreventionAction action;
25 };
26 
27 struct RuleReference {
28  string id; // gid:sid format ("1:123456") - this is intentionally string, not kerio::web::KId
29  string description;
30 };
31 
32 enum IntrusionPreventionUpdatePhases {
33  IntrusionPreventionUpdateOk,
34  IntrusionPreventionUpdateError,
35  IntrusionPreventionUpdateProgress
36 };
37 
39  TimeSpan lastUpdateCheck; /**< how long is since last rules update check */
40  string databaseVersion;
41  IntrusionPreventionUpdatePhases phase;
42  string errorMessage;
43 };
44 
45 typedef sequence<BlackList> BlackListList;
46 typedef sequence<RuleReference> RuleReferenceList;
47 
49 
50  boolean enabled;
51 
52  IntrusionPreventionAction high;
53  IntrusionPreventionAction medium;
54  IntrusionPreventionAction low;
55 
56  kerio::web::OptionalLong updateCheckInterval;
57 
58  BlackListList blackLists;
59  kerio::web::NamedValueList ports;
60 };
61 
63 
64  /**
65  * Returns configuration
66  *
67  * @throws kerio::web::ApiException \n
68  * -32001 Session expired. - "The user is not logged in." \n
69  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
70  */
71  void get(out IntrusionPreventionConfig config);
72 
73  /**
74  * Stores configuration
75  *
76  * @param errors - list of errors \n
77  * 8002 Database error. - "Unable to modify blacklist '%1'." \n
78  * 8002 Database error. - "Unable to modify ports for service '%1'."
79  * @param config - complete configuration of Intrusion Prevention system
80  * @throws kerio::web::ApiException \n
81  * -32001 Session expired. - "The user is not logged in." \n
82  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
83  */
84  void set(out kerio::web::ErrorList errors, in IntrusionPreventionConfig config);
85 
86  /**
87  * Returns signature description
88  *
89  * @throws kerio::web::ApiException \n
90  * -32001 Session expired. - "The user is not logged in." \n
91  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
92  */
93  void getSignatureDescription(out string description, in string id);
94 
95  /**
96  * Returns list of ignored signatures
97  *
98  * @throws kerio::web::ApiException \n
99  * -32001 Session expired. - "The user is not logged in." \n
100  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
101  */
102  void getIgnoredRules(out RuleReferenceList ignored);
103 
104  /**
105  * Sets list of ignored signatures
106  *
107  * @param errors - list of errors \n
108  * 8002 Database error. - "Unable to create exclusion for rule '%1'." \n
109  * 8002 Database error. - "Unable to remove exclusion for rule '%1'."
110  * @param ignored - List of rules that are excluded from usage in IPS
111  * @throws kerio::web::ApiException \n
112  * -32001 Session expired. - "The user is not logged in." \n
113  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
114  */
115  void setIgnoredRules(out kerio::web::ErrorList errors, in RuleReferenceList ignored);
116 
117  /**
118  * Checks new version of database and updates it
119  *
120  * @throws kerio::web::ApiException \n
121  * -32001 Session expired. - "The user is not logged in." \n
122  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
123  */
124  void update(in boolean force);
125 
126  /**
127  * Returns actual state of Update
128  *
129  * @throws kerio::web::ApiException \n
130  * -32001 Session expired. - "The user is not logged in." \n
131  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
132  */
133  void getUpdateStatus(out IntrusionPreventionInfo status);
134 };
135 
136 }; //webadmin
Common Kerio Control structures, enums and types.
TimeSpan lastUpdateCheck
Definition: IntrusionPrevention.idl:39
Definition: IntrusionPrevention.idl:20
Definition: common.idl:67
Definition: IntrusionPrevention.idl:27
Definition: SharedStructures.idl:298
Definition: IntrusionPrevention.idl:62
Definition: IntrusionPrevention.idl:38
Definition: IntrusionPrevention.idl:48
Definition: Accounting.idl:11