Skip to content
Snippets Groups Projects
Commit b198ae78 authored by Berend Sliedrecht's avatar Berend Sliedrecht
Browse files

chore: rename peer port to inbound port and remove ext port


Signed-off-by: default avatarBerend Sliedrecht <berend@animo.id>
parent 1c8e7047
No related branches found
No related tags found
1 merge request!6feat(ssi): added public did and event
...@@ -51,7 +51,6 @@ $ pnpm install ...@@ -51,7 +51,6 @@ $ pnpm install
[.env.example](.env.example) [.env.example](.env.example)
- PORT is the port for the signing and verification interface - PORT is the port for the signing and verification interface
- AFJ_EXT_PORT is the port for the openapi documentation described in [swagger.json](swagger.json)
- AGENT_AUTO_ACCEPT_CONNECTION can be either true or false - AGENT_AUTO_ACCEPT_CONNECTION can be either true or false
- AGENT_AUTO_ACCEPT_CREDENTIAL can be either: always, contentApproved, never - AGENT_AUTO_ACCEPT_CREDENTIAL can be either: always, contentApproved, never
- AGENT_PUBLIC_DID_SEED will generate the did and verkey (32 symbols) - AGENT_PUBLIC_DID_SEED will generate the did and verkey (32 symbols)
......
...@@ -44,13 +44,12 @@ ssi-abstraction deployment ...@@ -44,13 +44,12 @@ ssi-abstraction deployment
| security.runAsNonRoot | bool | `false` | by default, apps run as non-root | | security.runAsNonRoot | bool | `false` | by default, apps run as non-root |
| security.runAsUid | int | `0` | User used by the apps | | security.runAsUid | int | `0` | User used by the apps |
| service.port | int | `3009` | | | service.port | int | `3009` | |
| ssiAbstraction.afjExtPort | int | `3010` | |
| ssiAbstraction.agent.autoAccept.connection | bool | `true` | | | ssiAbstraction.agent.autoAccept.connection | bool | `true` | |
| ssiAbstraction.agent.autoAccept.credential | bool | `true` | | | ssiAbstraction.agent.autoAccept.credential | bool | `true` | |
| ssiAbstraction.agent.host | string | `"gaiax.vereign.com"` | | | ssiAbstraction.agent.host | string | `"gaiax.vereign.com"` | |
| ssiAbstraction.agent.ledgerId | string | `"ID_UNION"` | | | ssiAbstraction.agent.ledgerId | string | `"ID_UNION"` | |
| ssiAbstraction.agent.name | string | `"ssi-abstraction-agent"` | | | ssiAbstraction.agent.name | string | `"ssi-abstraction-agent"` | |
| ssiAbstraction.agent.peerPort | int | `443` | | | ssiAbstraction.agent.inboundPort | int | `443` | |
| ssiAbstraction.agent.protocol | string | `"http"` | | | ssiAbstraction.agent.protocol | string | `"http"` | |
| ssiAbstraction.agent.publicDidSeed | string | `"6b8b882e2618fa5d45ee7229ca880083"` | | | ssiAbstraction.agent.publicDidSeed | string | `"6b8b882e2618fa5d45ee7229ca880083"` | |
| ssiAbstraction.agent.urlPath | string | `"/ocm/didcomm"` | | | ssiAbstraction.agent.urlPath | string | `"/ocm/didcomm"` | |
......
...@@ -38,8 +38,6 @@ spec: ...@@ -38,8 +38,6 @@ spec:
env: env:
- name: PORT - name: PORT
value: {{ .Values.service.port | quote }} value: {{ .Values.service.port | quote }}
- name: AFJ_EXT_PORT
value: {{ .Values.ssiAbstraction.afjExtPort | quote }}
- name: DATABASE_URL - name: DATABASE_URL
value: {{ template "app.postgresql.connectionstring" (merge (dict "application" "true") .) }} value: {{ template "app.postgresql.connectionstring" (merge (dict "application" "true") .) }}
- name: NATS_URL - name: NATS_URL
...@@ -52,8 +50,8 @@ spec: ...@@ -52,8 +50,8 @@ spec:
value: {{ .Values.ssiAbstraction.agent.urlPath }} value: {{ .Values.ssiAbstraction.agent.urlPath }}
- name: AGENT_NAME - name: AGENT_NAME
value: {{ .Values.ssiAbstraction.agent.name }} value: {{ .Values.ssiAbstraction.agent.name }}
- name: AGENT_PEER_PORT - name: AGENT_INBOUND_PORT
value: ":{{ .Values.ssiAbstraction.agent.peerPort }}" value: ":{{ .Values.ssiAbstraction.agent.inboundPort }}"
- name: AGENT_PUBLIC_DID_SEED - name: AGENT_PUBLIC_DID_SEED
value: {{ .Values.ssiAbstraction.agent.publicDidSeed | quote }} value: {{ .Values.ssiAbstraction.agent.publicDidSeed | quote }}
- name: AGENT_AUTO_ACCEPT_CONNECTION - name: AGENT_AUTO_ACCEPT_CONNECTION
...@@ -80,8 +78,6 @@ spec: ...@@ -80,8 +78,6 @@ spec:
{{- end }} {{- end }}
- name: http - name: http
containerPort: {{ .Values.service.port }} containerPort: {{ .Values.service.port }}
- name: afj
containerPort: {{ .Values.ssiAbstraction.afjExtPort }}
- name: peer - name: peer
containerPort: {{ .Values.ssiAbstraction.agent.peerPort }} containerPort: {{ .Values.ssiAbstraction.agent.peerPort }}
readinessProbe: readinessProbe:
......
...@@ -25,5 +25,5 @@ spec: ...@@ -25,5 +25,5 @@ spec:
service: service:
name: {{ template "app.name" . }} name: {{ template "app.name" . }}
port: port:
number: {{ .Values.ssiAbstraction.agent.peerPort }} number: {{ .Values.ssiAbstraction.agent.inboundPort }}
{{- end }} {{- end }}
\ No newline at end of file
...@@ -10,10 +10,7 @@ spec: ...@@ -10,10 +10,7 @@ spec:
- name: http - name: http
port: { { .Values.service.port } } port: { { .Values.service.port } }
targetPort: { { .Values.service.port } } targetPort: { { .Values.service.port } }
- name: afj
port: { { .Values.ssiAbstraction.afjExtPort } }
targetPort: { { .Values.ssiAbstraction.afjExtPort } }
- name: peer - name: peer
port: { { .Values.ssiAbstraction.agent.peerPort } } port: { { .Values.ssiAbstraction.agent.inboundPort } }
targetPort: { { .Values.ssiAbstraction.agent.peerPort } } targetPort: { { .Values.ssiAbstraction.agent.inboundPort } }
selector: { { - include "app.selectorLabels" . | nindent 4 } } selector: { { - include "app.selectorLabels" . | nindent 4 } }
...@@ -90,7 +90,7 @@ ssiAbstraction: ...@@ -90,7 +90,7 @@ ssiAbstraction:
name: ssi-abstraction-agent name: ssi-abstraction-agent
host: gaiax.vereign.com host: gaiax.vereign.com
protocol: http protocol: http
peerPort: 443 inboundPort: 443
urlPath: /ocm/didcomm urlPath: /ocm/didcomm
publicDidSeed: 6b8b882e2618fa5d45ee7229ca880083 publicDidSeed: 6b8b882e2618fa5d45ee7229ca880083
autoAccept: autoAccept:
...@@ -100,7 +100,6 @@ ssiAbstraction: ...@@ -100,7 +100,6 @@ ssiAbstraction:
key: ssi-wallet-key key: ssi-wallet-key
id: ssi-wallet-id id: ssi-wallet-id
ledgerId: ID_UNION ledgerId: ID_UNION
afjExtPort: 3010
database: database:
host: postgresql.infra host: postgresql.infra
user: root user: root
......
...@@ -49,7 +49,7 @@ export class AgentService { ...@@ -49,7 +49,7 @@ export class AgentService {
public constructor(configService: ConfigService) { public constructor(configService: ConfigService) {
this.configService = configService; this.configService = configService;
const peerPort = this.configService.get('agent.peerPort'); const inboundPort = this.configService.get('agent.inboundPort');
this.agent = new Agent({ this.agent = new Agent({
config: this.config, config: this.config,
...@@ -58,7 +58,7 @@ export class AgentService { ...@@ -58,7 +58,7 @@ export class AgentService {
}); });
const httpInbound = new HttpInboundTransport({ const httpInbound = new HttpInboundTransport({
port: peerPort, port: inboundPort,
}); });
this.agent.registerInboundTransport(httpInbound); this.agent.registerInboundTransport(httpInbound);
...@@ -67,10 +67,10 @@ export class AgentService { ...@@ -67,10 +67,10 @@ export class AgentService {
} }
public get config(): InitConfig { public get config(): InitConfig {
const { name, walletId, walletKey, host, peerPort, path } = const { name, walletId, walletKey, host, inboundPort, path } =
this.configService.get('agent'); this.configService.get('agent');
const endpoints = [`${host}${peerPort}${path}`]; const endpoints = [`${host}${inboundPort}${path}`];
return { return {
label: name, label: name,
......
...@@ -8,7 +8,7 @@ export const validationSchema = Joi.object({ ...@@ -8,7 +8,7 @@ export const validationSchema = Joi.object({
AGENT_WALLET_ID: Joi.string().required(), AGENT_WALLET_ID: Joi.string().required(),
AGENT_WALLET_KEY: Joi.string().required(), AGENT_WALLET_KEY: Joi.string().required(),
AGENT_HOST: Joi.string().required(), AGENT_HOST: Joi.string().required(),
AGENT_PEER_PORT: Joi.string(), AGENT_INBOUND_PORT: Joi.string(),
AGENT_URL_PATH: Joi.string(), AGENT_URL_PATH: Joi.string(),
AGENT_PUBLIC_DID_SEED: Joi.string().required(), AGENT_PUBLIC_DID_SEED: Joi.string().required(),
AGENT_AUTO_ACCEPT_CONNECTION: Joi.boolean().required(), AGENT_AUTO_ACCEPT_CONNECTION: Joi.boolean().required(),
......
process.env.PORT = 3009; process.env.PORT = 3009;
process.env.AFJ_EXT_PORT = 3010;
process.env.DATABASE_URL = process.env.DATABASE_URL =
'postgresql://postgres:postgres@localhost:5432/postgres?schema=agent'; 'postgresql://postgres:postgres@localhost:5432/postgres?schema=agent';
process.env.NATS_URL = 'nats://localhost:4222'; process.env.NATS_URL = 'nats://localhost:4222';
process.env.ECSURL = 'http://localhost:9200/'; process.env.ECSURL = 'http://localhost:9200/';
process.env.AGENT_HOST = 'http://localhost'; process.env.AGENT_HOST = 'http://localhost';
process.env.AGENT_NAME = 'ssi-abstraction-agent'; process.env.AGENT_NAME = 'ssi-abstraction-agent';
process.env.AGENT_PEER_PORT = ':4000'; process.env.AGENT_INBOUND_PORT = ':4000';
process.env.AGENT_URL_PATH = '/ocm/abstraction'; process.env.AGENT_URL_PATH = '/ocm/abstraction';
process.env.AGENT_PUBLIC_DID_SEED = '6b8b882e2618fa5d45ee7229ca880083'; process.env.AGENT_PUBLIC_DID_SEED = '6b8b882e2618fa5d45ee7229ca880083';
process.env.AGENT_AUTO_ACCEPT_CONNECTION = true; process.env.AGENT_AUTO_ACCEPT_CONNECTION = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment