---
title: The steps for Kron PAM Server (within the Secure Zone) and Kron PAM Mobile App Server (on the DMZ)
slug: kron-pam-installation-guides-v3/the-steps-for-kron-pam-server-within-the-secure-zone-and-kron-pam-mobile-app-server-on-the-dmz
docTags: 
createdAt: 2025-11-05T09:47:06.430Z
---

1\)    <u>**((PAM))**</u> All required PAM services (including **pam-commons**) should be started <font color="#6b7280">**on 10.10.0.1 (PAM server)**</font>**.**

<u>**The following command restarts all the services; this step might be skipped!!!**</u>



sudo -u pamuser bash -c 'export PATH=/home/pamuser/.local/bin:/usr/local/bin:$PATH; if podman compose version > /dev/null 2>&1; then PC="podman compose"; elif /usr/bin/python3.14 -m podman\_compose version > /dev/null 2>&1; then PC="/usr/bin/python3.14 -m podman\_compose"; else echo "calisan podman-compose bulunamadi, islem yapilmadi"; exit 1; fi; echo "compose: $PC"; C=/pam/docker-mgmt/docker-compose.yml; P="--profile kron-commons --profile kron-redis --profile **pam-commons&#x20;**--profile pam-addons --profile pam-mcp-bridge --profile pam-superset"; DBP=$(grep -E "^PAM\_DB\_PORT=" /pam/docker-mgmt/.env 2>/dev/null | cut -d= -f2); DBP=$\{DBP:-5444}; timeout 3 bash -c "\</dev/tcp/127.0.0.1/$DBP" 2>/dev/null && echo "DB ($DBP) erisilebilir" || \{ echo "DB ($DBP) kapali! Once postgresql-15 servisini baslat, islem yapilmadi"; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); for name in $(podman ps -a --format "&#x7B;&#x7B;.Names}}" | grep -vxF "$\{KC:-\_\_none\_\_}") $KC; do podman stop $name > /dev/null 2>&1; podman rm -f $name > /dev/null 2>&1 && echo "$name stopped" || echo "$name stop failed"; done; echo "ALL SERVICES STOPPED"; $PC -f $C $P up -d kron-commons > /tmp/pam\_restart.log 2>&1 && echo "kron-commons started" || \{ echo "kron-commons failed"; tail -30 /tmp/pam\_restart.log; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); \[ -z "$KC" ] && \{ echo "kron-commons container not found"; exit 1; }; SECONDS=0; until podman healthcheck run $KC > /dev/null 2>&1; do \[ $SECONDS -ge 600 ] && \{ echo "kron-commons 600s icinde healthy olmadi"; podman logs --tail 50 $KC; exit 1; }; sleep 5; echo "kron-commons healthy waiting... ($&#x7B;SECONDS}s, $(podman inspect $KC --format "state=&#x7B;&#x7B;.State.Status}} restarts=&#x7B;&#x7B;.RestartCount}}"))"; done; echo "kron-commons healthy"; $PC -f $C $P up -d > /tmp/pam\_restart.log 2>&1 && echo "ALL SERVICES STARTED" || \{ echo "ALL SERVICES FAILED"; tail -30 /tmp/pam\_restart.log; }'

2\)    <u>**((DMZ))**</u> All required PAM services should be stopped and the **pam-commons** service should be started <font color="#22C55E">**on 10.10.0.2 (mobile app server)**</font>**.**

<u>**The following command stops all the services; but starts pam-commons service!!!**</u>



sudo -u pamuser bash -c 'SERVICE="**pam-commons**"; export PATH=/home/pamuser/.local/bin:/usr/local/bin:$PATH; if podman compose version > /dev/null 2>&1; then PC="podman compose"; elif /usr/bin/python3.14 -m podman\_compose version > /dev/null 2>&1; then PC="/usr/bin/python3.14 -m podman\_compose"; else echo "calisan podman-compose bulunamadi, islem yapilmadi"; exit 1; fi; echo "compose: $PC"; C=/pam/docker-mgmt/docker-compose.yml; P="--profile kron-commons --profile kron-redis --profile **pam-commons** --profile pam-addons --profile pam-mcp-bridge --profile pam-superset"; DBP=$(grep -E "^PAM\_DB\_PORT=" /pam/docker-mgmt/.env 2>/dev/null | cut -d= -f2); DBP=$\{DBP:-5444}; timeout 3 bash -c "\</dev/tcp/127.0.0.1/$DBP" 2>/dev/null && echo "DB ($DBP) erisilebilir" || \{ echo "DB ($DBP) kapali! Once postgresql-15 servisini baslat, islem yapilmadi"; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); for name in $(podman ps -a --format "&#x7B;&#x7B;.Names}}" | grep -vxF "$\{KC:-\_\_none\_\_}") $KC; do podman stop $name > /dev/null 2>&1; podman rm -f $name > /dev/null 2>&1 && echo "$name stopped" || echo "$name stop failed"; done; echo "ALL SERVICES STOPPED"; $PC -f $C $P up -d kron-commons > /tmp/pam\_restart.log 2>&1 && echo "kron-commons started" || \{ echo "kron-commons failed"; tail -30 /tmp/pam\_restart.log; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); \[ -z "$KC" ] && \{ echo "kron-commons container not found"; exit 1; }; SECONDS=0; until podman healthcheck run $KC > /dev/null 2>&1; do \[ $SECONDS -ge 600 ] && \{ echo "kron-commons 600s icinde healthy olmadi"; podman logs --tail 50 $KC; exit 1; }; sleep 5; echo "kron-commons healthy waiting... ($&#x7B;SECONDS}s, $(podman inspect $KC --format "state=&#x7B;&#x7B;.State.Status}} restarts=&#x7B;&#x7B;.RestartCount}}"))"; done; echo "kron-commons healthy"; $PC -f $C $P up -d $SERVICE > /tmp/pam\_restart.log 2>&1 && echo "$SERVICE STARTED" || \{ echo "$SERVICE FAILED"; tail -30 /tmp/pam\_restart.log; }'

