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 /** Information about Trusted Platform Module */
117 structure TpmInfo {
118 boolean detected;
119 };
120
121 /**
122 * This Event is emitted after any of the password-settings
123 * has been changed
124 */
125 valueobject PasswordSettingsChanged extends event.UserEvent {
126 PasswordSettings oldSettings;
127 PasswordSettings newSettings;
128 };
129
130 /**
131 * Front panel privileges have been changed
132 */
133 valueobject FrontPanelPrivilegesChanged extends event.UserEvent {
134 vector<string> oldPrivileges; ///< old front panel privileges
135 vector<string> newPrivileges; ///< new front panel privileges
136 };
137
138 /** %Security configuration interface */
139 interface Security {
140
141 constant int ERR_INVALID_VALUE = 1; ///< Invalid arguments
142
143 /**
144 * Retrieve the current state of the HTTP-to-HTTPS redirection.
145 *
146 * @return \c true if the HTTP-to-HTTPS redirection is enabled
147 */
149
150 /**
151 * Enable or disable HTTP-to-HTTPS redirection.
152 *
153 * @param http2httpsRedir \c true to enable the redirection
154 */
155 void setHttpRedirSettings(in boolean http2httpsRedir);
156
157 /**
158 * Check whether HTTP Strict Transport Security (HSTS) is enabled
159 *
160 * @return \c true when HSTS is enabled
161 */
162 boolean isHstsEnabled();
163
164 /**
165 * Enable or disable HTTP Strict Transport Security (HSTS).
166 *
167 * @param enable \c true to enable HSTS
168 */
169 void setHstsEnabled(in boolean enable);
170
171 /**
172 * Retrieve the IPv4 packet filter configuration.
173 *
174 * @return %IPv4 packet filter configuration
175 */
177
178 /**
179 * Set the IPv4 packet filter configuration.
180 *
181 * @param ipFw New packet filter settings
182 *
183 * @return 0 on success
184 * @return ERR_INVALID_VALUE if any argument was invalid
185 */
186 int setIpFwSettings(in IpFw ipFw);
187
188 /**
189 * Retrieve the IPv6 packet filter configuration.
190 *
191 * @return %IPv6 packet filter configuration
192 */
194
195 /**
196 * Set the IPv6 packet filter configuration.
197 *
198 * @param ipV6Fw New packet filter settings
199 *
200 * @return 0 on success
201 * @return ERR_INVALID_VALUE if any argument was invalid
202 */
203 int setIpV6FwSettings(in IpFw ipV6Fw);
204
205 /**
206 * Retrieve the role-base access control settings for IPv4.
207 *
208 * @return Role-based access control settings
209 */
211
212 /**
213 * Change the role-based access control settings.
214 *
215 * @param settings New settings
216 *
217 * @return 0 on success
218 * @return ERR_INVALID_VALUE if any argument was invalid
219 */
221
222 /**
223 * Retrieve the role-base access control settings for IPv6.
224 *
225 * @return Role-based access control settings
226 */
228
229 /**
230 * Change the role-based access control settings for IPv6.
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 current user blocking settings
241 *
242 * @return User blocking settings
243 */
245
246 /**
247 * Change the user blocking settings.
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 password settings.
258 *
259 * @return Password settings
260 */
262
263 /**
264 * Change the password settings.
265 *
266 * @param pwSettings New settings
267 *
268 * @return 0 on success
269 * @return ERR_INVALID_VALUE if any argument was invalid
270 */
271 int setPwSettings(in PasswordSettings pwSettings);
272
273 /**
274 * Retrieve the current idle timeout.
275 *
276 * @return Idle timeout in minutes
277 */
279
280 /**
281 * Change the session idle timeout.
282 *
283 * @param idleTimeout New idle timeout in minutes
284 *
285 * @return 0 on success
286 * @return ERR_INVALID_VALUE if any argument was invalid
287 */
288 int setIdleTimeoutSettings(in int idleTimeout);
289
290 /**
291 * Retrieve the current single-login limitation setting.
292 *
293 * @return \c true if single-login limitation is enabled
294 */
296
297 /**
298 * Enable or disable single login limitation.
299 *
300 * @param singleLogin \c true to enable single login limitation
301 */
302 void setSingleLoginLimitation(in boolean singleLogin);
303
304 /**
305 * Retrieve the current SSH settings
306 *
307 * @return SSH settings
308 */
310
311 /**
312 * Change the SSH settings
313 *
314 * @param settings New settings
315 */
316 void setSSHSettings(in SSHSettings settings);
317
318 /**
319 * Retrieve the host SSH keys
320 *
321 * @return SSH host keys
322 */
323 vector<SSHHostKey> getSSHHostKeys();
324
325 /**
326 * Retrieve the current Restricted Service Agreement settings
327 *
328 * @return Restricted Service Agreement settings
329 */
331
332 /**
333 * Change the Restricted Service Agreement settings
334 *
335 * @param settings New settings
336 *
337 * @return 0 on success
338 * @return ERR_INVALID_VALUE if any argument was invalid
339 */
341
342 /**
343 * Retrieve a list of supported privileges for the front panel
344 *
345 * @return List of privilege names
346 */
348
349 /**
350 * Retrieve the list of active front panel privileges
351 *
352 * @return List of privilege names
353 */
354 vector<string> getFrontPanelPrivileges();
355
356 /**
357 * Set the privileges for the front panel
358 *
359 * @return 0 on success
360 * @return ERR_INVALID_VALUE if any argument was invalid
361 */
362 int setFrontPanelPrivileges(in vector<string> privileges);
363
364 /**
365 * Set the default admin account password and optionally disable strong password requirements.
366 *
367 * The purpose of this method is to set the default admin account password when the device is
368 * unprovisioned, i.e. has not been configured yet or has been reset to factory defaults. The
369 * difference to the regular setAccountPassword() method in the User.idl is that this method
370 * allows to disable the strong password requirements at the same time. It allows choosing a
371 * weaker password in case strong password requirements are not needed for the specific purpose.
372 *
373 * @param password The new password
374 * @param disableStrongPasswordReq \c true to disable strong password requirements
375 * \c false to keep the current strong password requirement setting
376 *
377 * @return 0 OK
378 * @return 1 The new password has to differ from old password.
379 * @return 2 The password must not be empty.
380 * @return 3 The password is too short.
381 * @return 4 The password is too long.
382 * @return 5 The password must not contain control characters.
383 * @return 6 The password has to contain at least one lower case character.
384 * @return 7 The password has to contain at least one upper case character.
385 * @return 8 The password has to contain at least one numeric character.
386 * @return 9 The password has to contain at least one printable special character.
387 * @return 10 The password already is in history.
388 * @return 11 SNMPv3 USM is activated for the user and the password shall be used as auth passphrase.
389 * For this case, the password is too short (must be at least 8 characters).
390 */
391 int setDefaultAdminAccountPassword(in string password, in boolean disableStrongPasswordReq);
392
393 /**
394 * Check whether secure boot is active.
395 *
396 * ATTENTION: There are some uncertainties involved here. It is possible that it reports secure boot
397 * active while it isn't. Theoretically also the opposite is possible. For that reason
398 * the result of this function may not be used to reduce any security checks!
399 *
400 * @return \c true if secure boot is active
401 */
403
404 /**
405 * Return information about an installed Trusted Platform Module (TPM).
406 *
407 * @return TPM information
408 */
410
411 };
412
413}
Security configuration interface
Definition: Security.idl:139
int setIpV6FwSettings(in IpFw ipV6Fw)
Set the IPv6 packet filter configuration.
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.
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 Trusted Platform Module (TPM).
void setHstsEnabled(in boolean enable)
Enable or disable HTTP Strict Transport Security (HSTS).
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.
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
Front panel privileges have been changed.
Definition: Security.idl:133
vector< string > oldPrivileges
old front panel privileges
Definition: Security.idl:134
vector< string > newPrivileges
new front panel privileges
Definition: Security.idl:135
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:125
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 Trusted Platform Module.
Definition: Security.idl:117