Skip to content

Commit

Permalink
Merge branch 'qa' of https://github.com/credebl/platform into merge/q…
Browse files Browse the repository at this point in the history
…a-to-prod-August-2024
  • Loading branch information
GHkrishna committed Aug 30, 2024
2 parents 963846a + d24a85b commit 2f60ab9
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 4 deletions.
60 changes: 59 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ SUPABASE_JWT_SECRET= // Please specify your Supabase jwt secret
API_GATEWAY_PROTOCOL=http
API_GATEWAY_HOST='0.0.0.0'
API_GATEWAY_PORT=5000
API_GATEWAY_PROTOCOL_SECURE=http

##
PLATFORM_NAME= // Please specify your paltform name
PLATFORM_LOGO= // Please specify your paltform logo url
PUBLIC_PLATFORM_SUPPORT_EMAIL= // Please specify your support email
POWERED_BY= // Please specify your powered by org name
PLATFORM_WEB_URL= // Please specify your platform web URL
POWERED_BY_URL= // Please specify your support URL

UPLOAD_LOGO_HOST= // Please specify your logo host or domain url

PUBLIC_LOCALHOST_URL= // Please specify your localhost URL
PUBLIC_DEV_API_URL= // Please specify your DEV environment api URL
PUBLIC_QA_API_URL= // Please specify your your QA environment api URL
Expand All @@ -33,14 +37,46 @@ API_ENDPOINT_PORT=5000

SOCKET_HOST=http://localhost:5000

AWS_PUBLIC_ACCESS_KEY= // Please provide your aws bucket access key
AWS_PUBLIC_SECRET_KEY= // Please provide your aws secret key
AWS_PUBLIC_REGION= // Please provide your aws region
AWS_PUBLIC_BUCKET_NAME= // Please provide your aws bucket name

AWS_ORG_LOGO_BUCKET_NAME= // Please provide your aws org bucket name

AWS_S3_STOREOBJECT_ACCESS_KEY= // Please provide your aws bucket access key
AWS_S3_STOREOBJECT_SECRET_KEY= // Please provide your aws bucket secret key
AWS_S3_STOREOBJECT_REGION= // Please provide your aws region
AWS_S3_STOREOBJECT_BUCKET= // Please provide your aws bucket
AWS_ACCESS_KEY= // Please provide your access key
AWS_SECRET_KEY= // Please provide your secret key
AWS_REGION= // Please provide your aws region
AWS_BUCKET= // Please provide your aws bucket

PLATFORM_ADMIN_EMAIL= // Please provide admin email Id

NATS_HOST='0.0.0.0'
NATS_PORT=4222
NATS_URL=nats://0.0.0.0:4222

REDIS_HOST='0.0.0.0'
REDIS_PORT=6379

POSTGRES_HOST=0.0.0.0
POSTGRES_PORT=5432
POSTGRES_USER='postgres'
POSTGRES_PASSWORD='xxxxx'
POSTGRES_DATABASE= // Please provide your DB name

SENDGRID_API_KEY=xxxxxxxxxxxxxx // Please provide your sendgrid API key

FRONT_END_URL=http://localhost:3000

FILE_SERVER= // Please provide your file server
FILE_SERVER_PORT=8081
FILE_SERVER_USER=credebl
FILE_SERVER_HOST=0.0.0.0

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

WALLET_STORAGE_HOST=localhost # Use IP Address
Expand All @@ -59,6 +95,10 @@ PLATFORM_WALLET_PASSWORD= // Please provide encrypt password using crypto-j
PLATFORM_SEED= // The seed should consist of 32 characters.
PLATFORM_ID=

PLATFORM_PROFILE_MODE= // Please provide your environment name

OOB_BATCH_SIZE=10

