-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Krishna Waske <[email protected]>
- Loading branch information
Showing
45 changed files
with
5,505 additions
and
6,573 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
272 changes: 272 additions & 0 deletions
272
...es/@credo-ts+anoncreds+0.5.3+001+fix: Extensible model confict in Anoncreds and Did.patch
Large diffs are not rendered by default.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
patches/@credo-ts+core+0.5.3+004+added-prettyVc-in-JsonCredential-interface.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts b/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts | ||
index d12468b..ae70f36 100644 | ||
--- a/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts | ||
+++ b/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts | ||
@@ -10,6 +10,8 @@ export interface JsonCredential { | ||
issuanceDate: string; | ||
expirationDate?: string; | ||
credentialSubject: SingleOrArray<JsonObject>; | ||
+ //TODO change type | ||
+ prettyVc?: any; | ||
[key: string]: unknown; | ||
} | ||
/** |
14 changes: 14 additions & 0 deletions
14
...@credo-ts+core+0.5.3+005+commenting validationPresentation to avoid abandoned issue.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js b/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js | ||
index 006d870..da56801 100644 | ||
--- a/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js | ||
+++ b/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js | ||
@@ -170,7 +170,8 @@ class DifPresentationExchangeProofFormatService { | ||
try { | ||
ps.validatePresentationDefinition(request.presentation_definition); | ||
ps.validatePresentationSubmission(jsonPresentation.presentation_submission); | ||
- ps.validatePresentation(request.presentation_definition, parsedPresentation); | ||
+ // FIXME: Commenting validatePresentation() for now due to intermittent abandoned issue | ||
+ //ps.validatePresentation(request.presentation_definition, parsedPresentation); | ||
let verificationResult; | ||
// FIXME: for some reason it won't accept the input if it doesn't know | ||
// whether it's a JWT or JSON-LD VP even though the input is the same. |
12 changes: 12 additions & 0 deletions
12
patches/@credo-ts+core+0.5.3+006+w3c-issuance-without-holder-did-negotiaton.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js b/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js | ||
index fb1fb9d..b519694 100644 | ||
--- a/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js | ||
+++ b/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js | ||
@@ -97,7 +97,6 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc | ||
let credentialRecord = await this.findByProperties(messageContext.agentContext, { | ||
threadId: proposalMessage.threadId, | ||
role: models_1.CredentialRole.Issuer, | ||
- connectionId: connection === null || connection === void 0 ? void 0 : connection.id, | ||
}); | ||
const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats); | ||
if (formatServices.length === 0) { |
56 changes: 56 additions & 0 deletions
56
patches/@credo-ts+tenants+0.5.3+001+cache-tenant-record-patch.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts | ||
index 91bb8f4..b4dae61 100644 | ||
--- a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts | ||
+++ b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts | ||
@@ -1,5 +1,5 @@ | ||
import type { TenantRecord } from '../repository'; | ||
-import type { AgentContextProvider, UpdateAssistantUpdateOptions } from '@credo-ts/core'; | ||
+import type { AgentContextProvider, UpdateAssistantUpdateOptions , CacheModule, InMemoryLruCache } from '@credo-ts/core'; | ||
import { AgentContext, EventEmitter, Logger } from '@credo-ts/core'; | ||
import { TenantRecordService } from '../services'; | ||
import { TenantSessionCoordinator } from './TenantSessionCoordinator'; | ||
@@ -9,7 +9,9 @@ export declare class TenantAgentContextProvider implements AgentContextProvider | ||
private eventEmitter; | ||
private logger; | ||
private tenantSessionCoordinator; | ||
- constructor(tenantRecordService: TenantRecordService, rootAgentContext: AgentContext, eventEmitter: EventEmitter, tenantSessionCoordinator: TenantSessionCoordinator, logger: Logger); | ||
+ private cacheModule; | ||
+ private inMemoryLruCache; | ||
+ constructor(tenantRecordService: TenantRecordService, rootAgentContext: AgentContext, eventEmitter: EventEmitter, tenantSessionCoordinator: TenantSessionCoordinator, logger: Logger, cache: InMemoryLruCache); | ||
getAgentContextForContextCorrelationId(contextCorrelationId: string): Promise<AgentContext>; | ||
getContextForInboundMessage(inboundMessage: unknown, options?: { | ||
contextCorrelationId?: string; | ||
diff --git a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js | ||
index d491d4e..d60ec79 100644 | ||
--- a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js | ||
+++ b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js | ||
@@ -24,16 +24,28 @@ let TenantAgentContextProvider = class TenantAgentContextProvider { | ||
this.eventEmitter = eventEmitter; | ||
this.tenantSessionCoordinator = tenantSessionCoordinator; | ||
this.logger = logger; | ||
+ this.cache = new core_1.CacheModule({ | ||
+ cache: new core_1.InMemoryLruCache({ limit: 100 }), | ||
+ }); | ||
// Start listener for newly created routing keys, so we can register a mapping for each new key for the tenant | ||
this.listenForRoutingKeyCreatedEvents(); | ||
} | ||
async getAgentContextForContextCorrelationId(contextCorrelationId) { | ||
+ this.logger.debug('debug ========= Inside getAgentContextForContextCorrelationId') | ||
// It could be that the root agent context is requested, in that case we return the root agent context | ||
if (contextCorrelationId === this.rootAgentContext.contextCorrelationId) { | ||
return this.rootAgentContext; | ||
} | ||
// TODO: maybe we can look at not having to retrieve the tenant record if there's already a context available. | ||
- const tenantRecord = await this.tenantRecordService.getTenantById(this.rootAgentContext, contextCorrelationId); | ||
+ this.logger.debug('debug ========= Get tenantRecord from cache') | ||
+ let tenantRecord = await this.cache.config.cache.get(this.rootAgentContext, `contextCorrelationId-${contextCorrelationId}`) | ||
+ if(!tenantRecord) { | ||
+ // TODO: maybe we can look at not having to retrieve the tenant record if there's already a context available. | ||
+ this.logger.debug('debug ========= TenantRecord not found in cache') | ||
+ tenantRecord = await this.tenantRecordService.getTenantById(this.rootAgentContext, contextCorrelationId) | ||
+ await this.cache.config.cache.set(this.rootAgentContext,`contextCorrelationId-${contextCorrelationId}`,tenantRecord) | ||
+ this.logger.debug(`debug ========= Cached tenant agent context for tenant '${contextCorrelationId}'`) | ||
+ } | ||
const shouldUpdate = !(0, core_1.isStorageUpToDate)(tenantRecord.storageVersion); | ||
// If the tenant storage is not up to date, and autoUpdate is disabled we throw an error | ||
if (shouldUpdate && !this.rootAgentContext.config.autoUpdateStorageOnStartup) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"family": "${FAMILY}", | ||
"containerDefinitions": [ | ||
{ | ||
"name": "Platform-admin", | ||
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%", | ||
"cpu": 154, | ||
"memory": 307, | ||
"portMappings": [ | ||
{ | ||
"containerPort": 8001, | ||
"hostPort": 8001, | ||
"protocol": "tcp" | ||
}, | ||
{ | ||
"containerPort": 9001, | ||
"hostPort": 9001, | ||
"protocol": "tcp" | ||
} | ||
], | ||
"essential": true, | ||
"command": [ | ||
"--auto-accept-connections", | ||
"--config", | ||
"/config.json" | ||
], | ||
"environment": [ | ||
{ | ||
"name": "AFJ_REST_LOG_LEVEL", | ||
"value": "1" | ||
} | ||
], | ||
"environmentFiles": [ | ||
{ | ||
"value": "${S3_ARN}", | ||
"type": "s3" | ||
} | ||
], | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "config", | ||
"containerPath": "/config.json", | ||
"readOnly": true | ||
} | ||
], | ||
"volumesFrom": [], | ||
"ulimits": [] | ||
} | ||
|
||
], | ||
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole", | ||
"placementConstraints": [], | ||
"requiresCompatibilities": [ | ||
"EC2" | ||
], | ||
"cpu": "154", | ||
"memory": "307", | ||
"volumes": [ | ||
{ | ||
"name": "config", | ||
"host": { | ||
"sourcePath": "${SourcePath}" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"family": "${FAMILY}", | ||
"containerDefinitions": [ | ||
{ | ||
"name": "Platform-admin", | ||
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%", | ||
"cpu": 0, | ||
"portMappings": [ | ||
{ | ||
"containerPort": 8004, | ||
"hostPort": 8004, | ||
"protocol": "tcp" | ||
}, | ||
{ | ||
"containerPort": 9004, | ||
"hostPort": 9004, | ||
"protocol": "tcp" | ||
} | ||
], | ||
"essential": true, | ||
"command": [ | ||
"--auto-accept-connections", | ||
"--config", | ||
"/config/${CONFIG_FILE}" | ||
], | ||
"environment": [ | ||
{ | ||
"name": "AFJ_REST_LOG_LEVEL", | ||
"value": "1" | ||
} | ||
], | ||
"environmentFiles": [ | ||
{ | ||
"value": "${S3_ARN}", | ||
"type": "s3" | ||
} | ||
], | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "config", | ||
"containerPath": "/config", | ||
"readOnly": false | ||
} | ||
], | ||
"volumesFrom": [], | ||
"ulimits": [], | ||
"logConfiguration": { | ||
"logDriver": "awslogs", | ||
"options": { | ||
"awslogs-group": "/ecs/${FAMILY}", | ||
"awslogs-create-group": "true", | ||
"awslogs-region": "ap-south-1", | ||
"awslogs-stream-prefix": "ecs" | ||
} | ||
} | ||
} | ||
|
||
], | ||
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole", | ||
"networkMode": "awsvpc", | ||
"placementConstraints": [], | ||
"requiresCompatibilities": [ | ||
"FARGATE" | ||
], | ||
"cpu": "1024", | ||
"memory": "2048", | ||
"volumes": [ | ||
{ | ||
"name": "config", | ||
"efsVolumeConfiguration": { | ||
"fileSystemId": "${EFS}", | ||
"rootDirectory": "/" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.