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 [2019/03/13 10:18] urbanl [Set correct permissions on CzechIdM files] |
tutorial:adm:czechidm_installation [2020/04/21 11:40] fiserp [1. Create DB user and database in PostgreSQL] |
||
---|---|---|---|
Line 15: | Line 15: | ||
psql | psql | ||
CREATE USER czechidm PASSWORD ' | CREATE USER czechidm PASSWORD ' | ||
+ | |||
+ | # Choose appropriate collation and create database. | ||
+ | # with english collation | ||
CREATE DATABASE " | CREATE DATABASE " | ||
+ | # with czech collation | ||
+ | CREATE DATABASE " | ||
</ | </ | ||
Line 35: | Line 40: | ||
and restart PostgreSQL. | and restart PostgreSQL. | ||
</ | </ | ||
- | ==== 2. JDBC driver installation - CentOS7 ==== | + | ==== 2. JDBC driver installation |
+ | **CentOS** | ||
Install the package with PostgreSQL JDBC driver: | Install the package with PostgreSQL JDBC driver: | ||
Line 50: | Line 55: | ||
</ | </ | ||
- | ==== 3. JDBC driver installation - Debian ==== | + | ==== 3. JDBC driver installation - Debian |
Install the package with PostgreSQL JDBC driver: | Install the package with PostgreSQL JDBC driver: | ||
Line 74: | Line 78: | ||
</ | </ | ||
- | Change the following line: | + | Change |
<code bash> | <code bash> | ||
Environment=' | Environment=' | ||
Line 80: | Line 84: | ||
into: | into: | ||
<code bash> | <code bash> | ||
- | Environment=' | + | Environment=' |
</ | </ | ||
- | Reload systemd after the changes: | + | Reload |
<code bash> | <code bash> | ||
systemctl daemon-reload | systemctl daemon-reload | ||
</ | </ | ||
- | |||
==== 5. Create CzechIdM configuration folders ==== | ==== 5. Create CzechIdM configuration folders ==== | ||
In CzechIdM, you can store all deployment-specific configuration (i.e. database credentials) outside the war file. This is a configure-once approach which greatly simplifies future deployments. | In CzechIdM, you can store all deployment-specific configuration (i.e. database credentials) outside the war file. This is a configure-once approach which greatly simplifies future deployments. | ||
Line 94: | Line 97: | ||
* The **backup** directory stored Groovy scripts backups. | * The **backup** directory stored Groovy scripts backups. | ||
* The **data** directory stores various user-attached files. | * The **data** directory stores various user-attached files. | ||
+ | * | ||
Create the directory structure: | Create the directory structure: | ||
< | < | ||
mkdir -p / | mkdir -p / | ||
</ | </ | ||
+ | |||
+ | |||
==== 6. Create CzechIdM configuration ==== | ==== 6. Create CzechIdM configuration ==== | ||
Line 196: | Line 201: | ||
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=/ | logging.config=/ | ||
+ | |||
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=/opt/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=/ | idm.sec.core.backups.default.folder.path=/ | ||
Line 217: | Line 221: | ||
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 231: | Line 227: | ||
cipher.crypt.secret.keyPath=/ | cipher.crypt.secret.keyPath=/ | ||
- | + | # 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 240: | Line 237: | ||
# 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 268: | Line 245: | ||
idm.sec.core.role.admin=superAdminRole | idm.sec.core.role.admin=superAdminRole | ||
- | + | # Max file size of uploaded file. Values can use the suffixed " | |
- | # ID system against which to authenticate | + | spring.servlet.multipart.max-file-size=100MB |
- | idm.sec.security.auth.systemId= | + | spring.servlet.multipart.max-request-size=100MB |
- | + | ||
- | # 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=/ | + | |
</ | </ | ||
Line 328: | Line 300: | ||
</ | </ | ||
- | ==== Set correct permissions on CzechIdM files ==== | + | |
+ | |||
+ | ==== 7. Set correct permissions on CzechIdM files ==== | ||
+ | **CentOS** | ||
< | < | ||
chown tomcat: | chown tomcat: | ||
Line 335: | Line 310: | ||
chmod 640 / | chmod 640 / | ||
</ | </ | ||
- | ==== Adjust Tomcat' | + | |
+ | ==== 8. Adjust Tomcat' | ||
Apache Tomcat has to know where the new configuration is. Because CzechIdM uses SpringBoot project, we simply add the **/ | Apache Tomcat has to know where the new configuration is. Because CzechIdM uses SpringBoot project, we simply add the **/ | ||
- | Create new file **/ | + | Create new file **/ |
+ | |||
+ | <code bash:> | ||
CLASSPATH=/ | CLASSPATH=/ | ||
</ | </ | ||
- | And change owner of the file to tomcat:< | + | |
+ | And change owner of the file to tomcat: | ||
+ | < | ||
chown root:tomcat / | chown root:tomcat / | ||
</ | </ | ||
- | ==== Create dedicated Java truststore ==== | + | ==== 9. Create dedicated Java truststore ==== |
Java truststore is a file which contains SSL certificates which we consider trusted. Usually this means some certificates of end systems or their respective certificate authorities. | Java truststore is a file which contains SSL certificates which we consider trusted. Usually this means some certificates of end systems or their respective certificate authorities. | ||
When we need CzechIdM to communicate with some new system with SSL-encrypted way, we need to import particular certificate here and restart the Tomcat container. | When we need CzechIdM to communicate with some new system with SSL-encrypted way, we need to import particular certificate here and restart the Tomcat container. | ||
Line 372: | Line 352: | ||
systemctl restart tomcat.service | systemctl restart tomcat.service | ||
</ | </ | ||
- | ==== Deploy the CzechIdM ==== | + | ==== 10. Deploy the CzechIdM ==== |
- | Download the latest CzechIdM version. Currently it is idm-app-7.6.1.war. | + | Download the latest CzechIdM version. Currently it is idm-app-9.4.0.war. |
- | Ensure Tomcat is stopped:< | + | |
+ | Ensure Tomcat is stopped: | ||
+ | < | ||
systemctl stop tomcat.service | systemctl stop tomcat.service | ||
</ | </ | ||
- | Copy the identity manager WAR into webapps folder in Tomcat and name it **idm.war**:< | + | Copy the identity manager WAR into webapps folder in Tomcat and name it **idm.war**: |
- | cp idm-app-7.6.1.war / | + | < |
+ | cp idm-app-9.4.0.war / | ||
+ | chown tomcat: | ||
</ | </ | ||
Start the Tomcat container:< | Start the Tomcat container:< | ||
systemctl start tomcat.service | systemctl start tomcat.service | ||
</ | </ | ||
+ | If everything is set up right, the CzechIdM will deploy. Default log is **/ | ||
- | If everything is set up right, the CzechIdM will deploy. Default log is **/ | + | |
- | ===== Allow network services | + | ==== 11. Final Steps ==== |
+ | |||
+ | === Allow network services === | ||
Firewall may restrict the access to all port except ssh (22/tcp). To be able to use CzechIdM, allow port 443/tcp and reload firewalld: | Firewall may restrict the access to all port except ssh (22/tcp). To be able to use CzechIdM, allow port 443/tcp and reload firewalld: | ||
Line 393: | Line 380: | ||
</ | </ | ||
- | ===== Change default admin password | + | === Change default admin password === |
In the fresh CzechIdM installation, | In the fresh CzechIdM installation, | ||
- | ===== Configure IdM ===== | + | === Configure IdM === |
Follow some final configuration steps: [[tutorial: | Follow some final configuration steps: [[tutorial: | ||
+ |