AFJ_AGENT_ENDPOINT_PATH=/apps/agent-provisioning/AFJ/endpoints/
DATABASE_URL="postgresql://postgres:xxxxxx@localhost:5432/postgres?schema=public" #Provide supabase postgres URL and Use the correct user/pwd, IP Address
POOL_DATABASE_URL="" #Provide pooler supabase postgres URL
Expand All @@ -68,6 +108,22 @@ AGENT_PROTOCOL=http
GEO_LOCATION_MASTER_DATA_IMPORT_SCRIPT=/prisma/scripts/geo_location_data_import.sh
UPDATE_CLIENT_CREDENTIAL_SCRIPT=/prisma/scripts/update_client_credential_data.sh

USER_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for user service
API_GATEWAY_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for api-gateway
ORGANIZATION_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for organization service
AGENT_PROVISIONING_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for agent provisioning service
AGENT_SERVICE_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for agent service
VERIFICATION_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for verification service
ISSUANCE_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for issuance service
CONNECTION_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for connection service
ECOSYSTEM_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for ecosystem service
CREDENTAILDEFINITION_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for credential-definition service
SCHEMA_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for schema service
UTILITIES_NKEY_SEED= xxxxxxxxxxxxx // Please provide Nkeys secret for utilities service
GEOLOCATION_NKEY_SEED= xxxxxxxxxxx // Please provide Nkeys secret for geo-location service

AFJ_AGENT_TOKEN_PATH=/apps/agent-provisioning/AFJ/token/

# This was inserted by prisma init:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
Expand All @@ -92,4 +148,6 @@ KEYCLOAK_MANAGEMENT_CLIENT_ID=xxxxxxx
KEYCLOAK_MANAGEMENT_CLIENT_SECRET=xxxxxxx
KEYCLOAK_REALM=xxxxxxx

ENABLE_CORS_IP_LIST="" # Provide a list of domains that are allowed to use this server
ENABLE_CORS_IP_LIST="" # Provide a list of domains that are allowed to use this server
SCHEMA_FILE_SERVER_URL= // Please provide schema URL
SCHEMA_FILE_SERVER_TOKEN=xxxxxxxx // Please provide schema file server token for polygon
14 changes: 11 additions & 3 deletions apps/issuance/src/issuance.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,13 @@ export class IssuanceRepository {

let schemaId = '';

if (issueCredentialDto?.metadata?.['_anoncreds/credential']?.schemaId || issueCredentialDto?.['credentialData']?.offer?.jsonld?.credential?.['@context'][1]) {
schemaId = issueCredentialDto?.metadata?.['_anoncreds/credential']?.schemaId || issueCredentialDto?.['credentialData']?.offer?.jsonld?.credential?.['@context'][1];
if (
(issueCredentialDto?.metadata?.['_anoncreds/credential']?.schemaId ||
issueCredentialDto?.['credentialData']?.offer?.jsonld?.credential?.['@context'][1]) ||
(issueCredentialDto?.state &&
issueCredentialDto?.['credentialData']?.proposal?.jsonld?.credential?.['@context'][1])
) {
schemaId = issueCredentialDto?.metadata?.['_anoncreds/credential']?.schemaId || issueCredentialDto?.['credentialData']?.offer?.jsonld?.credential?.['@context'][1] || issueCredentialDto?.['credentialData']?.proposal?.jsonld?.credential?.['@context'][1];
}

let credDefId = '';
Expand All @@ -201,7 +206,9 @@ export class IssuanceRepository {
createDateTime: issueCredentialDto?.createDateTime,
threadId: issueCredentialDto?.threadId,
connectionId: issueCredentialDto?.connectionId,
state: issueCredentialDto?.state
state: issueCredentialDto?.state,
schemaId,
credDefId
},
create: {
createDateTime: issueCredentialDto?.createDateTime,
Expand All @@ -216,6 +223,7 @@ export class IssuanceRepository {
orgId: organisationId
}
});

return credentialDetails;
} catch (error) {
this.logger.error(`Error in get saveIssuedCredentialDetails: ${error.message} `);
Expand Down

0 comments on commit 2f60ab9

Please sign in to comment.