Cisco Cisco Firepower Management Center 4000 Entwickleranleitung

Seite von 60
 
3-9
FireSIGHT System Remediation API Guide
 
Chapter 3      Communicating with the Remediation Subsystem
  Defining the Configuration Template
The following table describes child elements available to the 
string
 element.
The following portion of a 
config_template
 element definition indicates that the web interface displays 
a field labeled “Username”, which accepts a string value that is at least eight characters long and does 
not use white spaces.
<string>
<name>user_name</name>
<display_name>Username</display_name>
<constraints>
<min_length>8</min_length>
<pcre>\S+</pcre>
</constraints
</string>
The password Element
Each 
password
 element you use in a 
config_template
 represents a field in the web interface that accepts 
a string comprised of alphanumeric characters.
Table 3-4
string Attributes, Child Elements, and Grandchild Elements 
Name
Type
Description
Required?
required
attribute
Indicates whether users must provide a value in the field.
This attribute defaults to 
true
. You are not required to use this 
attribute. Therefore, if you do not use it (or if you explicitly set its 
value to 
true
), users must provide a value. If you set the value of the 
attribute to 
false
, the web interface indicates that providing a value 
is optional.
no
name
element
Provides context to the remediation module for the value entered in 
the field. Names may not contain white space and may only contain 
alphanumeric characters and the underscore (_) and dash (-) 
character.Names should be unique within a module. 
yes
display_name
element
Specifies the web interface label for this field.
yes
default_value
element
Specifies the default value for this field.If the web interface user does 
not specify a value, the remediation program uses this value by 
default. 
no
example
element
Provides an example of the input that the remediation module 
expects to receive. 
Note
This value is not displayed in the web interface.
no
constraints
element
Constrains the values that the user can enter in this field.
The 
constraints
 element has three child elements: 
min_length
max
_
length
 and 
pcre
. The 
min_length
 and 
max_length
 elements are 
optional, single-occurrence child elements that accept integer values 
and specify a range for the acceptable length of string values. The 
pcre
 element is optional; use it to specify a Perl-compatible regular 
expression that provides additional constraints.
no