Miscellaneous
- Miscellaneous
Miscellaneous
Setting Authorization Type
SignServer
By default is client-certificate authentication required for a signature request to be processed. This can be changed with the AUTHTYPE property.
*** Client certificate authentication ***
AUTHTYPE = CLIENTCERT
(default) requires a certificate of all the clients. The certificates must be in the signers access control list and be trusted by the Java distribution, i.e imported in JAVA_HOME/jre/lib/security/cacerts. Authorized clients is configured manually using the CLI interface.
*** Username/password-based authentication ***
AUTHTYPE = org.signserver.server.UsernamePasswordAuthorizer
USER.[NAME] = [PASSWORD]
USER.[NAME] = [HASHED_PASSWORD]:[HASH_ALGORITHM]
USER.[NAME] = [HASHED_PASSWORD]:[HASH_ALGORITHM]:[SALT]
This authorizer requires a valid username and password. User accounts are configured by setting properties of the form shown above, where [NAME] is the username and [PASSWORD] is the clear-text password. In the second form [HASHED_PASSWORD] should be replaced with the output of the digest algorithm specified in [HASH_ALGORITHM]. The third form uses a hash value that is appended to the password before hashing it.
If a valid username and password is not supplied the worker throws an AuthorizationRequiredException which in case of the HTTP interfaces causes a HTTP Basic Authentication (RFC 2617).
*** Username-based authentication ***
AUTHTYPE = org.signserver.server.UsernameAuthorizer
Form 1: ACCEPT_ALL_USERNAMES = false (default) and usernames are specified:
ACCEPT_ALL_USERNAMES = false
ACCEPT_USERNAMES = user1;user2;user3
Form 2, ACCEPT_ALL_USERNAMES = true and no usernames are specified:
ACCEPT_ALL_USERNAMES = true
An Authorizer that can be used for instance if SignServer sits behind an Apache front-end which uses HTTP basic authentication. With this Authorizer the username is logged but the password is not checked as it is assumed to be checked by the front-end.
The Authorizer can be configured to either accept all usernames or only accept those usernames listed in one of its properties.
*** Remote address authentication ***
AUTHTYPE = org.signserver.server.RemoteAddressAuthorizer
ALLOW_FROM = Comma separated list of IP addresses to allow requests from. By default all other addresses are denied access.
If a worker is invoked directly using an EJB call and no REMOTE_IP is specified in the RequestContext the IP-address is set to the String "null". In that case, to allow requests using EJB calls, null can be added to the list of allowed addresses.
*** Custom ***
This authorization functionality doesn't work for all use cases. Then it's possible to create a customized authorizer and specify it's class path as value in the AUTHTYPE property. The Processable will then automatically instantiate and use it. How to develop such a plug-in is explained in the developers section.
Archiving Responses (SignServer only)
If there is a need to save all generated responses, then set the property "ARCHIVE" to "TRUE" and all generated responses for that signer will be saved to database.
The archived responses can later be extracted from data base using the CLI interface. See the CLI section for more information.
The Global Configuration Store
The available workers and its crypto tokens and services is configured in something called the global configuration store that is slightly different from a worker configuration.
Is is dynamically configured and activated immediately. I can contain any type of data (in string representation) and can be of two types, either with global scope or node scope. A Global scoped property can be accessed by all nodes in the cluster while a Node scoped property in only used within a node and cannot be accessed by the other nodes.
SignServer specific
Database failure is handled differently. If a node looses connection to the database it put itself in a state called 'unsynchronised' and will continue its operation without storing the data to database by using a cached global configuration. It is possible to later resynchronise one nodes cached global configuration data with the database with a CLI command called 'resync'. But it is only possible to sync one of the nodes global configuration to the database.
Timed Services
A Timed Service (formerly called just service) is a task that is run on a timely basis, performing maintenance tasks like changing active key, or it could generate a report.
Currently isn't the SignServer shipped with any services out of the box, but read the developer section about how to write custom services. The MailSigner although have a timed service that checks if a Mail Processor have an expiring certificate and sends e-mail notifications about this to the administrators.
A Timed Service framework supports a couple basic properties that is used to calculate when and how a timed service should run. These properties are:
ACTIVE = "TRUE" if the service should be run, otherwise it is disabled.
SINGLETON = "TRUE" if the service only should be run on one of the nodes in the cluster at the time. If it's not set or set to FALSE is the service run simultaneously on all nodes in the cluster. If the node running a singleton service fails will another node sense this and start up the service. (Not used for the MailSigner)
INTERVAL = Property that should define the interval i seconds the service should run.
CRON = Property that should define a CRON expression of how often the service should run. It should conform to Unix CRON standard. (One of INTERVAL or CRON is required)
CertificateExpireTimedService (MailSigner only)
*** Overview ***
The CertificateExpireTimedService is a timed service specific for the MailSigner. It checks all available mail processors if they have a certificate about to expire. In that case a notification about this is sent to the administrators. By default is this done 30 days before expiration. If the Mail Processor isn't updated a reminder message is sent.
The CertificateExpireTimedService have the class path: org.signserver.mailsigner.module.common. CertificateExpireTimedService and is compiled into a the dist-server/mailsigner-module-common.jar that can be included in MAR files that needs the service.
*** Available Properties ***
EXPIRETIMEDAYS = Number of remaining days of the certificate before a notification is sent.(Optional, default 30 days).
REMINDERTIMEDAYS = Number of remaining days of the certificate before a reminder notification is sent.(Optional, default 10 days).
ADMINEMAIL = The email address of were the notifications is sent. (Optional, default is the configured postmaster address.)
FROMEMAIL = The from email used in the notifications is sent. (Optional, default is certexpire@<postmaster-domain>)
MESSAGESUBJECT = The subject used in the first notification message. (Optional, default is "WARNING: Mail Processor with id : ${WORKERID} is about to expire.")
REMINDERSUBJECT = The subject used in the reminder notification message. (Optional, default is "REMINDER: Mail Processor with id : ${WORKERID} is about to expire.")
EXPIREMESSAGE = The message body in the notifications is sent. (Optional, default is "A mail processor at host ${HOSTNAME} have a certificate about to expire.${NL}${NL}The Mail Processor have id ${WORKERID} and a certificate with DN '${cert.CERTSUBJECTDN}' and will expire the ${cert.EXPIREDATE}. ${NL}")
REMINDERMESSAGE = The message body in the remainder notifications is sent. (Optional, default is "This is a reminder that a mail processor at host ${HOSTNAME} have a certificate about to expire.${NL}${NL}The Mail Processor have id ${WORKERID} and a certificate with DN '${cert.CERTSUBJECTDN}' and will expire the ${cert.EXPIREDATE}. ${NL}")
*** Available Substitution Variables ***
The following substitution variables can be used in notification subject and message bodys.
${NL} = New line
${DATE} = The current date
${HOSTNAME} = Name of the host running the application.
${WORKERID} = Id of the worker.
${WORKERNAME} = Name of the worker.
${cert.CERTSERIAL} = The serial number of the certificate about to expire.
${cert.EXPIREDATE} = The certificates expiration date.
${cert.CERTSUBJECTDN} = The certificate subject DN.
${cert.CERTISSUERDN} = The certificate issuer DN.
SignerStatusReportTimedService
*** Overview ***
The SignerStatusReportTimedService is a timed service that outputs status for a set of signers to a file. The information includes each signers current status ACTIVE/OFFLINE and if available also the numbers of signings that has been performed with the key currently associated with the signer. If the signer has a configured limit of number of signers, this value is also included.
Sample content of a produced output file:
workerName=Sod1, status=OFFLINE, signings=10000, signLimit=10000,
workerName=Sod2, status=ACTIVE, signings=33524, signLimit=100000,
workerName=Sod3, status=OFFLINE, signings=10000, signLimit=10000,
workerName=Sod4, status=OFFLINE, signings=10000, signLimit=10000,
workerName=Sod5, status=OFFLINE, signings=10000, signLimit=10000,
workerName=Sod6, status=ACTIVE, validityNotBefore=2010-04-04 01:37:21 CEST, validityNotAfter=2018-04-04 01:37:21 CEST, signings=4676,
workerName=Sod7, status=OFFLINE,
*** Available Properties ***
WORKERS = Comma separated list of worker names (signers) that should be monitored.
OUTPUTFILE = File that the information will be written to. If the file exists the content will be overwritten. The application server needs to have write access to this file when the service is executed.
Installation Packages
From version 3.1 and upwards will there be binary installation packages released alongside the regular source packages. The packages includes all software necessary except for Java, were JDK 1.5+ is required (JRE will do for the MailSigner) before installing.
At the current moment are the platforms Linux (mainly Debian distribution is tested but it should work for other distributions as well) and Windows XP/2003 supported. The SignServer have two packages, one server part that should be installed in every node in the cluster and one management package containing the CLI. The same goes for the MailSigner which is also separated into two parts, one containing the SMTP server and the other containing the management CLI.
Using the Installation Packages
The installation package can be used either by using a GUI or on the command line by specifying the argument '--mode text'
For an advanced set-up, for instance if many nodes should be installed with similar configuration, it is possible to preconfigure the installation by specifying a properties file containing some or all the properties asked during the installation. The properties will be used directly during installation and there will be no questions about it. See each package section for details about supported properties.
The configuration file should be in the following locations:
Unix SignServer Installation : /etc/signserver/signserver.conf
Unix MailSigner Installation : /etc/mailsigner/mailsigner.conf
Windows SignServer Installation : %SYSTEMROOT%\signserver.conf
(i.e C:\WINDOWS\signserver.conf)
Windows MailSigner Installation : %SYSTEMROOT%\mailsigner.conf
After installation will all the settings be saved to the configuration file by the installation program to simplify re-installation.
If all necessary properties is given in the property file, it's possible to install the package silently by specifying '--mode unattended' on the command line.
*** SignServer Node ***
The server part of the SignServer package contains everything (except Java) that is needed to set-up a node in a cluster. It contains a preconfigured version of JBoss that is ready to use.
The steps performed during the installation process are:
Unix:
- By default is everything unpacked in /opt/signserver-<version> .
- If a /etc/signserver/signserver.conf file exists, it's read and used during installation.
- The user and group 'signserver' is created
- JBoss init.d script is configured to run at runlevel 3,4,5
- Directory /etc/signserver/ is created to contain all configuration files
- Database configuration file /etc/signserver/database-conf.xml is populated.
- Log configuration file /etc/signserver/log-conf.xml is populated and configured to log to the directory /var/log/signserver
- If no HTTP SSL certificate is specified in the configuration file will dummy key stores be generated to /etc/signserver.
- Tomcat is configured for HTTPS and it's configuration file is placed in /etc/signserver/webserver-conf.xml
- Finally is Jboss started and ready to be used.
Windows:
- By default is everything unpacked in C:\Program\SignServer\SignServer-<version> .
- If a c:\WINDOWS\signserver.conf file exists it's read and used during installation.
- JBoss is configured to be run as a service that is started automatically.
- Database configuration file <INSTALLDIR>\database-conf.xml is populated.
- Log configuration file <INSTALLDIR>\log-conf.xml is populated and configured to log to the default directory <INSTALLDIR>\jboss\server\default\log
- If no HTTP SSL certificate is specified will dummy key stores be generated to <INSTALLDIR>
- Tomcat is configured for HTTPS and it's configuration file is placed in <INSTALLDIR>\webserver-conf.xml
- Finally is Jboss started and ready to be used.
The supported properties in the configuration file /etc/signserver/signserver.conf (or %SYSTEMROOT%\signerserver.conf for windows) are:
| Property Name | Description | Example value | Where to manually reconfigure |
|---|---|---|---|
| SIGNSERVER_NODEID | A unique string value (containing alphanumeric characters only) identifying the node in a cluster. | node1 |
Unix: /etc/signserver/signserver.conf Windows: %Systemroot%\signserver.conf |
| database.type | Type of database, currently are Hypersonic, Mysql, Mysql Cluster, Postgres and MS SQL 2000 supported | hsqldb, mysql, mysqlndb, postgres, mssql2000 |
Unix: /etc/signserver/database-conf.xml Windows: %Installdir%\database-conf.xml |
| database.hosts | The hostnames of the databases used. (not used for hsqldb). | localhost |
Unix: /etc/signserver/database-conf.xml Windows: %Installdir%\database-conf.xml |
| database.port | The port of the database (not used for hsqldb). | 1433 |
Unix: /etc/signserver/database-conf.xml Windows: %Installdir%\database-conf.xml |
| database.name | The name of the database (not used for hsqldb). | signserver |
Unix: /etc/signserver/database-conf.xml Windows: %Installdir%\database-conf.xml |
| database.username | The username used for authentication against the database (not used for hsqldb). | signserver |
Unix: /etc/signserver/database-conf.xml Windows: %Installdir%\database-conf.xml |
| database.password | The password used for authentication against the database (not used for hsqldb). | foo123 |
Unix: /etc/signserver/database-conf.xml Windows: %Installdir%\database-conf.xml |
| httpserver.hostname | Hostname used as CN in generated SSL Server certificate. | host1.someorg | Only used during the of SSL Server certificate generation phase of installation. |
| httpserver.storepath | Path to the key store (JKS file) containing the SSL server certificate. | /etc/signserver/tomcat.jks |
Unix: /etc/signserver/webserver-conf.xml Windows: %Installdir%\webserver-conf.xml |
| httpserver.password | Password to unlock the SSL server certificate key store. | foo123 |
Unix: /etc/signserver/webserver-conf.xml Windows: %Installdir%\webserver-conf.xml |
| httptrust.storepath | Path to the key store (JKS file) containing the CA trust store. | /etc/signserver/truststore.jks |
Unix: /etc/signserver/webserver-conf.xml Windows: %Installdir%\webserver-conf.xml |
| httptrust.password | Password unlocking the CA truststore. | foo123 |
Unix: /etc/signserver/webserver-conf.xml Windows: %Installdir%\webserver-conf.xml |
| syslog.hostname | Host name of the Syslog server. This setting also indicates that Syslog should be used. | loghost.someorg.org |
Unix: /etc/signserver/log-conf.xml Windows: %Installdir%\log-conf.xml |
*** SignServer Management ***
This package installs the CLI interface on the management station (which can be the same as a node). The following steps are performed during installation:
Unix:
- By default is everything unpacked in /opt/signserver-<version> .
- If a /etc/signserver/signserver.conf file exists it's read and used during installation.
- The user and group 'signserver' is created
- A link from /opt/signserver-<version>/bin/signserver.sh is done to /usr/local/bin.
Windows:
- Everything is unpacked in C:\Program\SignServer\SignServer-<version> by default.
- If a c:\WINDOWS\signserver.conf file exists it's read and used during installation.
The signserver.conf supports the following settings:
| Property Name | Description | Example value | Where to manually reconfigure |
|---|---|---|---|
| hostname.masternode | Hostname of master node in the cluster. | node1.someorg.org |
Unix: /etc/signserver/signserver.conf Windows: %Installdir%\signserver.conf |
| hostname.allnodes | Hostname of all hosts in cluster, separated by ';'. | node1.someorg.org;node2.someorg.org |
Unix: /etc/signserver/signserver.conf Windows: %Installdir%\signserver.conf |
*** MailSigner Server ***
The MailSigner package works much in the same way as the SignServer package with the difference that James SMTP server is included instead of Jboss.
The steps performed during the installation process are:
Unix:
- By default is everything is unpacked in /opt/mailsigner-<version> .
- If a /etc/mailsigner/mailsigner.conf file exists it's read and used during installation.
- The user and group 'mailsigner' is created
- James init.d script is configured to run at runlevel 3,4,5
- Directory /etc/mailsigner/ is created to contain all configuration files
- James configuration file /etc/mailsigner/mailsigner_conf.xml is populated.
- Log configuration file /etc/mailsigner/log-conf.xml is populated and configured to log to the directory /var/log/mailsigner
- Finally is James started and ready to be used.
Windows:
- By default is everything is unpacked in C:\Program\MailSigner\MailSigner-<version> .
- If a c:\WINDOWS\mailsigner.conf file exists it's read and used during installation.
- James is configured to be run as a service that is started automatically.
- James configuration file <INSTALLDIR>\mailsigner_conf.xml is populated.
- Log configuration file <INSTALLDIR>\log-conf.xml is populated and configured to log to the default directory <INSTALLDIR>\james\logs
- Finally is James started and ready to be used.
The supported properties in the configuration file /etc/mailsigner/mailsigner.conf (or %SYSTEMROOT%\mailsigner.conf for windows) are:
| Property Name | Description | Example value | Where to manually reconfigure |
|---|---|---|---|
| mailsigner.smtpport | Port that the mailserver should listen on. | 25 |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner-config.xml |
| mailsigner.primarydns | The IP address of the primary DNS server. | 10.0.0.1 |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner-config.xml |
| mailsigner.secondarydns | The IP address of the secondary DNS server. | 10.0.0.2 |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| mailsigner.postmaster | The email address of the main administrator. | mailadmin@someorg.org |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| mailsigner.smtpauth | Indicates if SMTP AUTH should be used. Svalues are : 'true' which means required but announced only to not authorized addresses, 'false' and 'announce' which acts like true, but always announce AUTH capability to clients. | true, false, announce |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| mailsigner.gatewayhost | If emails should be forwarded to another SMTP server in the organisation should this and the 'mailsigner.gatewayport' setting be used. Enter the hostname of the other SMTP server. | smtp1.someorg.org |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| mailsigner.gatewayport | The port of the SMTP server to forward messages to. | 25 |
/etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| mailsigner.tlskeystorepath | This setting indicates that the mailsigner should use SMTPS and point to a TLS JKS keystore. | /etc/mailsigner/tlskeystore.jks |
Unix: /etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| mailsigner.tlskeystorepwd | The password to unlock the TLS keystore | foo123 |
/etc/mailsigner/mailsigner_config.xml Windows: %Installdir%\mailsigner_config.xml |
| syslog.hostname | Host name of the Syslog server. This setting also indicates that syslog should be used. | loghost.someorg.org |
Unix: /etc/mailsigner/log-conf.xml Windows: %Installdir%\log-conf.xml |
*** MailSigner Management ***
This package installs the CLI interface on the management station (which can be the same as the SMTP server). The following steps are performed during installation:
Unix:
- By default is everything is unpacked in /opt/mailsigner-<version> .
- If a /etc/mailsigner/mailsigner.conf file exists it's read and used during installation.
- The user and group 'mailsigner' is created
- A link from /opt/mailsigner-<version>/bin/mailsigner.sh is done to /usr/local/bin.
Windows:
- Everything is unpacked in C:\Program\MailSigner\MailSigner-<version> by default.
- If a c:\WINDOWS\mailsigner.conf file exists it's read and used during installation.
The mailsigner.conf supports the following settings but it is important that 'hostname.masternode' and 'hostname.allnodes' must point to the same host:
| Property Name | Description | Example value | Where to manually reconfigure |
|---|---|---|---|
| hostname.masternode | The hostname of the mailsigner to manage. | mailsigner.someorg.org |
Unix: /etc/mailsigner/mailsigner.conf Windows: %Installdir%\mailsigner.conf |
| hostname.allnodes | The hostname of the mailsigner to manage and should have the same value as master node. MailSigner doesn't support clustering | mailsigner.someorg.org |
Unix: /etc/mailsigner/mailsigner .conf Windows: %Installdir%\mailsigner .conf |
Generating Installation Packages
Before generating a installation package must Bitrock InstallBuilder be installed on a Linux workstation. Then set the build mode in signserver_build.properties and go to src/install/bitrock. If a SignServer package should be generated must the environment variable JBOSS_PREP point the a prepared JBoss installation that will be included in the package.
Then execute the script './buildsignserverpkgs.sh <version>' to start the generation process. The packages will be generated in BitRocks default output directory. For MailSigner use the script 'buildmailsignerpkgs.sh'.
References
- Java (http://java.sun.com)
- JBoss (http://www.jboss.org)
- Apache James mail server (http://james.apache.org)
- Apache Ant (http://ant.apache.org)
- Bouncycastle (http://www.bouncycastle.org)
- RFC3161, Time-Stamp Protocol (TSP) (http://www.ietf.org)
