Commit 8aab799f authored by Benny Prange's avatar Benny Prange
Browse files

Release eumw-1.0.5

parent 9d32e432
......@@ -13,3 +13,4 @@ f33f98135e4d97738965caf8369910526a4ba5eb eumw-1.0.3
cd6877486ad7373dae2fec12f9f74d19e78d1110 eumw-1.0.4
0000000000000000000000000000000000000000 eumw-1.0.4
76f405023426c019aee600be45f72020a1f66159 eumw-1.0.4
6220fdf6481bec6cbc12535f3e3ac49ac6bbecff eumw-1.0.5-rc.1
#!/bin/bash
grep -rIn --color=auto --exclude-dir="target" --exclude-dir="_build" --exclude-dir="\.idea" --exclude-dir="\.hg" --exclude-dir="\.settings" --exclude=\*.{iml,xsd,java,wsdl} --exclude=pom.xml --exclude=.hgtags "1\.0\." .
version: '3'
services:
configuration-wizard:
image: "governikus/eidas-configuration-wizard:1.0.4"
ports:
image: "governikus/eidas-configuration-wizard:1.0.5"
ports:
- "443:8080"
environment:
SERVER_SSL_KEY_STORE: file:/opt/eidas-middleware/ssl.jks
......
version: '3'
services:
configuration-wizard:
image: "governikus/eidas-configuration-wizard:1.0.4"
ports:
image: "governikus/eidas-configuration-wizard:1.0.5"
ports:
- "8080:8080"
volumes:
- eidas-configuration:/opt/eidas-middleware/configuration
......
FROM governikus/eidas-base-container:1.0.4
FROM governikus/eidas-base-container:1.0.5
MAINTAINER Benny Prange <benny.prange@governikus.de>
# NOTE: Some ENV variables are set in the parent "eidas-base-image"
......
......@@ -14,7 +14,7 @@
<parent>
<groupId>de.governikus.eumw</groupId>
<artifactId>eumw</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
</parent>
<artifactId>configuration-wizard</artifactId>
......
......@@ -23,6 +23,7 @@ import java.util.TreeSet;
import javax.validation.constraints.NotBlank;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.crypto.bcrypt.BCrypt;
......@@ -125,7 +126,7 @@ public class ApplicationPropertiesForm extends AbstractPropertiesConfigurationLo
String privateKeyPassword = (String)applicationProperties.remove(
ApplicationPropertiesIdentifier.SERVER_SSL_KEY_PASSWORD.getPropertyName());
// @formatter:on
loadKeystoreSettings("eidasmw-ssl-server-keystore",
loadKeystoreSettings(FilenameUtils.getBaseName(keystorePath),
keystorePath,
keystoreType,
keystoreAlias,
......
......@@ -30,6 +30,7 @@ import javax.validation.constraints.NotBlank;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.DeferredFileOutputStream;
import org.apache.commons.lang3.StringUtils;
......@@ -167,7 +168,7 @@ public class EidasmiddlewarePropertiesForm extends AbstractPropertiesConfigurati
(String)middlewareProperties.get(MiddlewarePropertiesIdentifier.MIDDLEWARE_SIGN_PIN.name());
String privateKeyPassword = keystorePassword;
// @formatter:on
loadKeystoreSettings("eidasmw-signature-keystore",
loadKeystoreSettings(FilenameUtils.getBaseName(keystorePath),
keystorePath,
null,
keystoreAlias,
......@@ -180,7 +181,7 @@ public class EidasmiddlewarePropertiesForm extends AbstractPropertiesConfigurati
keystorePassword = (String)middlewareProperties.get(MiddlewarePropertiesIdentifier.MIDDLEWARE_CRYPT_PIN.name());
privateKeyPassword = keystorePassword;
// @formatter:on
loadKeystoreSettings("eidasmw-crypto-keystore",
loadKeystoreSettings(FilenameUtils.getBaseName(keystorePath),
keystorePath,
null,
keystoreAlias,
......@@ -230,7 +231,7 @@ public class EidasmiddlewarePropertiesForm extends AbstractPropertiesConfigurati
{
try (InputStream inputStream = new FileInputStream(signatureCertFile))
{
return getCertificate("metadata-signature-certificate", IOUtils.toByteArray(inputStream));
return getCertificate(FilenameUtils.getBaseName(metadataSignatureCertPath), IOUtils.toByteArray(inputStream));
}
catch (IOException e)
{
......
......@@ -34,9 +34,11 @@ import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.List;
import java.util.Properties;
import java.util.stream.Collectors;
import javax.xml.bind.JAXBException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.DisplayName;
......@@ -186,8 +188,12 @@ public class CompleteUserJourneyTest extends AbstractWebTest // NOPMD
NEXT_PAGE, PREVIOUS_PAGE, SAVE, UPLOAD_CERTIFICATE, UPLOAD_KEYSTORE
}
/**
* Test the complete user journey without a previous configuration. Afterwards the configuration is loaded
* and new metadata is uploaded to check that the old metadata is deleted.
*/
@Test
public void completeUserJourney() throws IOException, JAXBException, CertificateException,
public void testCompleteUserJourney() throws IOException, JAXBException, CertificateException,
UnrecoverableKeyException, KeyStoreException, NoSuchAlgorithmException
{
HtmlPage startPage = getWebClient().getPage(getRequestUrl("/"));
......@@ -220,6 +226,65 @@ public class CompleteUserJourneyTest extends AbstractWebTest // NOPMD
uploadNewMetadata();
}
/**
* Test that SERVER_URL is added to eidasmiddleware.properties when loading a previous configuration
* without this property key.
*/
@Test
public void testConfigWithoutServerURL() throws IOException, JAXBException, CertificateException,
UnrecoverableKeyException, KeyStoreException, NoSuchAlgorithmException
{
createConfig();
// Remove SERVER_URL from eidasmiddleware.properties
List<String> properties = FileUtils.readLines(Paths.get(getTempDirectory(), "eidasmiddleware.properties")
.toFile(),
StandardCharsets.UTF_8);
properties = properties.stream().filter(property -> !property.startsWith("SERVER_URL")).collect(Collectors.toList());
FileUtils.writeLines(Paths.get(getTempDirectory(), "eidasmiddleware.properties").toFile(), properties);
// Clear cookies to start from the first page
getWebClient().getCookieManager().clearCookies();
HtmlPage currentPage = getWebClient().getPage(getRequestUrl("/"));
setTextValue(currentPage, "configDirectory.configDirectory", getTempDirectory());
// go to upload existing config
currentPage = click(currentPage, Button.NEXT_PAGE);
// go to application.properties
currentPage = click(currentPage, Button.NEXT_PAGE);
// go to POSeIDAS.xml
currentPage = click(currentPage, Button.NEXT_PAGE);
// go to eidasmiddleware.properties
currentPage = click(currentPage, Button.NEXT_PAGE);
// go to save page
currentPage = click(currentPage, Button.NEXT_PAGE);
WebAssert.assertTextPresent(currentPage, "Save location");
click(currentPage, Button.SAVE);
validateApplicationProperties();
validatePoseidasData();
validateEidasMiddlewareProperties();
}
private void createConfig() throws IOException
{
HtmlPage startPage = getWebClient().getPage(getRequestUrl("/"));
HtmlPage uploadOldConfigurationPage = testConfigDirectoryPage(startPage);
HtmlPage applicationPropertiesPage = testUploadPage(uploadOldConfigurationPage);
HtmlPage poseidasPage = testApplicationPropertiesPage(applicationPropertiesPage);
HtmlPage eidasPropertiesPage = testPoseidasPage(poseidasPage);
HtmlPage saveLocationPage = testEidasMiddlewarePropertiesPage(eidasPropertiesPage);
setTextValue(saveLocationPage, "coreConfiguration-saveLocation", getTempDirectory());
click(saveLocationPage, Button.SAVE);
}
private void uploadNewMetadata() throws IOException
{
// check that there is only one metadata file
......
......@@ -14,7 +14,7 @@
<parent>
<artifactId>eumw</artifactId>
<groupId>de.governikus.eumw</groupId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
</parent>
<artifactId>database-migration</artifactId>
......
......@@ -26,3 +26,11 @@ Changelog
- Fix the project setup of the password generator.
- Older databases are now also supported in the database migration tool.
- Other minor fixes and improvements.
* 1.0.5
- eIDAS Middleware: Fix wrong certificate in the metadata for the encryption part.
- eIDAS Middleware: The URL for the entityID in the metadata must now be set in the configuration. Add SERVER_URL=https://host:port to eidasmiddleware.properties.
- Configuration Wizard: Adapt for new configuration value. Use the value from the eID configuration page.
- Configuration Wizard: Ensure that only one connector metadata file is saved.
- Configuration Wizard: Ensure that the original filenames are used when loading and saving a previous configuration.
\ No newline at end of file
......@@ -56,7 +56,7 @@ In case you are using your own environment, copy the JAR file to a folder of you
You can start the application with the following command::
java -jar configuration-wizard-1.0.4.jar
java -jar configuration-wizard-1.0.5.jar
This way the configuration wizard will be available at `http://localhost:8080/config-wizard.`
......@@ -81,7 +81,7 @@ to run the wizard again whenever you need it.
To run the configuration wizard, execute the following command.
It will mount the named volume in the container so that the configuration wizard can store the configuration in the volume. ::
docker run --rm -it -v eidas-configuration:/opt/eidas-middleware/configuration -p 8080:8080 --name eidas-configuration-wizard governikus/eidas-configuration-wizard:1.0.4
docker run --rm -it -v eidas-configuration:/opt/eidas-middleware/configuration -p 8080:8080 --name eidas-configuration-wizard governikus/eidas-configuration-wizard:1.0.5
Running this command the configuration wizard will be available on http://localhost:8080/config-wizard.
......@@ -95,7 +95,7 @@ with the alias ``localhost`` and the password ``123456`` for the keystore and th
You can also use PKCS12 keystores,
in this case you must change the value of ``SERVER_SSL_KEY_STORE_TYPE`` to ``PKCS12``. ::
docker run --rm -it -v eidas-configuration:/opt/eidas-middleware/configuration -v /home/user/keystore.jks:/opt/eidas-middleware/keystore.jks -p 443:8080 -e SERVER_SSL_KEY_STORE=file:/opt/eidas-middleware/keystore.jks -e SERVER_SSL_KEY_STORE_TYPE=JKS -e SERVER_SSL_KEY_STORE_PASSWORD=123456 -e SERVER_SSL_KEY_ALIAS=localhost -e SERVER_SSL_KEY_PASSWORD=123456 --name eidas-configuration-wizard governikus/eidas-configuration-wizard:1.0.4
docker run --rm -it -v eidas-configuration:/opt/eidas-middleware/configuration -v /home/user/keystore.jks:/opt/eidas-middleware/keystore.jks -p 443:8080 -e SERVER_SSL_KEY_STORE=file:/opt/eidas-middleware/keystore.jks -e SERVER_SSL_KEY_STORE_TYPE=JKS -e SERVER_SSL_KEY_STORE_PASSWORD=123456 -e SERVER_SSL_KEY_ALIAS=localhost -e SERVER_SSL_KEY_PASSWORD=123456 --name eidas-configuration-wizard governikus/eidas-configuration-wizard:1.0.5
Because the application is now bound to the host in port 443,
the configuration wizard is available at https://localhost/config-wizard.
......
......@@ -50,8 +50,8 @@ Using the eIDAS Demo Application
To use the eIDAS Demo Application, start by running the eIDAS Demo Application.
#. Change to the correct directory where the aforementioned configuration is present.
#. If not present, copy the ``eidas-demo-1.0.4.jar`` file in this directory.
#. Start the application by executing ``java -jar eidas-demo-1.0.4.jar``.
#. If not present, copy the ``eidas-demo-1.0.5.jar`` file in this directory.
#. Start the application by executing ``java -jar eidas-demo-1.0.5.jar``.
Now you must configure your eIDAS Middleware to communicate with the eIDAS Demo Application.
......@@ -88,7 +88,7 @@ Also bear in mind that you must use the path of the container file system in the
To run the middleware, execute the following command after you have prepared the configuration, certificate and keystores::
docker run --rm -it -v /path/to/your/config-directory:/opt/eidas-middleware/config -p 8080:8080 governikus/eidas-demo-application:1.0.4
docker run --rm -it -v /path/to/your/config-directory:/opt/eidas-middleware/config -p 8080:8080 governikus/eidas-demo-application:1.0.5
Now you can follow the steps above to configure and test the eIDAS Middleware.
......
......@@ -84,13 +84,13 @@ To run the eIDAS Middleware, execute the following command.
It will mount the named volumes containing the database and configuration in the container
and the application will be available on port 8443. ::
docker run --rm -it -v eidas-configuration:/opt/eidas-middleware/configuration -v eidas-database:/opt/eidas-middleware/database -p 8443:8443 --name eidas-middleware-application governikus/eidas-middleware-application:1.0.4
docker run --rm -it -v eidas-configuration:/opt/eidas-middleware/configuration -v eidas-database:/opt/eidas-middleware/database -p 8443:8443 --name eidas-middleware-application governikus/eidas-middleware-application:1.0.5
To stop and remove the container, just hit ``CTRL+C``.
To keep the container running longer without being attached to the STDOUT and STDERR, change the command to the following::
docker run -d -v eidas-configuration:/opt/eidas-middleware/configuration -v eidas-database:/opt/eidas-middleware/database -p 8443:8443 --name eidas-middleware-application governikus/eidas-middleware-application:1.0.4
docker run -d -v eidas-configuration:/opt/eidas-middleware/configuration -v eidas-database:/opt/eidas-middleware/database -p 8443:8443 --name eidas-middleware-application governikus/eidas-middleware-application:1.0.5
For more information on starting and stopping containers and viewing the logs,
see the `Docker Docs <https://docs.docker.com/engine/reference/run/>`_.
......@@ -134,7 +134,7 @@ Scalability
^^^^^^^^^^^
The performance of the eIDAS Middleware improves by adding more memory (RAM) and using a faster CPU.
In case the memory configuration has changed, the server needs to be restarted.
To start the JVM with more memory, add ``-Xmx`` with the new maximum memory size to the start command, e.g. ``java -Xmx8g -jar eidas-middleware-1.0.4.jar`` for 8 GB.
To start the JVM with more memory, add ``-Xmx`` with the new maximum memory size to the start command, e.g. ``java -Xmx8g -jar eidas-middleware-1.0.5.jar`` for 8 GB.
Monitoring
......@@ -188,5 +188,5 @@ The configuration file must contain the following values. The first three values
Before running the migration tool, please create a backup of your database.
Stop the eIDAS Middleware Application and copy the database file to your backup location, e.g. ``cp /opt/eidas-middleware/database/eidasmw.mv.db /path/to/your/backup-location/eidasmw.mv.db``.
To perform the migration, copy the database migration JAR file to the directory where your configuration file is available and execute the command ``java -jar database-migration-1.0.4.jar``.
To perform the migration, copy the database migration JAR file to the directory where your configuration file is available and execute the command ``java -jar database-migration-1.0.5.jar``.
If there are errors in the log output, please send the complete log output and some information on your environment to eidas-middleware@governikus.com.
......@@ -59,9 +59,9 @@ author = u'Hartje Bruns'
# built documents.
#
# The short X.Y version.
version = '1.0.4'
version = '1.0.5'
# The full version, including alpha/beta/rc tags.
release = '1.0.4'
release = '1.0.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -3,7 +3,7 @@ FROM governikus/zulu-openjdk:8u172
MAINTAINER Benny Prange <benny.prange@governikus.de>
# Define the application version for the subsequent application images
ENV VERSION=1.0.4
ENV VERSION=1.0.5
# Define the spring boot configuration directory
ENV CONFIG_DIR=/opt/eidas-middleware/configuration
......
......@@ -14,7 +14,7 @@
<parent>
<groupId>de.governikus.eumw</groupId>
<artifactId>eumw</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
</parent>
<artifactId>eid-service</artifactId>
......
......@@ -14,7 +14,7 @@
<parent>
<groupId>de.governikus.eumw</groupId>
<artifactId>eumw</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
</parent>
<artifactId>eidas-common</artifactId>
......
......@@ -15,11 +15,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="refresh" content="#{REFRESH_TIME}" />
<link rel="stylesheet" type="text/css" href="bos.css" />
<title>eIDAS</title>
<title>German eIDAS Middleware</title>
</head>
<body>
<div id="header">
<h1>eIDAS</h1>
<h1>German eIDAS Middleware</h1>
</div>
<div id="content">
<h2>Ein Fehler ist aufgetreten</h2>
......
version: '3'
services:
eidas-demo-application:
image: "governikus/eidas-demo-application:1.0.4"
ports:
image: "governikus/eidas-demo-application:1.0.5"
ports:
- "8080:8080"
volumes:
- ./configuration:/opt/eidas-middleware/config
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment