All Classes Files Functions Variables Pages
ContentFilter.idl
Go to the documentation of this file.
1 /**
2  * @file ContentFilter.idl
3  * @brief API for Content Filter
4  * @version 5
5  */
6 
7  #import <kerio/web/idl/SharedStructures.idl>
8  #import <common.idl>
9  #import <Users.idl>
10 
11 module webadmin {
12 
13 /**
14  * HTTPS configuration
15  */
16 struct HttpsConfig {
17  boolean enabled;
18  boolean isExclusionMode;
19  OptionalIdReference ipAddressGroup;
20  UserReferenceList userExceptions;
21  boolean disclaimer;
22 };
23 
24 /**
25  * SafeSearch configuration
26  */
28  boolean enabled;
29  UserReferenceList userExceptions;
30 };
31 
32 /**
33  * Web Filter configuration
34  */
36  string url;
37  string description;
38 };
39 
40 typedef sequence<UrlWhiteListEntry> UrlWhiteList;
41 
42 enum UrlFilterStatus {
43  UrlFilterNotLicensed, /* Whole tab disabled (there is feature section in OUR license file (or Control run in trial)) */
44  UrlFilterNotActivated, /* licensed, but ticket not accepted (activated) by filter */
45  UrlFilterActivating, /* licensed, but ticket activation in progress */
46  UrlFilterActivated /* licensed and ticket accepted (activated) by filter */
47 };
48 
50  UrlWhiteList whiteList;
51  UrlFilterStatus status;
52  string activationErrorDescr; //< optionally provide additional information about status of activation
53  boolean enabled;
54  boolean statisticsEnabled;
55  boolean allowMiscategorizedReporting;
56  boolean appidEnabled;
57 };
58 
59 /**
60  * List of applications
61  */
62 enum ApplicationType {
63  ApplicationWebFilterCategory,
64  ApplicationProtocol
65 };
66 
67 typedef sequence<ApplicationType> ApplicationTypeList;
68 
70  long id;
71  boolean heuristic;
72  string group;
73  string subGroup; /* obviously webfilter category name */
74  string name;
75  string description;
76  ApplicationTypeList types; /* one application could be both WebFilter and application */
77 };
78 
79 typedef sequence<ContentApplication> ContentApplicationList;
80 
81 enum ContentConditionEntityType {
82  ContentConditionEntityApplication,
83  ContentConditionEntityFileName,
84  ContentConditionEntityFileGroup,
85  ContentConditionEntityUrl,
86  ContentConditionEntityUrlGroup
87 };
88 
89 enum ContentEntityUrlType {
90  ContentEntityUrlWildcard,
91  ContentEntityUrlRegex,
92  ContentEntityUrlHostname
93 };
94 
95 typedef sequence<long> ApplicationList;
96 
98  ContentConditionEntityType type;
99 
100  /*@{ ContentConditionEntityApplication */
101  ApplicationList applications;
102  /*@}*/
103 
104  /*@{ ContentConditionEntityFileType & ContentEntityUrl */
105  string value;
106  /*@}*/
107 
108  /*@{ ContentEntityUrl */
109  ContentEntityUrlType urlType;
110  boolean matchSecured;
111  /*@}*/
112 
113  /*@{ ContentConditionEntityUrlGroup */
114  IdReference urlGroup;
115  /*@}*/
116 
117 };
118 
119 typedef sequence<ContentConditionEntity> ContentConditionEntityList;
120 
122  RuleConditionType type;
123  ContentConditionEntityList entities;
124 };
125 
126 enum SourceConditonEntityType {
127  SourceConditonEntityAddressGroup,
128  SourceConditonEntityUsers,
129  SourceConditonEntityGuests
130 };
131 
133  SourceConditonEntityType type;
134 
135  /*@{ IP address group */
136  IdReference ipAddressGroup;
137  /*@}*/
138 
139  /*@{ users */
140  UserConditionType userType; ///< @see Users.idl, used values: AuthenticatedUsers, SelectedUsers
141  UserReference user; ///< @see UserManager
142  /*@}*/
143 };
144 
145 typedef sequence<SourceConditonEntity> SourceConditonEntityList;
146 
148  RuleConditionType type;
149  SourceConditonEntityList entities;
150 };
151 
153  string denialText;
154  kerio::web::OptionalString redirectUrl;
155  boolean sendEmail;
156 };
157 
158 struct ContentRule {
159  kerio::web::KId id;
160 
161  /*@{ name */
162  boolean enabled;
163  string name;
164  string description;
165  string color;
166 
167  /*@{ action */
168  RuleAction action;
169  boolean logEnabled;
170  boolean skipAvScan;
171  boolean skipKeywords;
172  boolean skipAuthentication;
173  DenialCondition denialCondition;
174 
175 
176  /*@{ Conditions */
177  ContentCondition contentCondition;
178  SourceCondition sourceCondition;
179  IdReference validTimeRange;
180 
181 };
182 
183 typedef sequence<ContentRule> ContentRuleList;
184 
185 interface ContentFilter {
186  /**
187  * @param list - list of rule and it's details
188  * @throws kerio::web::ApiException \n
189  * -32001 Session expired. - "The user is not logged in." \n
190  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
191  */
192  void get(out ContentRuleList list);
193 
194  /**
195  * Stores the list of Content rules
196  * @param errors - list of errors occured during method call
197  * @param rules - list of rules and it's details
198  * @throws kerio::web::ApiException \n
199  * -32001 Session expired. - "The user is not logged in." \n
200  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
201  */
202  void set(out kerio::web::ErrorList errors, in ContentRuleList rules);
203 
204  /**
205  * Return list of overlappped rules
206  * @param collisions - list of collisions
207  * @throws kerio::web::ApiException on error:
208  * -32001 Session expired. - "The user is not logged in."
209  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
210  */
211  void getCollisions(out CollisionList list);
212 
213  /**
214  * Returns the list of webfilter/application categories and applications
215  * @param categories - list of webfilter/application categories and applications
216  * @throws kerio::web::ApiException \n
217  * -32001 Session expired. - "The user is not logged in." \n
218  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
219  * 8000 Internal error. - "Internal error." - unable to get page list of webfilter/application categories and applications
220  */
221  void getContentApplicationList(out ContentApplicationList categories);
222 
223  /**
224  * Returns the list of filename groups
225  * @param groups - list of filename groups
226  * @throws kerio::web::ApiException \n
227  * -32001 Session expired. - "The user is not logged in." \n
228  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
229  *
230  * @deprecated use FilenameGroups::get() instead
231  */
232  void getFilenameGroups(out FilenameGroupList groups);
233 
234  /**
235  * Returns configuration of WebFilter
236  * @param config - configuration values
237  * @throws kerio::web::ApiException \n
238  * -32001 Session expired. - "The user is not logged in." \n
239  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
240  */
241  void getUrlFilterConfig(out UrlFilterConfig config);
242 
243  /**
244  * Stores configuration of WebFilter
245  * @param config - configuration values
246  * @throws kerio::web::ApiException \n
247  * -32001 Session expired. - "The user is not logged in." \n
248  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
249  */
250  void setUrlFilterConfig(in UrlFilterConfig config);
251 
252  /**
253  * Reports miscategorized url
254  *
255  * @param url - URL, that is miscategorized
256  * @param categoryIds - up to 3 suggested categories. Can be empty, if new category is not known
257  * @throws kerio::web::ApiException \n
258  * -32001 Session expired. - "The user is not logged in." \n
259  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
260  */
261  void reportMiscategorizedUrl(in string url, in kerio::web::IntegerList categoryIds);
262 
263  /**
264  * Returns current categorization of given url
265  *
266  * @param url - checked URL
267  * @param categoryIds - list of categories, to which given URL belongs
268  * @throws kerio::web::ApiException \n
269  * -32001 Session expired. - "The user is not logged in." \n
270  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
271  */
272  void getUrlCategories(out kerio::web::IntegerList categoryIds, in string url);
273 
274  /**
275  * Returns configuration of HTTPS Filtering
276  * @param config - configuration values
277  * @throws kerio::web::ApiException \n
278  * -32001 Session expired. - "The user is not logged in." \n
279  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
280  */
281  void getHttpsConfig(out HttpsConfig config);
282 
283  /**
284  * Stores configuration of HTTPS Filtering
285  * @param config - configuration values
286  * @throws kerio::web::ApiException \n
287  * -32001 Session expired. - "The user is not logged in." \n
288  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
289  */
290  void setHttpsConfig(in HttpsConfig config);
291 
292  /**
293  * Returns configuration of SafeSearch
294  * @param config - configuration values
295  * @throws kerio::web::ApiException \n
296  * -32001 Session expired. - "The user is not logged in." \n
297  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
298  */
299  void getSafeSearchConfig(out SafeSearchConfig config);
300 
301  /**
302  * Stores configuration of SafeSearch
303  * @param config - configuration values
304  * @throws kerio::web::ApiException \n
305  * -32001 Session expired. - "The user is not logged in." \n
306  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
307  */
308  void setSafeSearchConfig(in SafeSearchConfig config);
309 
310  /**
311  * Clears cache of generated certificates for HTTPS inspection.
312  * @throws kerio::web::ApiException \n
313  * -32001 Session expired. - "The user is not logged in." \n
314  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
315  */
316  void clearHttpsCertCache();
317 };
318 }; //webadmin
Definition: ContentFilter.idl:27
Common Kerio Control structures, enums and types.
API for Kerio Control Users.
Definition: ContentFilter.idl:121
UserConditionType userType
Definition: ContentFilter.idl:140
Definition: ContentFilter.idl:35
Definition: Users.idl:91
Definition: ContentFilter.idl:147
Definition: ContentFilter.idl:132
Definition: ContentFilter.idl:97
Definition: ContentFilter.idl:158
Definition: ContentFilter.idl:152
Definition: ContentFilter.idl:16
Definition: common.idl:28
Definition: ContentFilter.idl:49
Definition: ContentFilter.idl:69
Definition: common.idl:36
Definition: ContentFilter.idl:185
Definition: Accounting.idl:11
UserReference user
Definition: ContentFilter.idl:141
Definition: SharedStructures.idl:289