Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:adm:czechidm_installation_win [2020/04/21 11:43] fiserp [Create DB user and database in PostgreSQL] |
tutorial:adm:czechidm_installation_win [2021/03/08 10:38] svandav |
||
---|---|---|---|
Line 8: | Line 8: | ||
==== Create DB user and database in PostgreSQL ==== | ==== Create DB user and database in PostgreSQL ==== | ||
- | Open a **PSQL** binary from the Start menu. A windows-cmd-like window should appear with a prompt. Create a db user and a database for CzechIdM. | + | Open a **PSQL** binary from the Start menu (for the OpenSCG PostgreSQL) or fire-up the cmd terminal and run '' |
<code sql> | <code sql> | ||
Line 22: | Line 22: | ||
Use the pgAdmin or PSQL to test the database connection under the '' | Use the pgAdmin or PSQL to test the database connection under the '' | ||
==== JDBC driver installation ==== | ==== JDBC driver installation ==== | ||
- | Download the PostgreSQL JDBC driver from the [[https:// | + | Download the newest |
==== Configure environment properties. Select application profile ==== | ==== Configure environment properties. Select application profile ==== | ||
Run the **Monitor Tomcat** application from the Start menu. Configure following settings: | Run the **Monitor Tomcat** application from the Start menu. Configure following settings: | ||
- | * Add '' | + | * Add '' |
- | * Add '' | + | * Add '' |
- | + | * Add '' | |
- | === Change Tomat logging properties === | + | |
- | + | ||
- | In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . | + | |
- | + | ||
- | Make these changes in file "/c/Program\ Files/ | + | |
- | Comment out console handler. We don't want tomcat | + | |
- | < | + | |
- | handlers = 1catalina.org.apache.juli.AsyncFileHandler, | + | |
- | #handlers = java.util.logging.ConsoleHandler | + | |
- | + | ||
- | .handlers = 1catalina.org.apache.juli.AsyncFileHandler | + | |
- | #.handlers = java.util.logging.ConsoleHandler, | + | |
- | + | ||
- | # | + | |
- | # | + | |
- | </ | + | |
- | In 1catalina file handler change log level to " | + | |
- | < | + | |
- | # | + | |
- | # | + | |
- | 1catalina.org.apache.juli.AsyncFileHandler.level = INFO | + | |
- | 1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/ | + | |
- | 1catalina.org.apache.juli.AsyncFileHandler.prefix = tomcat | + | |
- | 1catalina.org.apache.juli.AsyncFileHandler.rotatable = false | + | |
- | 1catalina.org.apache.juli.AsyncFileHandler.suffix = .log | + | |
- | </ | + | |
==== Create CzechIdM configuration folders ==== | ==== Create CzechIdM configuration folders ==== | ||
Line 74: | Line 47: | ||
==== Create SSL truststore ==== | ==== Create SSL truststore ==== | ||
Open the Git Bash and navigate to the ''/ | Open the Git Bash and navigate to the ''/ | ||
- | < | + | < |
openssl genrsa -out fakecert.key | openssl genrsa -out fakecert.key | ||
- | openssl req -new -key fakecert.key -out fakecert.csr -subj "/C=CZ/ST=Czech Republic/L=Prague/O=BCV/CN=CzechIdM placeholder cert" | + | # if the following command fails, remove the parameter -subj and supply the values interactively |
+ | openssl req -new -key fakecert.key -out fakecert.csr -subj "//C=CZ\ST=Czech Republic\L=Prague\O=BCV\CN=CzechIdM placeholder cert" | ||
openssl x509 -req -in fakecert.csr -signkey fakecert.key -days 1 -sha256 -out fakecert.crt | openssl x509 -req -in fakecert.csr -signkey fakecert.key -days 1 -sha256 -out fakecert.crt | ||
keytool -importcert -file fakecert.crt -alias placeholder-cert -keystore truststore.jks | keytool -importcert -file fakecert.crt -alias placeholder-cert -keystore truststore.jks | ||
Line 121: | Line 95: | ||
org.quartz.jobStore.tablePrefix=qrtz_ | org.quartz.jobStore.tablePrefix=qrtz_ | ||
</ | </ | ||
- | * The **C: | + | * The **C: |
+ | <note important> | ||
+ | <code xml logback-spring.xml> | ||
<?xml version=" | <?xml version=" | ||
<!-- https:// | <!-- https:// | ||
Line 130: | Line 106: | ||
<include resource=" | <include resource=" | ||
< | < | ||
- | | + | |
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | | ||
+ | < | ||
+ | </ | ||
+ | | ||
<logger name=" | <logger name=" | ||
<logger name=" | <logger name=" | ||
<logger name=" | <logger name=" | ||
<logger name=" | <logger name=" | ||
- | < | + | |
- | < | + | |
- | < | + | |
- | | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | <root level=" | + | |
- | < | + | |
- | </ | + | |
</ | </ | ||
</ | </ | ||
Line 242: | Line 227: | ||
There are two properties in application-production.properties that influence the confidential storage: | There are two properties in application-production.properties that influence the confidential storage: | ||
- | * You can set the 128bit (16byte) key directly in the property file using **cipher.crypt.secret.key** property or | + | * You can set the 128bit (16byte) or 256bit (32byte) key directly in the property file using **cipher.crypt.secret.key** property or |
* you can create separate file (in our case **secret.key**) containing a random string. Then you reference this file with **cipher.crypt.secret.keyPath** property. | * you can create separate file (in our case **secret.key**) containing a random string. Then you reference this file with **cipher.crypt.secret.keyPath** property. | ||
<note warning> | <note warning> | ||
Line 248: | Line 233: | ||
<note warning> | <note warning> | ||
- | Confidential storage uses AES/ | + | Confidential storage uses AES/ |
=== Attachment store === | === Attachment store === |