Skip to content

Commit e0e2787

Browse files
Merge pull request #1208 from credebl/qa
Merge: Sync up changes from Qa to Main
2 parents 57f74e9 + 34f4b65 commit e0e2787

File tree

118 files changed

+6202
-39121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+6202
-39121
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.env.demo

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PUBLIC_PRODUCTION_API_URL=https://api.credebl.id
4747
PUBLIC_SANDBOX_API_URL=https://sandboxapi.credebl.id
4848
4949

50-
AFJ_VERSION=credo-0.5.3:latest
50+
AFJ_VERSION=ghcr.io/credebl/credo-controller:latest
5151

5252
PLATFORM_WALLET_NAME=platform-admin
5353
PLATFORM_WALLET_PASSWORD='U2FsdGVkX19l6w/PpuicnGBYThBHolzF27oN0JwfWkc='
@@ -86,22 +86,22 @@ DEEPLINK_DOMAIN='https://link.credebl.id?url='
8686

8787
ENABLE_CORS_IP_LIST=http://localhost:3000, http://localhost:3001, http://localhost:5000,http://localhost:8085,https://verify.credebl.id,https://verifyed.credebl.id,https://verify-api.credebl.id,https://qa.credebl.id,https://dev.credebl.id,https://credebl.id
8888

89-
USER_NKEY_SEED=SUAILBO6CYQF4RPIZYCVCFRIOMJ7BW33PFZDFEZKOHV65MN3W37FFJA3JY
90-
API_GATEWAY_NKEY_SEED=SUAI7SDZAHS24I7JWOB77BK6EFE3ZS3NCF5FW22PMWCXGE56OBPYHK5734
91-
ORGANIZATION_NKEY_SEED=SUABORS4UFEV2OAWNEXB7JA76XNOF7A6YJAFOGRZTWOEGCXER36P2NP7JQ
92-
AGENT_PROVISIONING_NKEY_SEED=SUAIUEPEC5D4KMTLK45UOPZ45JQ5QUMMIIJY2UT37RMQE6GENBTJTT2MSQ
93-
AGENT_SERVICE_NKEY_SEED=SUABOFFEQNQY7YR4BIZDJENJ5T24CCDYOYTVHBKQLEWTZUTPTL3EQ3IZ3U
94-
VERIFICATION_NKEY_SEED=SUAOTKYQMN6RGVWLZII22A4EFURAT65H4PGU3G5QXKM427HZ3JKIQZ7KU4
95-
LEDGER_NKEY_SEED=SUABKZWIZCMUROUKCSHL774UOLKFQZR2UPQXII5FCGXHF25GFQX2XLIPLI
96-
ISSUANCE_NKEY_SEED=SUAG7GEESSHO2ZF4J2IUKB6QPF4ENTLO7MLXZSSF67MEETTFZWFGJNDYVU
97-
CONNECTION_NKEY_SEED=SUALLWKCDN2KBB4YTZUNUUFP7ZNSI4PBXVK7X5FPNX6LQ3DCHFGYX4JPLQ
98-
ECOSYSTEM_NKEY_SEED=SUAGUAGZZLT2LYEA3SRWFXCJL32MXR5GCBAZNYJLLIUH4O76GDEGQAYM74
99-
CREDENTAILDEFINITION_NKEY_SEED=SUAAYNLVKEP2E4JPCJ7OYSQ6OFCDBQ3GCTOPARBXBNP64JFESDWH7N3FQA
100-
SCHEMA_NKEY_SEED=SUAESXIRPE4PBJR26T44XPPIAONQ3YJTN45VSTRNZUW77GAF5RBP3SEBFA
101-
UTILITIES_NKEY_SEED=SUAHLF3PYEGNN3J2LZHHT6LOQ4GQ2CPGATEO66XRXLCEE6QYSM26TKCNUM
102-
CLOUD_WALLET_NKEY_SEED=SUAJ3VT7IFZXVE7SSTX3JFE6F2U6DYDROW6VTCCGFVVB6D7O6C7OWJWTPM
103-
GEOLOCATION_NKEY_SEED=SUAA3YQLMQPKEK224OVFGENQ3VRYD57LNPJFMGDULOO57CUYOQLAA7KBJU
104-
NOTIFICATION_NKEY_SEED=SUAF5V6RN6HHOLBJX6UV7443PBNT7NSAJ6YCUOW7LTZQ77PXXAMH25AHPI
89+
USER_NKEY_SEED=
90+
API_GATEWAY_NKEY_SEED=
91+
ORGANIZATION_NKEY_SEED=
92+
AGENT_PROVISIONING_NKEY_SEED=
93+
AGENT_SERVICE_NKEY_SEED=
94+
VERIFICATION_NKEY_SEED=
95+
LEDGER_NKEY_SEED=
96+
ISSUANCE_NKEY_SEED=
97+
CONNECTION_NKEY_SEED=
98+
ECOSYSTEM_NKEY_SEED=
99+
CREDENTAILDEFINITION_NKEY_SEED=
100+
SCHEMA_NKEY_SEED=
101+
UTILITIES_NKEY_SEED=
102+
CLOUD_WALLET_NKEY_SEED=
103+
GEOLOCATION_NKEY_SEED=
104+
NOTIFICATION_NKEY_SEED=
105105

