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/03/11 12:02] fiserp [Create CzechIdM configuration] |
tutorial:adm:czechidm_installation_win [2020/10/21 08:55] fiserp [Create CzechIdM configuration] |
||
---|---|---|---|
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 '' |
- | < | + | < |
CREATE USER czechidm PASSWORD ' | CREATE USER czechidm PASSWORD ' | ||
+ | |||
+ | -- Choose appropriate collation and create database. | ||
+ | -- with english collation (we expect the default windows installation with cp1250/ | ||
CREATE DATABASE " | CREATE DATABASE " | ||
+ | -- with czech collation | ||
+ | CREATE DATABASE " | ||
</ | </ | ||
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 PostgreSQL JDBC driver from the [[https:// |
==== 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 '' |
=== Change Tomat logging properties === | === Change Tomat logging properties === | ||
Line 27: | Line 32: | ||
In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . | In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . | ||
- | Make these changes in file "/ | + | Make these changes in file '' |
Comment out console handler. We don't want tomcat to log to stdout or stderr. | Comment out console handler. We don't want tomcat to log to stdout or stderr. | ||
< | < | ||
Line 69: | Line 74: | ||
==== 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 | ||
+ | # if the following command fails, remove the parameter -subj and supply the values interactively | ||
openssl req -new -key fakecert.key -out fakecert.csr -subj "/ | openssl req -new -key fakecert.key -out fakecert.csr -subj "/ | ||
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 | ||
Line 89: | Line 95: | ||
Now we will create configuration files the CzechIdM will use. | Now we will create configuration files the CzechIdM will use. | ||
< | < | ||
- | * The **C: | + | * The **C: |
cd / | cd / | ||
# start the vim editor | # start the vim editor | ||
vim secret.key | vim secret.key | ||
# press " | # press " | ||
- | # type the 16 characters of the secret key | + | # type the 16 or 32 characters of the secret key |
# press ESC to switch to command mode | # press ESC to switch to command mode | ||
# type :wq | # type :wq | ||
# press ENTER | # press ENTER | ||
# now you should see that secret.key file has been created, check its contents | # now you should see that secret.key file has been created, check its contents | ||
- | # the file should be EXACTLY 17 BYTES LONG, 16 bytes for your key and the last byte " | + | # the file should be EXACTLY 17 or 33 BYTES LONG, 16 or 32 bytes for your key and the last byte " |
xxd -p secret.key | xxd -p secret.key | ||
... hex dump here ... text dump here ... | ... hex dump here ... text dump here ... | ||
Line 164: | Line 170: | ||
flyway.enabled=true | flyway.enabled=true | ||
- | scheduler.enabled=true | + | |
- | scheduler.task.queue.process=1000 | + | |
- | scheduler.event.queue.process=1000 | + | |
scheduler.properties.location=quartz-production.properties | scheduler.properties.location=quartz-production.properties | ||
+ | |||
logging.config=c:/ | logging.config=c:/ | ||
+ | |||
idm.sec.core.demo.data.enabled=false | idm.sec.core.demo.data.enabled=false | ||
- | #spring.cache.ehcache.config=classpath: | + | # attachments will be stored under this path. |
- | + | # new directories for attachment will be created in this folder (permissions has to be added) | |
- | spring.activiti.processDefinitionLocationPrefix=classpath*:/ | + | # System.getProperty(" |
- | idm.sec.core.notification.template.folder=classpath*:/eu/ | + | idm.sec.core.attachment.storagePath=c:/czechidm/data |
- | idm.sec.core.script.folder=classpath*:/ | + | |
# configuration property for default backup | # configuration property for default backup | ||
idm.sec.core.backups.default.folder.path=c:/ | idm.sec.core.backups.default.folder.path=c:/ | ||
- | + | ||
- | + | ||
idm.pub.security.allowed-origins=http:// | idm.pub.security.allowed-origins=http:// | ||
# Generate JWT token security string as "cat / | # Generate JWT token security string as "cat / | ||
Line 185: | Line 190: | ||
idm.sec.security.jwt.secret.token=********** TODO ********* | idm.sec.security.jwt.secret.token=********** TODO ********* | ||
idm.sec.security.jwt.expirationTimeout=36000000 | idm.sec.security.jwt.expirationTimeout=36000000 | ||
- | |||
- | # recaptcha | ||
- | # - recaptchaservice endpoint | ||
- | # | ||
- | # - secret key, can be generated here https:// | ||
- | idm.sec.security.recaptcha.secretKey=xxx | ||
- | # Proxy for HTTP requests | ||
- | # | ||
# Cipher secret key for crypt values in confidential storage | # Cipher secret key for crypt values in confidential storage | ||
Line 199: | Line 196: | ||
cipher.crypt.secret.keyPath=c:/ | cipher.crypt.secret.keyPath=c:/ | ||
- | + | # Defaults for: emailer.* | |
+ | # test.enabled=true means mail WILL NOT be sent | ||
idm.sec.core.emailer.test.enabled=true | idm.sec.core.emailer.test.enabled=true | ||
# http:// | # http:// | ||
Line 208: | Line 206: | ||
# idm.sec.core.emailer.password=password | # idm.sec.core.emailer.password=password | ||
idm.sec.core.emailer.from=czechidm@localhost | idm.sec.core.emailer.from=czechidm@localhost | ||
- | |||
- | ## Global property that allow disable or enable sending notification from WF | ||
- | idm.sec.core.wf.notification.send=false | ||
- | |||
- | |||
- | # supports delete identity | ||
- | idm.pub.core.identity.delete=true | ||
- | # | ||
- | # default password change type for custom users, one of values: | ||
- | # DISABLED - password change is disable | ||
- | # ALL_ONLY - users can change passwords only for all accounts | ||
- | # CUSTOM - users can choose for which accounts change password | ||
- | idm.pub.core.identity.passwordChange=ALL_ONLY | ||
- | # | ||
- | # required old password for change password | ||
- | idm.pub.core.identity.passwordChange.requireOldPassword=true | ||
- | # | ||
- | # create default identity' | ||
- | idm.pub.core.identity.create.defaultContract.enabled=true | ||
- | |||
# Default user role will be added automatically, | # Default user role will be added automatically, | ||
Line 236: | Line 214: | ||
idm.sec.core.role.admin=superAdminRole | idm.sec.core.role.admin=superAdminRole | ||
- | |||
- | # ID system against which to authenticate | ||
- | idm.sec.security.auth.systemId= | ||
- | |||
- | # attachments will be stored under this path. | ||
- | # new directories for attachment will be created in this folder (permissions has to be added) | ||
- | # System.getProperty(" | ||
- | idm.sec.core.attachment.storagePath=c:/ | ||
- | |||
# Max file size of uploaded file. Values can use the suffixed " | # Max file size of uploaded file. Values can use the suffixed " | ||
spring.servlet.multipart.max-file-size=100MB | spring.servlet.multipart.max-file-size=100MB | ||
Line 274: | Line 243: | ||
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 280: | Line 249: | ||
<note warning> | <note warning> | ||
- | Confidential storage uses AES/ | + | Confidential storage uses AES/ |
=== Attachment store === | === Attachment store === |