Basic authentication and SSL certificates
General behavior and certificate prerequisites
The web services support basic authentication and authentication via SSL certificates. Both authentication methods can be used in the same ImageMaster system.
-
If the client provides an SSL certificate and the application server trusts this certificate, SSL authentication is performed.
-
In all other cases, basic authentication is used.
By default, an ImageMaster user is authenticated with basic authentication based on the username and password.
-
A user can be configured to have an SSL certificate (via AdminClient or SOAP web service).
The SSL (X.509) certificate must be in PEM format.
-
Once a user has an associated SSL certificate, the login via username and password will be denied for that user.
-
Web service access for that user then requires the SSL certificate for access.
The certificate presented by the web service client must be included in the ImageMaster system’s truststore. It must be a version 3 certificate with the extended key usage for client authentication1.
Adding SSL certificates to cacerts.jks
To enable authentication via SSL certificates, import the needed certificates for client authentication into the cacerts.jks keystore.
-
Client certificates only need to be imported when they cannot be automatically verified.
-
It is necessary to add both to cacerts.jks (via parameter “-trustcacerts”):
-
the final certificate
-
the entire chain of issuers.
-
Use the following command:
keytool –importcert -alias new_client –file new-client.der ‑trustcacerts ‑keystore cacerts.jks
Also see Overview of keytool commands.
Configuring a certificate for a user
Once a certificate is configured for a user, the login via username and password will be denied for that user. To configure a certificate, use the AdminClient or a SOAP web service.
An example request to create a user with a certificate looks like this:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://www.tsystems.com/ima9/integrationws/messaging/201101">
<soap:Header/>
<soap:Body>
<ns:createUser>
<user name="testUser" fullName="testUser" isSystemUser="false" mail="test@user.de"
isActive="true" expirationDate="2050-12-31"
passwordExpirationDate="2050-12-31" isTwoFactor="false"
isLocked="false" password="secret">
<roles>
<!--0 to 1000 repetitions:-->
<role>roleAdmin</role>
</roles>
<!--Optional:-->
<groups>
<!--0 to 1000 repetitions:-->
<!--<group>?</group>-->
</groups>
<properties>
<!--0 to 10000 repetitions:-->
<!--<property key="?">?</property>-->
</properties>
<!--Optional:-->
<sslCertificate>-----BEGIN CERTIFICATE-----
MIIFDjCCAvagAwIBAgIUOXCQWT3sfUaG05WbBSVleWe03DEwDQYJKoZ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