3\)    <u>**((PAM))**</u> On the System Configuration Man. page of the Kron PAM Web GUI <font color="#6b7280">**(10.10.0.1)**</font>, **mobile.tomcat.url** should be set with Kron PAM Mobile App Server’s info. (E.g., <font color="#22C55E">**https\://10.10.0.2\:9443/mobile-api/rest**</font>**&#x20;OR&#x20;**<font color="#22C55E">**https\://mobile129.kron.com.tr\:9443/mobile-api/rest**</font>)

4\)    <u>**((PAM))**</u> The following jobs related to push notification system should be defined on the Kron PAM Web GUI **(**<font color="#6b7280">**10.10.0.1**</font>**)**: SCPolicyNotifierJob, SendPushMessageJob.

5\)    <u>**((DMZ))**</u> The following lines should be changed on **.env** file **on&#x20;**<font color="#22C55E">**10.10.0.2**</font>**.**

**vi /pam/docker-mgmt/.env**



·         COMPOSE\_PROFILES=kron-commons,kron-redis,pam-commons,pam-addons,pam-nginx,pam-superset,pam-mcp-bridg&#x65;**&#x20;===> COMPOSE\_PROFILES=kron-commons,pam-commons**

·         HOST\_GATEWAY=<font color="#22C55E">**10.10.0.2**</font>**&#x20;====>** HOST\_GATEWAY=<font color="#6b7280">**10.10.0.1**</font>

·         APP\_INT\_SPRING\_BOOT\_ADMIN\_URL=https\://kron-commons-aggregator:8443  **====>**  APP\_INT\_SPRING\_BOOT\_ADMIN\_URL=**""**

·         PAM\_DB\_PASSWORD='&#x7B;cipher}<font color="#22C55E">**10.10.0.2’s DB PASSWORD as ciphertext**</font>' **====>** PAM\_DB\_PASSWORD='&#x7B;cipher}<font color="#6b7280">**10.10.0.1’s DB PASSWORD as ciphertext**</font>’

·         PAM\_COMMONS\_AUTH\_ENABLED=true **====>&#x20;**&#x50;AM\_COMMONS\_AUTH\_ENABLED=**false**

·         APP\_INT\_PAM\_APPLICATION\_URL=https\://host.docker.internal **===> APP\_INT\_PAM\_APPLICATION\_URL=https\://**<font color="#6b7280">**10.10.0.1**</font>

6\)    <u>**((DMZ))---optional for certificate---**</u> If the customer has their own valid certificate for mobile service:&#x20;

If the customer uses its own certificate for accessing mobile URL, the certificate should be uploaded to **/pam/gui/conf/cert** (e.g., **kron.com.tr.jks**). Note that, the purpose of using this certificate is different from the self signed certificate to access a specific docker service on the Kron PAM Server.



·         Put the jks (e.g. **kron.com.tr.jks**) file to **/pam/gui/conf/cert** **on&#x20;**<font color="#22C55E">**10.10.0.2**</font>**.**

