Skip to content
vky25 edited this page Apr 10, 2022 · 1 revision

Welcome to the PDA-IAM wiki! GETTING STARTED

Prerequisites

  • Git
  • Docker

Installation

Note: Before installing the application, we need to create an AWS public bucket

Building the library

git clone https://github.com/arghyam/PDA-IAM.git

cd PDA-IAM

git checkout patch/POC

Configuration

Copy the below list of configuration and add it to application.properties file inside src/main/resources folder, insert the values with proper configuration details.

#Keycloak Configuration

keycloak.principal-attribute=preferred_username

keycloak.auth-server-url=http://localhost:8080/auth/ #Keycloak URL

keycloak.realm=master

keycloak-client-id=admin-cli

keycloak.credentials.secret= #keycloak client secret key

keycloak-public-key= #keycloak realm Public key

client.granttype=password # Keycloak Grant Type

admin-user-username=admin # Keycloak login username

admin-user-password=admin # Keycloak login password

keycloak.resource=account

keycloak.bearer-only = true

#SpringBoot Setting

spring.main.allow-bean-definition-overriding=true

server.port=9090

server.url=http://localhost:9090/

#PDA Notification or session service and entity service url

notification.server.url=http://localhost:9091/api/v2/

entity.server.url=http://localhost:9092/api/v1/

#Registry Configuration

registry-base-url=http://localhost:8081/ # Registry base url

#redis

spring.cache.type=redis

spring.redis.host=localhost

spring.redis.port=6379

spring.cache.redis.profile.ttl=300000

spring.cache.redis.keycloak.ttl=100

#encrypt/decrypt values

salt-value= #In case to change the value refer PDA-WEB wiki

iv-value= #In case to change the value refer PDA-WEB wiki

secret-key= #In case to change the value refer PDA-WEB wiki

key-size=128

iteration-count=1000

#Logging Configuration

logging.level.root=info

log.location=

#Email SMTP configuration

mail-smtp-auth=mail.smtp.auth

mail-smtp-starttls-enable=mail.smtp.starttls.enable

mail-smtp-host=mail.smtp.host

smtp-gmail-com=smtp.gmail.com

mail-smtp-port=mail.smtp.port

port=587

sourcemailid=""

sourceemailpassword=""

#Reset password configuration

subject-reset-pwd=confirmation for reset password

email-content-reset-pwd=you successfully change your password please login with new password

#Verify email and create registry entry

subject-for-sign-up=Welcome to Learning platform

email-content-for-sign-up=Please Click on this link to complete your registration

register-url-text=Complete Registration

link-expiration-time-text=This link will expire in 12 hours

link-expiration-time=720

#Email verification for password update

subject-for-email-udpate= PDA - Verify your email address

email-content-for-email-update=You have requested for email updation. Please click here to complete the process.

email-update-url-text=Update Email

email-template-path=templates/emailTemplate.html

email-template-path-phone-update=templates/emailTemplate-update-phone.html

email-update-success=templates/EmailChangeSucessful.html

email-update-unsuccessful=templates/EmailChangeUnsucessful.html

#AWS s3 Configuration

aws-accesskey=""

aws-secretkey=""

aws-s3-bucket-name=""

aws-s3-url=""

aws-region=""

aws-qrcode=qr-code/

#name of the private bucket

aws-s3-bucket-name-private=""

#url of the private bucket

aws-s3-url-private=""

#App Version Configuration

AppversionIosParticipantForced=1.1.0

AppversionIosTrainerForced=1.2.0

AppVersionAndroidParticipantForced=1.0.1

AppVesionAndroidTrainerForced=2.0.1.4

AppversionIosParticipantReco=1.5.0

AppversionIosTrainerReco=1.6.0

AppVersionAndroidParticipantReco=1.7.0

AppVesionAndroidTrainerReco=1.8.0

Note: Make sure to create profile-card and profile-picture folder in s3 bucket.

Update src/main/java/com/socion/backend/utils/KeycloakUtil.java

Example

private static String publicKeyString = “Keycloak realm publicKey”

Commenting logstash configuration

Comment this section in src/main/resources/logback.xml as shown in the screenshot below. This can be uncommented and configured once logstash is configured.

Generating keycloak certificate in root folder

openssl x509 -in <(openssl s_client -connect <KEYCLOAK_HOST>:8443 -prexit 2>/dev/null) -out keycloak.crt

Starting Service using Docker

docker build -t : .

docker run -dp 9090:9090

Clone this wiki locally