106106
KEYCLOAK_DOMAIN=http://localhost:8080/
107107
KEYCLOAK_ADMIN_URL=http://localhost:8080
@@ -121,7 +121,7 @@ AFJ_AGENT_SPIN_UP=/agent-provisioning/AFJ/scripts/docker_start_agent.sh
121121
AFJ_AGENT_ENDPOINT_PATH=/agent-provisioning/AFJ/endpoints/
122122
# Uncomment bellow three lines and comment the above to start services locally without using docker, using pnpm
123123
# AFJ_AGENT_TOKEN_PATH=/apps/agent-provisioning/AFJ/token/
124-
# AFJ_AGENT_SPIN_UP=/apps/agent-provisioning/AFJ/scripts/docker_start_agent.sh
124+
# AFJ_AGENT_SPIN_UP=/apps/agent-provisioning/AFJ/scripts/start_agent.sh
125125
# AFJ_AGENT_ENDPOINT_PATH=/apps/agent-provisioning/AFJ/endpoints/
126126

127127
AGENT_PROTOCOL=http
@@ -131,13 +131,18 @@ MAX_ORG_LIMIT=10
131131
FIDO_API_ENDPOINT=http://localhost:8000
132132

133133
IS_ECOSYSTEM_ENABLE=false
134-
CONSOLE_LOG_FLAG=true // Enable or disable console ELK logs
135-
ELK_LOG=true // ELK flag
136-
LOG_LEVEL=debug // ELK log level
137-
ELK_LOG_PATH = "http://localhost:9200/" // ELK log path
138-
ELK_USERNAME=elastic // ELK user username
139-
ELK_PASSWORD=xxxxxx // ELK user password
134+
CONSOLE_LOG_FLAG=true # Enable or disable console ELK logs
135+
ELK_LOG=false # ELK flag
136+
LOG_LEVEL=debug # ELK log level
137+
ELK_LOG_PATH= "http://localhost:9200/" # ELK log path
138+
ELK_USERNAME=elastic # ELK user username
139+
ELK_PASSWORD=xxxxxx # ELK user password
140140

141141
ORGANIZATION=credebl
142142
CONTEXT=platform
143-
APP=api
143+
APP=api
144+
145+
#Schema-file-server
146+
APP_PORT=4000
147+
JWT_TOKEN_SECRET=
148+
ISSUER=Credebl

.github/workflows/continuous-delivery.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
- utility
3030
- verification
3131
- webhook
32+
- organization
33+
- seed
3234

3335
permissions:
3436
contents: read
@@ -57,4 +59,4 @@ jobs:
5759
push: true
5860
tags: |
5961
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:${{ env.TAG }}
60-
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:latest
62+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:latest

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfiles/Dockerfile.agent-service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ COPY --from=build /app/libs/ ./libs/
5353
COPY --from=build /app/node_modules ./node_modules
5454

5555
# Set the command to run the microservice
56-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"]
56+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"]

Dockerfiles/Dockerfile.api-gateway

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ COPY --from=build /app/node_modules ./node_modules
4040
# COPY --from=build /app/uploadedFiles ./uploadedFiles
4141

4242
# Set the command to run the microservice
43-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"]
43+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"]

Dockerfiles/Dockerfile.cloud-wallet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules
4343

4444

4545
# Set the command to run the microservice
46-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"]
46+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"]

Dockerfiles/Dockerfile.connection

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules
4343
#RUN npm i --only=production
4444

4545
# Set the command to run the microservice
46-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"]
46+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"]

Dockerfiles/Dockerfile.issuance

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ COPY --from=build /app/node_modules ./node_modules
4242