·         Edit the following lines of **vi /pam/docker-mgmt/.env** located under **/pam/docker-mgmt/**<font color="#22C55E">**on 10.10.0.2**</font>**:**



PAM\_CERT\_FILE=\{**CUSTOMER’s JKS FILE NAME**}

PAM\_CERT\_FILE\_ALIAS=\{**CUSTOMER’s ALIAS-NAME**}

PAM\_CERT\_FILE\_STORE\_PASSWORD=\{**CUSTOMER’s STORE PASSWORD**}

PAM\_CERT\_FILE\_PASSWORD=\{**CUSTOMER’s SSL PASSWORD**}

PAM\_CERT\_FILE\_STORE\_TYPE=**jks**



MOBILE\_API\_CERT=\{**CUSTOMER’s JKS FILE NAME**}



<u>**E.g.:**</u>

PAM\_CERT\_FILE=<font color="#22C55E">**kron.com.tr.jks**</font>

PAM\_CERT\_FILE\_ALIAS=<font color="#22C55E">**kron** </font>

PAM\_CERT\_FILE\_STORE\_PASSWORD=<font color="#22C55E">**kr10ipsla**</font>

PAM\_CERT\_FILE\_PASSWORD=<font color="#22C55E">**kr10ipsla**</font>

PAM\_CERT\_FILE\_STORE\_TYPE=<font color="#22C55E">**jks**</font>

**&#x9;**

<u>\*LISTING the certificates’ configurations: </u><font color="#22C55E">**on 10.10.0.2**</font>



sudo keytool -list -v -keystore /pam/gui/conf/cert/**kron.com.tr.jks** -storepass **kr10ipsla**

7\)    <u>**((PAM))**</u> The following line should be changed on **.env** file <font color="#6b7280">**on 10.10.0.1**</font>**.**

**vi /pam/docker-mgmt/.env**

·         KRON\_COMMONS\_CONFIG\_PORT="127.0.0.1:8001"**&#x20;===>&#x20;**&#x4B;RON\_COMMONS\_CONFIG\_PORT="0.0.0.0:8001"

8\)    <u>**((DMZ))**</u> The following **docker-compose.yml** file should be used <font color="#22C55E">**on 10.10.0.2**</font> under /pam/docker-mgmt/.

**------------------------------------------------------------------------------------------**



x-int-paths:

&#x20; log: \&p-log /app/logs

&#x20; cold-log: \&p-cold-log /app/cold-logs

&#x20; log-config: \&p-log-config /app/config-repo/log4j2.xml

&#x20; security-config: \&p-security-config /app/security/security.properties

&#x20; license: \&p-license /app/license

&#x20; license-path: \&p-license-path /app/license/licence.properties

&#x20; tools: \&p-tools /app/tools

&#x20; reports: \&p-reports /app/reports

&#x20; uploads: \&p-uploads /app/uploads

&#x20; templates: \&p-templates /app/templates

&#x20; config-repo: \&p-config-repo /app/config-repo

&#x20; db-certs: \&p-db-certs /app/db-certs

&#x20; certs: \&p-certs /app/certs

&#x20; metadata: \&p-metadata /app/metadata

&#x20; pam-certs: \&p-pam-certs /app/pam-certs

&#x20; pam-commons-cert-path: \&p-pam-commons-cert-path /app/pam-certs/$&#x7B;PAM\_COMMONS\_CERT}

&#x20; pam-commons-key-store: \&p-pam-commons-key-store file:/app/pam-certs/$&#x7B;PAM\_COMMONS\_CERT}

&#x20; key-store: \&p-key-store file:/app/certs/aioc.jks

&#x20; trust-store: \&p-trust-store file:/app/certs/aioc.p12

&#x20; trust-store-path: \&p-trust-store-path /app/certs/aioc.p12



x-volumes:

&#x20; config-repo: \&vol-config-repo

&#x20;   type: bind

&#x20;   source: $&#x7B;CONFIG\_REPO\_DIRECTORY}

&#x20;   target: \*p-config-repo

&#x20; certs: \&vol-certs

&#x20;   type: bind

&#x20;   source: $&#x7B;APPLICATION\_CERTS\_DIRECTORY}

&#x20;   target: \*p-certs

&#x20; db-certs: \&vol-db-certs

&#x20;   type: bind

&#x20;   source: $&#x7B;DATABASE\_CERTS\_DIRECTORY}

&#x20;   target: \*p-db-certs

&#x20; security-config: \&vol-security-config

&#x20;   type: bind

&#x20;   source: $&#x7B;SECURITY\_FILES\_DIRECTORY}

&#x20;   target: \*p-security-config

&#x20; log4j2: \&vol-log4j2

&#x20;   type: bind

&#x20;   source: $&#x7B;LOG4J2\_PATH}

&#x20;   target: \*p-log-config

&#x20; logs: \&vol-logs

&#x20;   type: bind

&#x20;   source: $&#x7B;LOG\_DIRECTORY\_PATH}

&#x20;   target: \*p-log

&#x20; cold-logs: \&vol-cold-logs

&#x20;   type: bind

&#x20;   source: $&#x7B;COLD\_LOG\_DIRECTORY\_PATH}

&#x20;   target: \*p-cold-log

&#x20; license: \&vol-license

&#x20;   type: bind

&#x20;   source: $&#x7B;LICENSE\_FILE\_DIRECTORY}$&#x7B;LICENSE\_FILE\_NAME}

&#x20;   target: \*p-license-path

&#x20; templates: \&vol-templates

&#x20;   type: bind

&#x20;   source: $&#x7B;MAIL\_TEMPLATES\_DIRECTORY}

&#x20;   target: \*p-templates

&#x20; pam-certs: \&vol-pam-certs

&#x20;   type: bind

&#x20;   source: $&#x7B;PAM\_CERTS\_DIRECTORY}

&#x20;   target: \*p-pam-certs

&#x20; pam-commons-cert: \&vol-pam-commons-cert

&#x20;   type: bind

&#x20;   source: $&#x7B;PAM\_COMMONS\_SSL\_KEY\_STORE\_PATH}

&#x20;   target: \*p-pam-commons-cert-path



x-container-local-directories: \&container-local-directories

&#x20; APP\_INT\_LOG\_DIRECTORY\_PATH: \*p-log

&#x20; APP\_INT\_COLD\_LOG\_DIRECTORY\_PATH: \*p-cold-log

&#x20; APP\_INT\_LOG\_CONFIG\_FILE\_PATH: \*p-log-config

&#x20; APP\_INT\_SECURITY\_CONFIG\_PATH: \*p-security-config

&#x20; APP\_INT\_LICENSE\_PATH: \*p-license

&#x20; APP\_INT\_TOOL\_PATH: \*p-tools

&#x20; APP\_INT\_REPORTS\_PATH: \*p-reports

&#x20; APP\_INT\_UPLOAD\_DIRECTORY\_PATH: \*p-uploads

&#x20; APP\_INT\_TEMPLATE\_FOLDER: \*p-templates

&#x20; APP\_INT\_CONFIG\_REPO\_DIR: \*p-config-repo

&#x20; APP\_INT\_DB\_CERTS\_PATH: \*p-db-certs

&#x20; APP\_INT\_CERTS\_PATH: \*p-certs

&#x20; APP\_INT\_METADATA\_DB\_DIRECTORY: \*p-metadata

&#x20; APP\_INT\_PAM\_CERTS\_PATH: \*p-pam-certs



x-pam-common-directories: \&pam-common-directories

&#x20; \<\<: \*container-local-directories

&#x20; LOG\_DIRECTORY\_PATH: \*p-log

&#x20; COLD\_LOG\_DIRECTORY\_PATH: \*p-cold-log

&#x20; LOG\_CONFIG\_FILE\_PATH: \*p-log-config

&#x20; SECURITY\_CONFIG\_PATH: \*p-security-config

&#x20; TOOL\_PATH: \*p-tools

&#x20; REPORTS\_PATH: \*p-reports

&#x20; UPLOAD\_DIRECTORY\_PATH: \*p-uploads

&#x20; TEMPLATE\_FOLDER: \*p-templates

&#x20; CONFIG\_REPO\_DIR: \*p-config-repo

&#x20; LICENSE\_PATH: \*p-license-path

&#x20; PAM\_COMMONS\_SSL\_KEY\_STORE: \*p-pam-commons-key-store



x-pam-common-variables: \&pam-common-variables

&#x20; \<\<: \*pam-common-directories

&#x20; INSTANCE\_NAME: $&#x7B;INSTANCE\_NAME}

&#x20; TZ: $&#x7B;TIME\_ZONE}

&#x20; SPRING\_PROFILES\_ACTIVE: $&#x7B;ACTIVE\_SPRING\_PROFILES}

&#x20; LIQUIBASE\_ENABLED: $\{LIQUIBASE\_ENABLED:-false}

&#x20; APPLICATION\_PORT: 8443

&#x20; MANAGEMENT\_PORT: 8091



&#x20;**&#x20;###-------------------------------**

**&#x20; ###CHANGE THIS: CONFIG\_SERVER\_URI**

**&#x20; ###-------------------------------**

&#x20; \# Config Server Environment Values

&#x20; CONFIG\_SERVER\_URI: https\://<font color="#6b7280">**10.10.0.1**</font>:8001

&#x20; CONFIG\_USER: aioc

&#x20; CONFIG\_PASSWORD: aioc

&#x20;&#x20;

&#x20; \# SSL Environment Values

&#x20; SSL\_ENABLE: true

&#x20; SSL\_KEY\_STORE\_TYPE: PKCS12

&#x20; KEY\_ALIAS: aioc

&#x20; KEY\_STORE: \*p-key-store

&#x20; TRUST\_STORE: \*p-trust-store

&#x20; TRUSTSTORE\_RESOURCE\_FILE: \*p-trust-store-path

&#x20; KEYSTORE\_RESOURCE\_FILE: \*p-trust-store-path



&#x20; \#KRON\_COMMON\_SERVICE\_URLs

&#x20; REDIS\_HOST: $&#x7B;APP\_INT\_REDIS\_HOST}

&#x20; REDIS\_PORT: $&#x7B;APP\_INT\_REDIS\_PORT}

&#x20; SPRING\_BOOT\_ADMIN\_URL: $&#x7B;APP\_INT\_SPRING\_BOOT\_ADMIN\_URL}

&#x20; KRON\_COMMONS\_URL: $&#x7B;APP\_INT\_KRON\_COMMONS\_URL}

&#x20; NETWORK\_SERVICE\_SOCKET\_URL: $&#x7B;APP\_INT\_NETWORK\_SERVICE\_SOCKET\_URL}

&#x20; AUTH\_SERVICE\_URL: $&#x7B;APP\_INT\_AUTH\_SERVICE\_URL}

&#x20; LICENSE\_SERVICE\_URL: $&#x7B;APP\_INT\_LICENSE\_SERVICE\_URL}

&#x20; NETWORK\_SERVICE\_URL: $&#x7B;APP\_INT\_NETWORK\_SERVICE\_URL}

&#x20; NOTIFICATION\_SERVICE\_URL: $&#x7B;APP\_INT\_NOTIFICATION\_SERVICE\_URL}

&#x20; ALFRED\_SERVICE\_URL: $&#x7B;APP\_INT\_ALFRED\_SERVICE\_URL}

&#x20; PAM\_AUTH\_SERVICE\_URL: $&#x7B;APP\_INT\_PAM\_AUTH\_SERVICE\_URL}



&#x20; \# KRON COMMONS

&#x20; ALFRED\_ENABLED: $&#x7B;KRON\_COMMONS\_ALFRED\_ENABLED}

&#x20; LICENSE\_ENABLED: $&#x7B;KRON\_COMMONS\_LICENSE\_ENABLED}

&#x20; NETWORK\_ENABLED: $&#x7B;KRON\_COMMONS\_NETWORK\_ENABLED}



&#x20; \# PAM COMMONS

&#x20; PAM\_COMMONS\_AUTH\_ENABLED: $&#x7B;PAM\_COMMONS\_AUTH\_ENABLED}

&#x20; PAM\_COMMONS\_MOBILE\_API\_ENABLED: $&#x7B;PAM\_COMMONS\_MOBILE\_API\_ENABLED}



&#x20; \# MOBILE APP

&#x20; PAM\_COMMONS\_SSL\_ENABLE: $&#x7B;PAM\_COMMONS\_SSL\_ENABLE}

&#x20; PAM\_COMMONS\_SSL\_ALIAS: $&#x7B;PAM\_COMMONS\_CERT\_FILE\_ALIAS}

&#x20; PAM\_COMMONS\_SSL\_STORE\_TYPE: $&#x7B;PAM\_COMMONS\_CERT\_FILE\_STORE\_TYPE}

&#x20; PAM\_COMMONS\_SSL\_STORE\_PASSWORD: $&#x7B;PAM\_COMMONS\_CERT\_FILE\_STORE\_PASSWORD}

&#x20; PAM\_COMMONS\_SSL\_PASSWORD: $&#x7B;PAM\_COMMONS\_CERT\_FILE\_PASSWORD}



&#x20; \# ===> REDIS CONFIGURATION

&#x20; REDIS\_USERNAME: pam-redis

&#x20; REDIS\_PASSWORD: '&#x7B;cipher}537c807d7d7ea0516a368439579dcbfd9f9487e5cc39facf32e132ebce20add40c248bb0c36d659044cc34ade1394eeb'



&#x20; \# PAM

&#x20; PAM\_URL: $&#x7B;APP\_INT\_PAM\_APPLICATION\_URL}



x-pam-db-variables: \&pam-common-db-variables

&#x20; \<\<: \*pam-common-variables

&#x20; DB\_URL: $&#x7B;PAM\_DB\_URL}

&#x20; DB\_USERNAME: $&#x7B;PAM\_DB\_USERNAME}

&#x20; DB\_PASSWORD: $&#x7B;PAM\_DB\_PASSWORD}

&#x20; DB\_SCHEMA: $&#x7B;PAM\_DB\_SCHEMA}

&#x20; DB\_DRIVER: org.postgresql.Driver



&#x20; BASE\_URL: $&#x7B;APP\_INT\_PAM\_APPLICATION\_URL}

&#x20; PAM\_BASE\_LOGIN\_URL: $&#x7B;PAM\_BASE\_LOGIN\_URL}



x-healthcheck-java: \&healthcheck-java

&#x20; test: curl -fsS -m 2 http\://localhost:$$MANAGEMENT\_PORT/actuator/health | grep -q '"status":"UP"' || exit 1

&#x20; interval: 6s

&#x20; retries: 20

&#x20; start\_period: 8s

&#x20; timeout: 5s



x-no-new-privs: \&no-new-privs "no-new-privileges\:true"



services:

**&#x20; kron-commons:**

**&#x20;   image: dockerhub.kron.com.tr/kron-commons/kron-commons:26.12.4$\{OS\_IMAGE\_POSTFIX:-}**

&#x20;   user: "0:65534"

&#x20;   security\_opt:

&#x20;     \- \*no-new-privs

&#x20;   ports:

&#x20;     \- "$&#x7B;KRON\_COMMONS\_CONFIG\_PORT}:8001"

&#x20;     \- "$&#x7B;KRON\_COMMONS\_PORT}:8443"

&#x20;   profiles:

&#x20;     \- kron-commons

&#x20;   environment:

&#x20;     \<\<: \*pam-common-db-variables

&#x20;     SPRING\_APPLICATION\_JSON: '\{"spring.jpa.properties.hibernate.hbm2ddl.auto":"none","spring.boot.admin.client.enabled"\:false}'

&#x20;     AGGREGATOR\_CONFIG\_SERVER\_ENABLED: true

&#x20;   volumes:

&#x20;     \- \*vol-config-repo

&#x20;     \- \*vol-certs

&#x20;     \- \*vol-db-certs

&#x20;     \- \*vol-security-config

&#x20;     \- \*vol-log4j2

&#x20;     \- \*vol-logs

&#x20;     \- \*vol-cold-logs

&#x20;     \- \*vol-license

&#x20;     \- \*vol-templates

&#x20;     \- type: bind

&#x20;       source: $&#x7B;DMI\_DIRECTORY}

&#x20;       target: /etc/dmi

&#x20;   healthcheck: \*healthcheck-java

&#x20;   restart: on-failure:10

&#x20;   networks:

&#x20;     \- kron-network

&#x20;   extra\_hosts:

&#x20;     \- "host.docker.internal:$&#x7B;HOST\_GATEWAY}"

**&#x20;    &#x20;**<font color="#6b7280">**- ""\{PAM-INSTANCE NAME of 10.10.0.1\}\:10.10.0.1"**</font>

**###-------------------------------**

**###CHANGE THIS: extra\_hosts: e.g., -&#x20;**<font color="#6b7280">**“pam-01\:10.10.0.1”**</font>

**###-------------------------------**



**&#x20; pam-commons:**

**&#x20;   image: dockerhub.kron.com.tr/pam/pam-commons:3.9.0$\{OS\_IMAGE\_POSTFIX:-}**

&#x20;   user: "0:65534"

&#x20;   security\_opt:

&#x20;     \- \*no-new-privs

&#x20;   container\_name: pam-commons

&#x20;   environment:

&#x20;     \<\<: \*pam-common-db-variables

&#x20;     JAVA\_TOOL\_OPTIONS: "-Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true"

&#x20;   ports:

&#x20;     \- "$&#x7B;PAM\_COMMONS\_PORT}:8443"

&#x20;   profiles:

&#x20;     \- pam-commons

&#x20;   volumes:

&#x20;     \- \*vol-config-repo

&#x20;     \- \*vol-log4j2

&#x20;     \- \*vol-certs

&#x20;     \- \*vol-db-certs

&#x20;     \- \*vol-security-config

&#x20;     \- \*vol-logs

&#x20;     \- \*vol-cold-logs

&#x20;     \- \*vol-license

&#x20;     \- \*vol-pam-commons-cert

&#x20;   healthcheck: \*healthcheck-java

&#x20;   restart: on-failure:10

&#x20;   depends\_on:

&#x20;     kron-commons:

&#x20;       condition: service\_healthy

&#x20;   extra\_hosts:

&#x20;     \- "host.docker.internal:$&#x7B;HOST\_GATEWAY}"

**&#x20;    &#x20;**<font color="#6b7280">**- ""\{PAM-INSTANCE NAME of 10.10.0.1\}\:10.10.0.1"**</font>

&#x20;   networks:

&#x20;     \- kron-network

**###-------------------------------**

**###CHANGE THIS: extra\_hosts: e.g., -&#x20;**<font color="#6b7280">**“pam-01\:10.10.0.1”**</font>

**###-------------------------------**



networks:

&#x20; kron-network:

&#x20;   name: kron-network  # creates this named network if it doesn't already exist

&#x20;   driver: bridge

**------------------------------------------------------------------------------------------**

9\)    <u>**((PAM))**</u> Using the RSA key pair created with the **aioc** alias, the environment configurations (kron-commons-config) in the Docker container on the Kron PAM server can be accessed by the Kron PAM Mobile App Server. For this, instead of using the customer's existing key pair, <u>**a self-signed certificate is used**</u>. This RSA key pair is stored in different formats and keystore files (PKCS#12 and JKS) but with the same alias (**aioc**). The jks and p12 files located at /pam/docker-mgmt/cert should be recreated with keytool commands, in this scenario. **(If the Kron PAM server and Kron PAM Mobile App Server are installed on the same server, these files should stand as is).**





<u>\*LISTING the certificates’ configurations: </u><font color="#6b7280">**on 10.10.0.1**</font>

-JKS:

sudo keytool -list -v -keystore /pam/docker-mgmt/cert/**aioc.jks** -storepass **krondev10**



-P12:&#x20;

sudo keytool -list -v -keystore /pam/docker-mgmt/cert/**aioc.p12** -storepass **krondev10** -storetype PKCS12



<u>\*DELETING the certificates’ configurations: </u><font color="#6b7280">**on 10.10.0.1**</font>

-JKS:&#x20;

sudo keytool -delete -alias aioc -keystore /pam/docker-mgmt/cert/**aioc.jks** -storepass **krondev10**



-P12:&#x20;

sudo keytool -delete -alias aioc -keystore /pam/docker-mgmt/cert/**aioc.p12** -storepass **krondev10**





<u>\*DELETING the certificate files: (Take the backup for these files) </u><font color="#6b7280">**on 10.10.0.1**</font>

-JKS:&#x20;

rm -rf /pam/docker-mgmt/cert/**aioc.jks**



-P12:&#x20;

rm -rf /pam/docker-mgmt/cert/**aioc.p12**





<u>\*CREATING the certificate files and configurations: </u><font color="#6b7280">**on 10.10.0.1**</font>

-JKS: (if the DMZ server’s domain name is used (<font color="#22C55E">**mobile129.kron.com.tr**</font>), add it here as DNS: <font color="#22C55E">**mobile129.kron.com.tr**</font> too)



sudo keytool -genkeypair -alias aioc -keyalg RSA -keysize 2048 -dname "CN=localhost,OU=Kron,O=Kron,C=TR" -ext "SAN\:c=DNS\:localhost,DNS\:host.docker.internal,DNS\:kron-commons,DNS\:pam-commons,DNS\:pam-addons,DNS\:kai-mcp-bridge,DNS\:mcp-bridge,DNS\:redis,DNS\:superset,DNS\:nginx,DNS\:kron-commons-aggregator,DNS\:kron-commons-config,DNS\:kron-commons-alfred,DNS\:kron-commons-auth,DNS\:kron-commons-license,DNS\:kron-commons-network,DNS\:kron-commons-notification,DNS\:pta,DNS\:auth,DNS\:uba,DNS\:mobile-api,DNS\:tcp-proxy,DNS\:kron-dam-metadata,DNS\:kron-dam-portal,IP:**127.0.0.1**,IP:<font color="#6b7280">**10.10.0.1**</font>,IP:<font color="#22C55E">**10.10.0.2**</font>" -storepass **krondev10** -keypass **krondev10** -keystore /pam/docker-mgmt/cert/**aioc.jks** -validity 3650



-P12: (if the DMZ server’s domain name is used (<font color="#22C55E">**mobile129.kron.com.tr**</font>), add it here as DNS: <font color="#22C55E">**mobile129.kron.com.tr**</font> too)



sudo keytool -genkeypair -alias aioc -keyalg RSA -keysize 2048 -storetype PKCS12 -dname "CN=localhost,OU=Kron,O=Kron,C=TR" -ext "SAN\:c=DNS\:localhost,DNS\:host.docker.internal,DNS\:kron-commons,DNS\:pam-commons,DNS\:pam-addons,DNS\:kai-mcp-bridge,DNS\:mcp-bridge,DNS\:redis,DNS\:superset,DNS\:nginx,DNS\:kron-commons-aggregator,DNS\:kron-commons-config,DNS\:kron-commons-alfred,DNS\:kron-commons-auth,DNS\:kron-commons-license,DNS\:kron-commons-network,DNS\:kron-commons-notification,DNS\:pta,DNS\:auth,DNS\:uba,DNS\:mobile-api,DNS\:tcp-proxy,DNS\:kron-dam-metadata,DNS\:kron-dam-portal,IP:**127.0.0.1**,IP:<font color="#6b7280">**10.10.0.1**</font>,IP:<font color="#22C55E">**10.10.0.2**</font>" -storepass **krondev10** -keypass **krondev10** -keystore /pam/docker-mgmt/cert/**aioc.p12** -validity 3650

10\)    <u>**((PAM))&#x20;**</u>The following keytool commands should be executed to import certificate <font color="#6b7280">**on 10.10.0.1**</font>:



yes | sudo keytool -importkeystore -srckeystore /pam/docker-mgmt/cert/**aioc.jks** -srcstorepass **krondev10** -destkeystore /pam/docker-mgmt/cert/**aioc.p12&#x20;**-deststoretype pkcs12 -storepass **krondev10**





yes | sudo keytool -importkeystore -noprompt \\

&#x20; -srckeystore /pam/docker-mgmt/cert/**aioc.p12** -srcstoretype PKCS12 -srcstorepass **krondev10** -srcalias **aioc** \\

&#x20; -destkeystore /pam/docker-mgmt/cert/**aioc.jks** -deststoretype JKS -deststorepass **krondev10** -destkeypass **krondev10** -destalias **kron-commons**

11\)    <u>**((PAM))&#x20;**</u>The ownership and mode configurations should be changed for these files <font color="#6b7280">**on 10.10.0.1**</font>**:**



sudo chown pamuser\:pam-group /pam/docker-mgmt/cert/**aioc.jks** /pam/docker-mgmt/cert/**aioc.p12** && sudo chmod 750 /pam/docker-mgmt/cert/**aioc.jks** /pam/docker-mgmt/cert/**aioc.p12**

12\)    <u>**((PAM))&#x20;**</u>All of the docker services on the Kron PAM server should be restarted <font color="#6b7280">**on 10.10.0.1**</font>:



sudo -u pamuser bash -c 'export PATH=/home/pamuser/.local/bin:/usr/local/bin:$PATH; if podman compose version > /dev/null 2>&1; then PC="podman compose"; elif /usr/bin/python3.14 -m podman\_compose version > /dev/null 2>&1; then PC="/usr/bin/python3.14 -m podman\_compose"; else echo "calisan podman-compose bulunamadi, islem yapilmadi"; exit 1; fi; echo "compose: $PC"; C=/pam/docker-mgmt/docker-compose.yml; P="--profile kron-commons --profile kron-redis --profile **pam-commons&#x20;**--profile pam-addons --profile pam-mcp-bridge --profile pam-superset"; DBP=$(grep -E "^PAM\_DB\_PORT=" /pam/docker-mgmt/.env 2>/dev/null | cut -d= -f2); DBP=$\{DBP:-5444}; timeout 3 bash -c "\</dev/tcp/127.0.0.1/$DBP" 2>/dev/null && echo "DB ($DBP) erisilebilir" || \{ echo "DB ($DBP) kapali! Once postgresql-15 servisini baslat, islem yapilmadi"; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); for name in $(podman ps -a --format "&#x7B;&#x7B;.Names}}" | grep -vxF "$\{KC:-\_\_none\_\_}") $KC; do podman stop $name > /dev/null 2>&1; podman rm -f $name > /dev/null 2>&1 && echo "$name stopped" || echo "$name stop failed"; done; echo "ALL SERVICES STOPPED"; $PC -f $C $P up -d kron-commons > /tmp/pam\_restart.log 2>&1 && echo "kron-commons started" || \{ echo "kron-commons failed"; tail -30 /tmp/pam\_restart.log; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); \[ -z "$KC" ] && \{ echo "kron-commons container not found"; exit 1; }; SECONDS=0; until podman healthcheck run $KC > /dev/null 2>&1; do \[ $SECONDS -ge 600 ] && \{ echo "kron-commons 600s icinde healthy olmadi"; podman logs --tail 50 $KC; exit 1; }; sleep 5; echo "kron-commons healthy waiting... ($&#x7B;SECONDS}s, $(podman inspect $KC --format "state=&#x7B;&#x7B;.State.Status}} restarts=&#x7B;&#x7B;.RestartCount}}"))"; done; echo "kron-commons healthy"; $PC -f $C $P up -d > /tmp/pam\_restart.log 2>&1 && echo "ALL SERVICES STARTED" || \{ echo "ALL SERVICES FAILED"; tail -30 /tmp/pam\_restart.log; }'

13\)    <u>**((DMZ))&#x20;**</u>All of the pam-related services on the Kron PAM Mobile App Server should be stopped <font color="#22C55E">**on 10.10.0.2**</font>:

**ks**

**stop all services**

14\)    <u>**((PAM))&#x20;**</u>The certificate files (jks and p12) created in the 9th step (<font color="#6b7280">**10.10.0.1**</font>) should be transferred to Kron PAM Mobile App Server (<font color="#22C55E">**10.10.0.2**</font>**)**.

**Note that, jks and p12 files should be identical on both environments. To check this, the following commands should be run on both environments:**

sha256sum /pam/docker-mgmt/cert/aioc.p12

sha256sum /pam/docker-mgmt/cert/aioc.jks



**! If the files are not identical due to the 3rd party SSH/SFTP tool (e.g. MobaXterm) usage, sshpass command can be used for file transfer:**

&#x20;

sshpass -p **‘your-password’&#x20;**&#x72;sync -avz /pam/docker-mgmt/cert/**aioc.p12 pamuser**@<font color="#22C55E">**10.10.0.2**</font>:/pam/docker-mgmt/cert



sshpass -p **‘your-password’&#x20;**&#x72;sync -avz /pam/docker-mgmt/cert/**aioc.jks pamuser**@<font color="#22C55E">**10.10.0.2**</font>:/pam/docker-mgmt/cert

15\)    <u>**((DMZ))**</u> After the file transfer from Kron PAM server to Kron PAM Mobile App Server, ownership and mode configurations should be changed for these files<font color="#22C55E"> **on 10.10.0.2**</font>**:**



sudo chown pamuser\:pam-group /pam/docker-mgmt/cert/**aioc.jks** /pam/docker-mgmt/cert/**aioc.p12** && sudo chmod 755 /pam/docker-mgmt/cert/**aioc.jks** /pam/docker-mgmt/cert/**aioc.p12**

16\)    <u>**((DMZ))**</u> All of the docker services on the Kron PAM Mobile App Server should be stopped and the mobile-api service should be started <font color="#22C55E">on **10.10.0.2**</font>**:**



sudo -u pamuser bash -c 'SERVICE="**pam-commons**"; export PATH=/home/pamuser/.local/bin:/usr/local/bin:$PATH; if podman compose version > /dev/null 2>&1; then PC="podman compose"; elif /usr/bin/python3.14 -m podman\_compose version > /dev/null 2>&1; then PC="/usr/bin/python3.14 -m podman\_compose"; else echo "calisan podman-compose bulunamadi, islem yapilmadi"; exit 1; fi; echo "compose: $PC"; C=/pam/docker-mgmt/docker-compose.yml; P="--profile kron-commons --profile kron-redis --profile **pam-commons** --profile pam-addons --profile pam-mcp-bridge --profile pam-superset"; DBP=$(grep -E "^PAM\_DB\_PORT=" /pam/docker-mgmt/.env 2>/dev/null | cut -d= -f2); DBP=$\{DBP:-5444}; timeout 3 bash -c "\</dev/tcp/127.0.0.1/$DBP" 2>/dev/null && echo "DB ($DBP) erisilebilir" || \{ echo "DB ($DBP) kapali! Once postgresql-15 servisini baslat, islem yapilmadi"; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); for name in $(podman ps -a --format "&#x7B;&#x7B;.Names}}" | grep -vxF "$\{KC:-\_\_none\_\_}") $KC; do podman stop $name > /dev/null 2>&1; podman rm -f $name > /dev/null 2>&1 && echo "$name stopped" || echo "$name stop failed"; done; echo "ALL SERVICES STOPPED"; $PC -f $C $P up -d kron-commons > /tmp/pam\_restart.log 2>&1 && echo "kron-commons started" || \{ echo "kron-commons failed"; tail -30 /tmp/pam\_restart.log; exit 1; }; KC=$(podman ps -a --filter label=com.docker.compose.service=kron-commons --format "&#x7B;&#x7B;.Names}}" | head -1); \[ -z "$KC" ] && \{ echo "kron-commons container not found"; exit 1; }; SECONDS=0; until podman healthcheck run $KC > /dev/null 2>&1; do \[ $SECONDS -ge 600 ] && \{ echo "kron-commons 600s icinde healthy olmadi"; podman logs --tail 50 $KC; exit 1; }; sleep 5; echo "kron-commons healthy waiting... ($&#x7B;SECONDS}s, $(podman inspect $KC --format "state=&#x7B;&#x7B;.State.Status}} restarts=&#x7B;&#x7B;.RestartCount}}"))"; done; echo "kron-commons healthy"; $PC -f $C $P up -d $SERVICE > /tmp/pam\_restart.log 2>&1 && echo "$SERVICE STARTED" || \{ echo "$SERVICE FAILED"; tail -30 /tmp/pam\_restart.log; }'

17\)    <u>**((DMZ))**</u> Lastly, check pam-commons service on the Kron PAM Mobile App Server **(**<font color="#22C55E">**10.10.0.2**</font>**)**:



**sudo -u pamuser bash -c 'podman logs -f --tail 1000 pam-commons'**

18\)    **((PAM))&#x20;**&#x4C;ast trick: Increase the log level on the **pam-commons-default.yaml** file under **/pam/docker-mgmt/config-repo**:

logging:

&#x20; level:

&#x20;   com.kron.pam: ERROR&#x20;

**===>**

logging:

&#x20; level:

&#x20;   com.kron.pam: INFO

