fmsconf Server Configuration Utility

Command Line Utility to administer and report on the FMS server. This utility permits an adminstrator to remotely (or locally) send commands to FMS servers and can be used for scripting server administration tasks without user intervention and/or to create customised server management utilities with similiar functionality to the FMC.

fmsconf utility uses default user login credentials of admin and password admin to connect to the FMS server. Ensure that the necessary credentials are configured prior to connecting to the server as described in section the Section called Admin User Creation in the Chapter called Configuring FMS.

The following commands may be supplied using fmsconf '-x admin_command' option

fmsconf Requirements

The fmsconf utility uses the following freely available programs which are typically available on any Linux system.

fmsconf Administrator Configuration

An Administrator listener connection must be configured and enabled in the FMS configuration file. The Administrator configuration is automatically generated and may be adjusted to look similar to the following sample.

\
\<cc:listener>
\  <cc:name>Administration</cc:name>
\  <cc:className>com.flame.connection.impl.admin.Admin</cc:className>
\  <cc:aliasRef cc:keystoreID="administrator">
\    <cc:alias>fmsrns</cc:alias>
\    <cc:password>fmsrns</cc:password>
\  </cc:aliasRef>
\  <prop:Properties>
\    <prop:comment>Configuration options for com.flame.connection.impl.admin.Admin</prop:comment>
\    <prop:entry prop:key="HOST">yourdomain.com</prop:entry>
\    <prop:entry prop:key="MAXIMUM_CONCURRENT_CONNECTIONS">1</prop:entry>
\    <prop:entry prop:key="READ_TIMEOUT">0</prop:entry>
\    <prop:entry prop:key="USE_SSL">true</prop:entry>
\    <prop:entry prop:key="MOTD"><html>Welcome to the FMS Management Console<br><br> \
\      Server listening: %2$s<br>Connection: %1$s@%3$s<br><br> \
\      Server Started: %4$tc<br>Uptime: %5$ts seconds</html></prop:entry>
\    <prop:entry prop:key="SSL_NEED_CLIENT_AUTH">false</prop:entry>
\    <prop:entry prop:key="PORT">29360</prop:entry>
\    <prop:entry prop:key="LOG4J_PATTERN">%-5p [%t]: %m%n</prop:entry>
\  </prop:Properties>
\</cc:listener>
\<cc:acl cc:order="allow_deny"/>
\
\        

The keystore configuration is automatically generated at system initialisation and may be adjusted to conform to deployment requirements as follows

\
\<cc:keystoreRef cc:ID="administrator">
\  <cc:name>admin.jks</cc:name>
\  <cc:type>JKS</cc:type>
\  <cc:pass>mypassword</cc:pass>
\</cc:keystoreRef>
\
\        

fmsconf Administrator User

An Administrator user must also be configured on the server. This should be done as per the instructions in the Section called Admin User Creation in the Chapter called Configuring FMS.

fmsconf Administrator Certificates

If the Admin listener configuration USE_SSL and SSL_NEED_CLIENT_AUTH properties are set to 'true' then before using fmsconf to connect to the FMS server the necessary key and certificates must be created. The public certificate must be imported into the FMS Administrator listener truststore (admin.jks) as defined above.

This may be done by creating the private key in file mcpriv.pem, and public certificate in file mcpub.pem as per the following instructions.

\
\              openssl genrsa -out mcpriv.pem 1024
\              openssl req -new -x509 -key mcpriv.pem -out mcpub.pem -days 1095
\
\        

where mcpriv.pem is the private key and mcpub.pem is the public certificate to use when connecting to FMS.

Import mcpub.pem into the FMS truststore as follows

\
\keytool -import -keystore server/admin.jks -storepass changeit -file mcpub.pem -alias admin
\
\        

Note: Ensure that the FMS truststore contains a private key else admin ssl connection will cause the following problem

\
\140735140426592:error:14094410:SSL routines:ssl3_read_bytes:sslv3 \
\  alert handshake failure:s3_pkt.c:1472:SSL alert number 40
\140735140426592:error:1409E0E5:SSL routines:ssl3_write_bytes: \
\  ssl handshake failure:s3_pkt.c:656:
\
\        

which may be done as follows.

\
\              keytool -genkeypair -keyalg RSA -validity 365 -keystore /home/fms/admin.jks  -storepass 123456 -keypass fmsrns -alias myalias
\
\        

Refer to the Section called Keystore Setup and Examples in the Chapter called Installation for further details on key and certificate generation for FMS.

fmsconf Usage

Invoke the fmsconf utility as follows to see the usage

\
\fmsconf -?
\fmsconf: invalid option -- '?'
\Usage: fmsconf [-d] [-c public_certificate_file] [-h fms_host] [-k private_key_file] [-P fms_host_admin_port] [-p password] [-u admin_username] [-x admin_command] [-H]
\  where
\    -d optional - switch debug to s_client on
\    -c /path/to/public_certificate_file - only required if the client authentication property 'SSL_NEED_CLIENT_AUTH' is set to 'true' for the admin listener in the server configuration
\    -h host - optional - defaults to xenialmac
\    -H : optional - displays help information
\    -k /path/to/public_key_file - only required if the client authentication property 'SSL_NEED_CLIENT_AUTH' is set to 'true' for the admin listener in the server configuration
\    -P port - optional - defaults to 29360
\    -p password - optional - defaults to admin
\    -u admin_username - optional - defaults to admin
\    -x admin_command - optional - defaults to '__FMS_Admin_Version'. Can be any one of
\	'__FMS_Admin_Version'
\	'__FMS_Admin_ReloadConfigurations'
\	'__FMS_Admin_GetConfiguration'
\	'__FMS_Admin_ReloadConnections'
\	'__FMS_Admin_ReloadLicence'
\	'__FMS_Admin_CheckLicence'
\	'__FMS_Admin_ConnectionStatistics'
\	'__FMS_Admin_ServerLogLevel WARN|INFO|DEBUG|TRACE'
\	'__FMS_Admin_GetServerLogLevel'
\	'__FMS_Admin_ListCerts certs.flame JKS|PKCS12|DATABASE keystorepassword'
\	'__FMS_Admin_GetCert certs.flame JKS|PKCS12|DATABASE keystorepassword mykeyalias [full (FMS 5.4.2+ only)]'
\	'__FMS_Admin_DeleteCert certs.flame JKS|PKCS12|DATABASE keystorepassword mykeyalias [result (FMS 5.4.2+ only)]'
\	'__FMS_Admin_AddCert certs.flame JKS|PKCS12|DATABASE keystorepassword mykeyalias certificateBase64'
\	'__FMS_Admin_RenameKey certs.flame JKS|PKCS12|DATABASE keystorepassword keypassword currentkeyalias newkeyalias'
\
\  Use this utility to dynamically update a running FMS configuration or report on the status of a running FMS instance.
\
\          

fmsconf Environment Variables

The fmsconf utility behaviour may be customised by adjusting the following environment variables