4343

4444
# Set the command to run the microservice
45-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"]
45+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"]

Dockerfiles/Dockerfile.ledger

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ COPY --from=build /app/libs/ ./libs/
4141
COPY --from=build /app/node_modules ./node_modules
4242

4343
# Set the command to run the microservice
44-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"]
44+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"]

Dockerfiles/Dockerfile.notification

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ COPY --from=build /app/libs/ ./libs/
3939
COPY --from=build /app/node_modules ./node_modules
4040

4141
# Set the command to run the microservice
42-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"]
42+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"]

Dockerfiles/Dockerfile.organization

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ COPY --from=build /app/libs/ ./libs/
4040
COPY --from=build /app/node_modules ./node_modules
4141

4242
# Set the command to run the microservice
43-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"]
43+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"]

Dockerfiles/Dockerfile.seed

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:18 as build
2+
3+
# Install pnpm
4+
RUN npm install -g pnpm
5+
6+
# Install PostgreSQL client (use apt for Debian-based images)
7+
RUN apt-get update && apt-get install -y postgresql-client
8+
9+
# Set working directory
10+
WORKDIR /app
11+
12+
COPY . .
13+
14+
RUN pnpm i --ignore-scripts
15+
16+
# Run Prisma commands
17+
RUN cd libs/prisma-service && npx prisma generate
18+
19+
# Set the command to run the microservice
20+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && npx prisma db seed"]

Dockerfiles/Dockerfile.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ COPY --from=build /app/node_modules ./node_modules
6666

6767

6868
# Set the command to run the microservice
69-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"]
69+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"]

Dockerfiles/Dockerfile.utility

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules
4343

4444

4545
# Set the command to run the microservice
46-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"]
46+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"]

Dockerfiles/Dockerfile.verification

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ COPY --from=build /app/libs/ ./libs/
3939
COPY --from=build /app/node_modules ./node_modules
4040

4141
# Set the command to run the microservice
42-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"]
42+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"]

Dockerfiles/Dockerfile.webhook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ COPY --from=build /app/node_modules ./node_modules
4242

4343

4444
# Set the command to run the microservice
45-
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"]
45+
CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"]

apps/agent-provisioning/AFJ/scripts/start_agent.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ if [ $? -eq 0 ]; then
209209

210210
docker rm -f "${PROJECT_NAME}" || true
211211

212-
docker-compose -f $FILE_NAME --project-name "${PROJECT_NAME}" up -d
212+
docker compose -f $FILE_NAME --project-name "${PROJECT_NAME}" up -d
213213
if [ $? -eq 0 ]; then
214214

215215
n=0
@@ -271,4 +271,4 @@ else
271271
echo "ERROR : Failed to execute!" && exit 125
272272
fi
273273

274-
echo "Total time elapsed: $(date -ud "@$(($(date +%s) - $START_TIME))" +%T) (HH:MM:SS)"
274+
echo "Total time elapsed: $(date -ud "@$(($(date +%s) - $START_TIME))" +%T) (HH:MM:SS)"

apps/api-gateway/src/credential-definition/dto/create-cred-defs.dto.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import { IsBoolean, IsDefined, IsNotEmpty, IsOptional, IsString } from 'class-validator';
2-
32
import { ApiProperty } from '@nestjs/swagger';
3+
import { Transform } from 'class-transformer';
4+
import { trim } from '@credebl/common/cast.helper';
45

56
export class CreateCredentialDefinitionDto {
67

78
@ApiProperty({ 'example': 'default' })
8-
@IsDefined({ message: 'Tag is required.' })
9+
@IsDefined({ message: 'Tag is required' })
910
@IsNotEmpty({ message: 'Please provide a tag' })
10-
@IsString({ message: 'Tag id should be string' })
11+
@IsString({ message: 'Tag should be string' })
1112
tag: string;
1213

1314
@ApiProperty({ 'example': 'WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0' })
14-
@IsDefined({ message: 'schemaLedgerId is required.' })
15-
@IsNotEmpty({ message: 'Please provide a schema id' })
15+
@IsDefined({ message: 'schemaLedgerId is required' })
16+
@IsNotEmpty({ message: 'Please provide valid schema ledger Id' })
17+
@Transform(({ value }) => trim(value))
1618
@IsString({ message: 'Schema id should be string' })
1719
schemaLedgerId: string;
1820

0 commit comments

Comments
 (0)