Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
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 /**
142 * Front panel privileges have been changed
143 */
144 valueobject FrontPanelPrivilegesChanged extends event.UserEvent {
145 vector<string> oldPrivileges; ///< old front panel privileges
146 vector<string> newPrivileges; ///< new front panel privileges
147 };
148
149 /** %Security configuration interface */
150 interface Security {
151
152 constant int ERR_INVALID_VALUE = 1; ///< Invalid arguments
153
154 /**
155 * Retrieve the current state of the HTTP-to-HTTPS redirection.
156 *
157 * @return \c true if the HTTP-to-HTTPS redirection is enabled
158 */
160
161 /**
162 * Enable or disable HTTP-to-HTTPS redirection.
163 *
164 * @param http2httpsRedir \c true to enable the redirection
165 */
166 void setHttpRedirSettings(in boolean http2httpsRedir);
167
168 /**
169 * Check whether HTTP Strict Transport Security (HSTS) is enabled
170 *
171 * @return \c true when HSTS is enabled
172 */
173 boolean isHstsEnabled();
174
175 /**
176 * Enable or disable HTTP Strict Transport Security (HSTS).
177 *
178 * @param enable \c true to enable HSTS
179 */
180 void setHstsEnabled(in boolean enable);
181
182 /**
183 * Retrieve the IPv4 packet filter configuration.
184 *
185 * @return %IPv4 packet filter configuration
186 */
188
189 /**
190 * Set the IPv4 packet filter configuration.
191 *
192 * @param ipFw New packet filter settings
193 *
194 * @return 0 on success
195 * @return ERR_INVALID_VALUE if any argument was invalid
196 */
197 int setIpFwSettings(in IpFw ipFw);
198
199 /**
200 * Retrieve the IPv6 packet filter configuration.
201 *
202 * @return %IPv6 packet filter configuration
203 */
205
206 /**
207 * Set the IPv6 packet filter configuration.
208 *
209 * @param ipV6Fw New packet filter settings
210 *
211 * @return 0 on success
212 * @return ERR_INVALID_VALUE if any argument was invalid
213 */
214 int setIpV6FwSettings(in IpFw ipV6Fw);
215
216 /**
217 * Retrieve the role-base access control settings for IPv4.
218 *
219 * @return Role-based access control settings
220 */
222
223 /**
224 * Change the role-based access control settings.
225 *
226 * @param settings New settings
227 *
228 * @return 0 on success
229 * @return ERR_INVALID_VALUE if any argument was invalid
230 */
232
233 /**
234 * Retrieve the role-base access control settings for IPv6.
235 *
236 * @return Role-based access control settings
237 */
239
240 /**
241 * Change the role-based access control settings for IPv6.
242 *
243 * @param settings New settings
244 *
245 * @return 0 on success
246 * @return ERR_INVALID_VALUE if any argument was invalid
247 */
249
250 /**
251 * Retrieve the current user blocking settings
252 *
253 * @return User blocking settings
254 */
256
257 /**
258 * Change the user blocking settings.
259 *
260 * @param settings New settings
261 *
262 * @return 0 on success
263 * @return ERR_INVALID_VALUE if any argument was invalid
264 */
266
267 /**
268 * Retrieve the password settings.
269 *
270 * @return Password settings
271 */
273
274 /**
275 * Change the password settings.
276 *
277 * @param pwSettings New settings
278 *
279 * @return 0 on success
280 * @return ERR_INVALID_VALUE if any argument was invalid
281 */
282 int setPwSettings(in PasswordSettings pwSettings);
283
284 /**
285 * Retrieve the current idle timeout.
286 *
287 * @return Idle timeout in minutes
288 */
290
291 /**
292 * Change the session idle timeout.
293 *
294 * @param idleTimeout New idle timeout in minutes
295 *
296 * @return 0 on success
297 * @return ERR_INVALID_VALUE if any argument was invalid
298 */
299 int setIdleTimeoutSettings(in int idleTimeout);
300
301 /**
302 * Retrieve the current single-login limitation setting.
303 *
304 * @return \c true if single-login limitation is enabled
305 */
307
308 /**
309 * Enable or disable single login limitation.
310 *
311 * @param singleLogin \c true to enable single login limitation
312 */
313 void setSingleLoginLimitation(in boolean singleLogin);
314
315 /**
316 * Retrieve the current SSH settings
317 *
318 * @return SSH settings
319 */
321
322 /**
323 * Change the SSH settings
324 *
325 * @param settings New settings
326 */
327 void setSSHSettings(in SSHSettings settings);
328
329 /**
330 * Retrieve the host SSH keys
331 *
332 * @return SSH host keys
333 */
334 vector<SSHHostKey> getSSHHostKeys();
335
336 /**
337 * Retrieve the current Restricted Service Agreement settings
338 *
339 * @return Restricted Service Agreement settings
340 */
342
343 /**
344 * Change the Restricted Service Agreement settings
345 *
346 * @param settings New settings
347 *
348 * @return 0 on success
349 * @return ERR_INVALID_VALUE if any argument was invalid
350 */
352
353 /**
354 * Retrieve a list of supported privileges for the front panel
355 *
356 * @return List of privilege names
357 */
359
360 /**
361 * Retrieve the list of active front panel privileges
362 *
363 * @return List of privilege names
364 */
365 vector<string> getFrontPanelPrivileges();
366
367 /**
368 * Set the privileges for the front panel
369 *
370 * @return 0 on success
371 * @return ERR_INVALID_VALUE if any argument was invalid
372 */
373 int setFrontPanelPrivileges(in vector<string> privileges);
374
375 /**
376 * Set the default admin account password and optionally disable strong password requirements.
377 *
378 * The purpose of this method is to set the default admin account password when the device is
379 * unprovisioned, i.e. has not been configured yet or has been reset to factory defaults. The
380 * difference to the regular setAccountPassword() method in the User.idl is that this method
381 * allows to disable the strong password requirements at the same time. It allows choosing a
382 * weaker password in case strong password requirements are not needed for the specific purpose.
383 *
384 * @param password The new password
385 * @param disableStrongPasswordReq \c true to disable strong password requirements
386 * \c false to keep the current strong password requirement setting
387 *
388 * @return 0 OK
389 * @return 1 The new password has to differ from old password.
390 * @return 2 The password must not be empty.
391 * @return 3 The password is too short.
392 * @return 4 The password is too long.
393 * @return 5 The password must not contain control characters.
394 * @return 6 The password has to contain at least one lower case character.
395 * @return 7 The password has to contain at least one upper case character.
396 * @return 8 The password has to contain at least one numeric character.
397 * @return 9 The password has to contain at least one printable special character.
398 * @return 10 The password already is in history.
399 * @return 11 SNMPv3 USM is activated for the user and the password shall be used as auth passphrase.
400 * For this case, the password is too short (must be at least 8 characters).
401 */
402 int setDefaultAdminAccountPassword(in string password, in boolean disableStrongPasswordReq);
403
404 /**
405 * Set the password hash for the admin user. Naturally, this circumvents
406 * checks for password complexity requirements and the password history,
407 * since we only receive the salted hash of a password.
408 *
409 * This method is only allowed on link units when called by the primary unit.
410 *
411 * @return 0 OK
412 * @return 2 The password hash must not be empty.
413 */
414 int setAdminAccountPasswordHash(in string passwordHash);
415
416 /**
417 * Check whether secure boot is active.
418 *
419 * ATTENTION: There are some uncertainties involved here. It is possible that it reports secure boot
420 * active while it isn't. Theoretically also the opposite is possible. For that reason
421 * the result of this function may not be used to reduce any security checks!
422 *
423 * @return \c true if secure boot is active
424 */
426
427 /**
428 * Return information about an installed Secure Element.
429 *
430 * The name getTpmInfo is kept for backward compatibility.
431 *
432 * @return Secure Element information
433 */
435
436 /**
437 * Get active FIPS settings.
438 *
439 * @return Active FIPS settings
440 */
442
443 /**
444 * Get persistent FIPS settings.
445 *
446 * Those settings are applied on next boot and may differ from currently active settings.
447 *
448 * @return Persistent FIPS settings
449 */
451
452 /**
453 * Set persistent FIPS settings.
454 *
455 * Those settings are applied on next boot and may differ from currently active settings.
456 *
457 * @param settings new persistent FIPS settings
458 */
460
461 };
462
463}
Security configuration interface
Definition Security.idl:150
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.
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:144
vector< string > oldPrivileges
old front panel privileges
Definition Security.idl:145
vector< string > newPrivileges
new front panel privileges
Definition Security.idl:146
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
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