Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2
Loading...
Searching...
No Matches
Security.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2009 Raritan Inc. All rights reserved.
4 */
5
6#include <UserEvent.idl>
7
8/**
9 * %Security Configuration
10 */
11module security {
12
13 /** IP packet filter policy */
14 enumeration IpfwPolicy {
15 ACCEPT, ///< Accept the packet
16 DROP, ///< Silently discard the packet
17 REJECT ///< Discard packet, send error response
18 };
19
20 /** IP packet filter rule */
21 structure IpfwRule {
22 string ipMask; ///< Remote IP and network mask
23 IpfwPolicy policy; ///< Filter policy
24 };
25
26 /** IP packet filter configuration */
27 structure IpFw {
28 boolean enabled; ///< \c true to enable packet filtering
29 IpfwPolicy defaultPolicyIn; ///< The default policy for inbound traffic in case no rule matches
30 IpfwPolicy defaultPolicyOut; ///< The default policy for outbound traffic in case no rule matches
31 vector<IpfwRule> ruleSetIn; ///< Ordered list of inbound firewall rules
32 vector<IpfwRule> ruleSetOut; ///< Ordered list of outbound firewall rules
33 };
34
35 /** Role-based access policy */
36 enumeration RoleAccessPolicy {
37 ALLOW, ///< Access granted
38 DENY ///< Access denied
39 };
40
41 /** Role-based access rule */
42 structure RoleAccessRule {
43 string startIp; ///< Start of IP range
44 string endIp; ///< End of IP range
45 int roleId; ///< Role id
46 RoleAccessPolicy policy; ///< Access policy
47 };
48
49 /** Role-based access control settings */
51 boolean enabled; ///< \c true to enable role-based access control
52 RoleAccessPolicy defaultPolicy; ///< Default policy
53 vector<RoleAccessRule> rules; ///< List of access rules
54 };
55
56 /** User blocking settings */
57 structure BlockSettings {
58 int maxFailedLogins; ///< The number of failed logins before blocking a user
59 int blockTimeout; ///< Time (in minutes) the account will be blocked
60 int failedLoginTimeout; ///< Time (in minutes) before resetting the failure counter
61 };
62
63 /** Password settings */
64 structure PasswordSettings {
65 boolean enableAging; ///< \c true to enable password aging
66 int agingInterval; ///< Aging interval in days
67 boolean enableStrongReq; ///< \c true to enable strong password requirements
68 int minPwLength; ///< Minimum password length
69 int maxPwLength; ///< Maximum password length
70 boolean enforceLower; ///< Passwords must contain at least one lower case character
71 boolean enforceUpper; ///< Passwords must contain at least one upper case character
72 boolean enforceNumeric; ///< Passwords must contain at least one numeric character
73 boolean enforceSpecial; ///< Passwords must contain at least one special character
74 int pwHistoryDepth; ///< Number of entries in password history
75 };
76
77 /** SSH authentication settings */
78 structure SSHSettings {
79 boolean allowPasswordAuth; ///< Allow password authentication
80 boolean allowPublicKeyAuth; ///< Allow public key authentication
81 };
82
83 /** Type of SSH host key */
84 enumeration SSHHostKeyType {
85 SSH_HOST_KEY_TYPE_RSA,
86 SSH_HOST_KEY_TYPE_ECDSA,
87 SSH_HOST_KEY_TYPE_ED25519
88 };
89
90 /** Type of SSH key fingerprint */
92 SSH_KEY_FPRINT_TYPE_MD5_HEX,
93 SSH_KEY_FPRINT_TYPE_SHA256_BASE64,
94 SSH_KEY_FPRINT_TYPE_UNKNOWN
95 };
96
97 /** Fingerprints of SSH host key */
99 string fingerprint; ///< Fingerprint of SSH key
100 SSHKeyFingerprintType type; ///< Type of fingerprint
101 };
102
103 /** SSH host keys */
104 structure SSHHostKey {
105 string key; ///< Public key
106 SSHHostKeyType type; ///< Type of public key
107 vector<SSHKeyFingerprint> fingerprints; ///< Fingerprints of public key
108 };
109
110 /** Restricted Service Agreement settings */
112 boolean enabled; ///< Enforce Restricted Service Agreement
113 string banner; ///< Restricted Service Agreement Banner
114 };
115
116 /**
117 * Information about an installed Secure Element
118 *
119 * The name TpmInfo is kept for backward compatibility.
120 */
121 structure TpmInfo {
122 boolean detected;
123 };
124
125 /**
126 * FIPS settings
127 */
128 structure FipsSettings {
129 boolean enabled; ///< FIPS mode enabled state
130 };
131
132 /**
133 * This Event is emitted after any of the password-settings
134 * has been changed
135 */
136 valueobject PasswordSettingsChanged extends event.UserEvent {
137 PasswordSettings oldSettings;
138 PasswordSettings newSettings;
139 };
140
141 /** Event: The RestrictedServiceAgreement has changed */
142 valueobject RestrictedServiceAgreementChanged extends event.UserEvent {
143 RestrictedServiceAgreement oldSettings;
144 RestrictedServiceAgreement newSettings;
145 };
146
147 /**
148 * Front panel privileges have been changed
149 */
150 valueobject FrontPanelPrivilegesChanged extends event.UserEvent {
151 vector<string> oldPrivileges; ///< old front panel privileges
152 vector<string> newPrivileges; ///< new front panel privileges
153 };
154
155 /** %Security configuration interface */
156 interface Security {
157
158 constant int ERR_INVALID_VALUE = 1; ///< Invalid arguments
159
160 /**
161 * Retrieve the current state of the HTTP-to-HTTPS redirection.
162 *
163 * @return \c true if the HTTP-to-HTTPS redirection is enabled
164 */
166
167 /**
168 * Enable or disable HTTP-to-HTTPS redirection.
169 *
170 * @param http2httpsRedir \c true to enable the redirection
171 */
172 void setHttpRedirSettings(in boolean http2httpsRedir);
173
174 /**
175 * Check whether HTTP Strict Transport Security (HSTS) is enabled
176 *
177 * @return \c true when HSTS is enabled
178 */
179 boolean isHstsEnabled();
180
181 /**
182 * Enable or disable HTTP Strict Transport Security (HSTS).
183 *
184 * @param enable \c true to enable HSTS
185 */
186 void setHstsEnabled(in boolean enable);
187
188 /**
189 * Retrieve the IPv4 packet filter configuration.
190 *
191 * @return %IPv4 packet filter configuration
192 */
194
195 /**
196 * Set the IPv4 packet filter configuration.
197 *
198 * @param ipFw New packet filter settings
199 *
200 * @return 0 on success
201 * @return ERR_INVALID_VALUE if any argument was invalid
202 */
203 int setIpFwSettings(in IpFw ipFw);
204
205 /**
206 * Retrieve the IPv6 packet filter configuration.
207 *
208 * @return %IPv6 packet filter configuration
209 */
211
212 /**
213 * Set the IPv6 packet filter configuration.
214 *
215 * @param ipV6Fw New packet filter settings
216 *
217 * @return 0 on success
218 * @return ERR_INVALID_VALUE if any argument was invalid
219 */
220 int setIpV6FwSettings(in IpFw ipV6Fw);
221
222 /**
223 * Retrieve the role-base access control settings for IPv4.
224 *
225 * @return Role-based access control settings
226 */
228
229 /**
230 * Change the role-based access control settings.
231 *
232 * @param settings New settings
233 *
234 * @return 0 on success
235 * @return ERR_INVALID_VALUE if any argument was invalid
236 */
238
239 /**
240 * Retrieve the role-base access control settings for IPv6.
241 *
242 * @return Role-based access control settings
243 */
245
246 /**
247 * Change the role-based access control settings for IPv6.
248 *
249 * @param settings New settings
250 *
251 * @return 0 on success
252 * @return ERR_INVALID_VALUE if any argument was invalid
253 */
255
256 /**
257 * Retrieve the current user blocking settings
258 *
259 * @return User blocking settings
260 */
262
263 /**
264 * Change the user blocking settings.
265 *
266 * @param settings New settings
267 *
268 * @return 0 on success
269 * @return ERR_INVALID_VALUE if any argument was invalid
270 */
272
273 /**
274 * Retrieve the password settings.
275 *
276 * @return Password settings
277 */
279
280 /**
281 * Change the password settings.
282 *
283 * @param pwSettings New settings
284 *
285 * @return 0 on success
286 * @return ERR_INVALID_VALUE if any argument was invalid
287 */
288 int setPwSettings(in PasswordSettings pwSettings);
289
290 /**
291 * Retrieve the current idle timeout.
292 *
293 * @return Idle timeout in minutes
294 */
296
297 /**
298 * Change the session idle timeout.
299 *
300 * @param idleTimeout New idle timeout in minutes
301 *
302 * @return 0 on success
303 * @return ERR_INVALID_VALUE if any argument was invalid
304 */
305 int setIdleTimeoutSettings(in int idleTimeout);
306
307 /**
308 * Retrieve the current single-login limitation setting.
309 *
310 * @return \c true if single-login limitation is enabled
311 */
313
314 /**
315 * Enable or disable single login limitation.
316 *
317 * @param singleLogin \c true to enable single login limitation
318 */
319 void setSingleLoginLimitation(in boolean singleLogin);
320
321 /**
322 * Retrieve the current SSH settings
323 *
324 * @return SSH settings
325 */
327
328 /**
329 * Change the SSH settings
330 *
331 * @param settings New settings
332 */
333 void setSSHSettings(in SSHSettings settings);
334
335 /**
336 * Retrieve the host SSH keys
337 *
338 * @return SSH host keys
339 */
340 vector<SSHHostKey> getSSHHostKeys();
341
342 /**
343 * Retrieve the current Restricted Service Agreement settings
344 *
345 * @return Restricted Service Agreement settings
346 */
348
349 /**
350 * Change the Restricted Service Agreement settings
351 *
352 * @param settings New settings
353 *
354 * @return 0 on success
355 * @return ERR_INVALID_VALUE if any argument was invalid
356 */
358
359 /**
360 * Retrieve a list of supported privileges for the front panel
361 *
362 * @return List of privilege names
363 */
365
366 /**
367 * Retrieve the list of active front panel privileges
368 *
369 * @return List of privilege names
370 */
371 vector<string> getFrontPanelPrivileges();
372
373 /**
374 * Set the privileges for the front panel
375 *
376 * @return 0 on success
377 * @return ERR_INVALID_VALUE if any argument was invalid
378 */
379 int setFrontPanelPrivileges(in vector<string> privileges);
380
381 /**
382 * Set the default admin account password and optionally disable strong password requirements.
383 *
384 * The purpose of this method is to set the default admin account password when the device is
385 * unprovisioned, i.e. has not been configured yet or has been reset to factory defaults. The
386 * difference to the regular setAccountPassword() method in the User.idl is that this method
387 * allows to disable the strong password requirements at the same time. It allows choosing a
388 * weaker password in case strong password requirements are not needed for the specific purpose.
389 *
390 * @param password The new password
391 * @param disableStrongPasswordReq \c true to disable strong password requirements
392 * \c false to keep the current strong password requirement setting
393 *
394 * @return 0 OK
395 * @return 1 The new password has to differ from old password.
396 * @return 2 The password must not be empty.
397 * @return 3 The password is too short.
398 * @return 4 The password is too long.
399 * @return 5 The password must not contain control characters.
400 * @return 6 The password has to contain at least one lower case character.
401 * @return 7 The password has to contain at least one upper case character.
402 * @return 8 The password has to contain at least one numeric character.
403 * @return 9 The password has to contain at least one printable special character.
404 * @return 10 The password already is in history.
405 * @return 11 SNMPv3 USM is activated for the user and the password shall be used as auth passphrase.
406 * For this case, the password is too short (must be at least 8 characters).
407 */
408 int setDefaultAdminAccountPassword(in string password, in boolean disableStrongPasswordReq);
409
410 /**
411 * Set the password hash for the admin user. Naturally, this circumvents
412 * checks for password complexity requirements and the password history,
413 * since we only receive the salted hash of a password.
414 *
415 * This method is only allowed on link units when called by the primary unit.
416 *
417 * @return 0 OK
418 * @return 2 The password hash must not be empty.
419 */
420 int setAdminAccountPasswordHash(in string passwordHash);
421
422 /**
423 * Check whether secure boot is active.
424 *
425 * ATTENTION: There are some uncertainties involved here. It is possible that it reports secure boot
426 * active while it isn't. Theoretically also the opposite is possible. For that reason
427 * the result of this function may not be used to reduce any security checks!
428 *
429 * @return \c true if secure boot is active
430 */
432
433 /**
434 * Return information about an installed Secure Element.
435 *
436 * The name getTpmInfo is kept for backward compatibility.
437 *
438 * @return Secure Element information
439 */
441
442 /**
443 * Get active FIPS settings.
444 *
445 * @return Active FIPS settings
446 */
448
449 /**
450 * Get persistent FIPS settings.
451 *
452 * Those settings are applied on next boot and may differ from currently active settings.
453 *
454 * @return Persistent FIPS settings
455 */
457
458 /**
459 * Set persistent FIPS settings.
460 *
461 * Those settings are applied on next boot and may differ from currently active settings.
462 *
463 * @param settings new persistent FIPS settings
464 */
466
467 };
468
469}
Security configuration interface
Definition Security.idl:156
int setIpV6FwSettings(in IpFw ipV6Fw)
Set the IPv6 packet filter configuration.
void setPersistentFipsSettings(in FipsSettings settings)
Set persistent FIPS settings.
BlockSettings getBlockSettings()
Retrieve the current user blocking settings.
constant int ERR_INVALID_VALUE
Invalid arguments.
Definition Security.idl:158
boolean getHttpRedirSettings()
Retrieve the current state of the HTTP-to-HTTPS redirection.
void setSingleLoginLimitation(in boolean singleLogin)
Enable or disable single login limitation.
int setRoleAccessControlSettingsV6(in RoleAccessControl settings)
Change the role-based access control settings for IPv6.
FipsSettings getActiveFipsSettings()
Get active FIPS settings.
boolean isHstsEnabled()
Check whether HTTP Strict Transport Security (HSTS) is enabled.
boolean getSingleLoginLimitation()
Retrieve the current single-login limitation setting.
int setDefaultAdminAccountPassword(in string password, in boolean disableStrongPasswordReq)
Set the default admin account password and optionally disable strong password requirements.
TpmInfo getTpmInfo()
Return information about an installed Secure Element.
void setHstsEnabled(in boolean enable)
Enable or disable HTTP Strict Transport Security (HSTS).
FipsSettings getPersistentFipsSettings()
Get persistent FIPS settings.
PasswordSettings getPwSettings()
Retrieve the password settings.
vector< string > getSupportedFrontPanelPrivileges()
Retrieve a list of supported privileges for the front panel.
int setIdleTimeoutSettings(in int idleTimeout)
Change the session idle timeout.
vector< string > getFrontPanelPrivileges()
Retrieve the list of active front panel privileges.
int setIpFwSettings(in IpFw ipFw)
Set the IPv4 packet filter configuration.
void setSSHSettings(in SSHSettings settings)
Change the SSH settings.
vector< SSHHostKey > getSSHHostKeys()
Retrieve the host SSH keys.
IpFw getIpFwSettings()
Retrieve the IPv4 packet filter configuration.
RoleAccessControl getRoleAccessControlSettings()
Retrieve the role-base access control settings for IPv4.
boolean isSecureBootActive()
Check whether secure boot is active.
void setHttpRedirSettings(in boolean http2httpsRedir)
Enable or disable HTTP-to-HTTPS redirection.
int setRestrictedServiceAgreement(in RestrictedServiceAgreement settings)
Change the Restricted Service Agreement settings.
int setRoleAccessControlSettings(in RoleAccessControl settings)
Change the role-based access control settings.
int setPwSettings(in PasswordSettings pwSettings)
Change the password settings.
RoleAccessControl getRoleAccessControlSettingsV6()
Retrieve the role-base access control settings for IPv6.
int getIdleTimeoutSettings()
Retrieve the current idle timeout.
IpFw getIpV6FwSettings()
Retrieve the IPv6 packet filter configuration.
int setAdminAccountPasswordHash(in string passwordHash)
Set the password hash for the admin user.
SSHSettings getSSHSettings()
Retrieve the current SSH settings.
int setFrontPanelPrivileges(in vector< string > privileges)
Set the privileges for the front panel.
int setBlockSettings(in BlockSettings settings)
Change the user blocking settings.
RestrictedServiceAgreement getRestrictedServiceAgreement()
Retrieve the current Restricted Service Agreement settings.
Security Configuration
Definition Security.idl:11
SSHHostKeyType
Type of SSH host key.
Definition Security.idl:84
RoleAccessPolicy
Role-based access policy.
Definition Security.idl:36
@ DENY
Access denied.
Definition Security.idl:38
@ ALLOW
Access granted.
Definition Security.idl:37
IpfwPolicy
IP packet filter policy.
Definition Security.idl:14
@ REJECT
Discard packet, send error response.
Definition Security.idl:17
@ DROP
Silently discard the packet.
Definition Security.idl:16
@ ACCEPT
Accept the packet.
Definition Security.idl:15
SSHKeyFingerprintType
Type of SSH key fingerprint.
Definition Security.idl:91
User blocking settings.
Definition Security.idl:57
int maxFailedLogins
The number of failed logins before blocking a user.
Definition Security.idl:58
int failedLoginTimeout
Time (in minutes) before resetting the failure counter.
Definition Security.idl:60
int blockTimeout
Time (in minutes) the account will be blocked.
Definition Security.idl:59
boolean enabled
FIPS mode enabled state.
Definition Security.idl:129
Front panel privileges have been changed.
Definition Security.idl:150
vector< string > oldPrivileges
old front panel privileges
Definition Security.idl:151
vector< string > newPrivileges
new front panel privileges
Definition Security.idl:152
IP packet filter configuration.
Definition Security.idl:27
boolean enabled
true to enable packet filtering
Definition Security.idl:28
vector< IpfwRule > ruleSetOut
Ordered list of outbound firewall rules.
Definition Security.idl:32
vector< IpfwRule > ruleSetIn
Ordered list of inbound firewall rules.
Definition Security.idl:31
IpfwPolicy defaultPolicyIn
The default policy for inbound traffic in case no rule matches.
Definition Security.idl:29
IpfwPolicy defaultPolicyOut
The default policy for outbound traffic in case no rule matches.
Definition Security.idl:30
IP packet filter rule.
Definition Security.idl:21
IpfwPolicy policy
Filter policy.
Definition Security.idl:23
string ipMask
Remote IP and network mask.
Definition Security.idl:22
This Event is emitted after any of the password-settings has been changed.
Definition Security.idl:136
Password settings.
Definition Security.idl:64
boolean enableStrongReq
true to enable strong password requirements
Definition Security.idl:67
boolean enableAging
true to enable password aging
Definition Security.idl:65
boolean enforceSpecial
Passwords must contain at least one special character.
Definition Security.idl:73
boolean enforceNumeric
Passwords must contain at least one numeric character.
Definition Security.idl:72
int pwHistoryDepth
Number of entries in password history.
Definition Security.idl:74
boolean enforceUpper
Passwords must contain at least one upper case character.
Definition Security.idl:71
int maxPwLength
Maximum password length.
Definition Security.idl:69
int agingInterval
Aging interval in days.
Definition Security.idl:66
boolean enforceLower
Passwords must contain at least one lower case character.
Definition Security.idl:70
int minPwLength
Minimum password length.
Definition Security.idl:68
Event: The RestrictedServiceAgreement has changed.
Definition Security.idl:142
Restricted Service Agreement settings.
Definition Security.idl:111
string banner
Restricted Service Agreement Banner.
Definition Security.idl:113
boolean enabled
Enforce Restricted Service Agreement.
Definition Security.idl:112
Role-based access control settings.
Definition Security.idl:50
RoleAccessPolicy defaultPolicy
Default policy.
Definition Security.idl:52
boolean enabled
true to enable role-based access control
Definition Security.idl:51
vector< RoleAccessRule > rules
List of access rules.
Definition Security.idl:53
Role-based access rule.
Definition Security.idl:42
RoleAccessPolicy policy
Access policy.
Definition Security.idl:46
string endIp
End of IP range.
Definition Security.idl:44
string startIp
Start of IP range.
Definition Security.idl:43
SSH host keys.
Definition Security.idl:104
string key
Public key.
Definition Security.idl:105
vector< SSHKeyFingerprint > fingerprints
Fingerprints of public key.
Definition Security.idl:107
SSHHostKeyType type
Type of public key.
Definition Security.idl:106
Fingerprints of SSH host key.
Definition Security.idl:98
SSHKeyFingerprintType type
Type of fingerprint.
Definition Security.idl:100
string fingerprint
Fingerprint of SSH key.
Definition Security.idl:99
SSH authentication settings.
Definition Security.idl:78
boolean allowPasswordAuth
Allow password authentication.
Definition Security.idl:79
boolean allowPublicKeyAuth
Allow public key authentication.
Definition Security.idl:80
Information about an installed Secure Element.
Definition Security.idl:121