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
[.env.example](.env.example)
- 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_CREDENTIAL can be either: always, contentApproved, never
- AGENT_PUBLIC_DID_SEED will generate the did and verkey (32 symbols)
......
......@@ -44,13 +44,12 @@ ssi-abstraction deployment
| security.runAsNonRoot | bool | `false` | by default, apps run as non-root |
| security.runAsUid | int | `0` | User used by the apps |
| service.port | int | `3009` | |
| ssiAbstraction.afjExtPort | int | `3010` | |
| ssiAbstraction.agent.autoAccept.connection | bool | `true` | |
| ssiAbstraction.agent.autoAccept.credential | bool | `true` | |
| ssiAbstraction.agent.host | string | `"gaiax.vereign.com"` | |
| ssiAbstraction.agent.ledgerId | string | `"ID_UNION"` | |
| ssiAbstraction.agent.name | string | `"ssi-abstraction-agent"` | |
| ssiAbstraction.agent.peerPort | int | `443` | |
| ssiAbstraction.agent.inboundPort | int | `443` | |
| ssiAbstraction.agent.protocol | string | `"http"` | |
| ssiAbstraction.agent.publicDidSeed | string | `"6b8b882e2618fa5d45ee7229ca880083"` | |
| ssiAbstraction.agent.urlPath | string | `"/ocm/didcomm"` | |
......
......@@ -38,8 +38,6 @@ spec:
env:
- name: PORT
value: {{ .Values.service.port | quote }}
- name: AFJ_EXT_PORT
value: {{ .Values.ssiAbstraction.afjExtPort | quote }}
- name: DATABASE_URL
value: {{ template "app.postgresql.connectionstring" (merge (dict "application" "true") .) }}
- name: NATS_URL
......@@ -52,8 +50,8 @@ spec:
value: {{ .Values.ssiAbstraction.agent.urlPath }}
- name: AGENT_NAME
value: {{ .Values.ssiAbstraction.agent.name }}
- name: AGENT_PEER_PORT
value: ":{{ .Values.ssiAbstraction.agent.peerPort }}"
- name: AGENT_INBOUND_PORT
value: ":{{ .Values.ssiAbstraction.agent.inboundPort }}"
- name: AGENT_PUBLIC_DID_SEED
value: {{ .Values.ssiAbstraction.agent.publicDidSeed | quote }}
- name: AGENT_AUTO_ACCEPT_CONNECTION
......@@ -80,8 +78,6 @@ spec:
{{- end }}
- name: http
containerPort: {{ .Values.service.port }}
- name: afj
containerPort: {{ .Values.ssiAbstraction.afjExtPort }}
- name: peer
containerPort: {{ .Values.ssiAbstraction.agent.peerPort }}
readinessProbe:
......
......@@ -25,5 +25,5 @@ spec:
service:
name: {{ template "app.name" . }}
port:
number: {{ .Values.ssiAbstraction.agent.peerPort }}
{{- end }}
\ No newline at end of file
number: {{ .Values.ssiAbstraction.agent.inboundPort }}
{{- end }}
......@@ -10,10 +10,7 @@ spec:
- name: http
port: { { .Values.service.port } }
targetPort: { { .Values.service.port } }
- name: afj
port: { { .Values.ssiAbstraction.afjExtPort } }
targetPort: { { .Values.ssiAbstraction.afjExtPort } }
- name: peer
port: { { .Values.ssiAbstraction.agent.peerPort } }
targetPort: { { .Values.ssiAbstraction.agent.peerPort } }
port: { { .Values.ssiAbstraction.agent.inboundPort } }
targetPort: { { .Values.ssiAbstraction.agent.inboundPort } }
selector: { { - include "app.selectorLabels" . | nindent 4 } }
......@@ -90,7 +90,7 @@ ssiAbstraction:
name: ssi-abstraction-agent
host: gaiax.vereign.com
protocol: http
peerPort: 443
inboundPort: 443
urlPath: /ocm/didcomm
publicDidSeed: 6b8b882e2618fa5d45ee7229ca880083
autoAccept:
......@@ -100,7 +100,6 @@ ssiAbstraction:
key: ssi-wallet-key
id: ssi-wallet-id
ledgerId: ID_UNION
afjExtPort: 3010
database:
host: postgresql.infra
user: root
......
......@@ -49,7 +49,7 @@ export class AgentService {
public constructor(configService: ConfigService) {
this.configService = configService;
const peerPort = this.configService.get('agent.peerPort');
const inboundPort = this.configService.get('agent.inboundPort');
this.agent = new Agent({
config: this.config,
......@@ -58,7 +58,7 @@ export class AgentService {
});
const httpInbound = new HttpInboundTransport({
port: peerPort,
port: inboundPort,
});
this.agent.registerInboundTransport(httpInbound);
......@@ -67,10 +67,10 @@ export class AgentService {
}
public get config(): InitConfig {
const { name, walletId, walletKey, host, peerPort, path } =
const { name, walletId, walletKey, host, inboundPort, path } =
this.configService.get('agent');
const endpoints = [`${host}${peerPort}${path}`];
const endpoints = [`${host}${inboundPort}${path}`];
return {
label: name,
......
......@@ -8,7 +8,7 @@ export const validationSchema = Joi.object({
AGENT_WALLET_ID: Joi.string().required(),
AGENT_WALLET_KEY: Joi.string().required(),
AGENT_HOST: Joi.string().required(),
AGENT_PEER_PORT: Joi.string(),
AGENT_INBOUND_PORT: Joi.string(),
AGENT_URL_PATH: Joi.string(),
AGENT_PUBLIC_DID_SEED: Joi.string().required(),
AGENT_AUTO_ACCEPT_CONNECTION: Joi.boolean().required(),
......
process.env.PORT = 3009;
process.env.AFJ_EXT_PORT = 3010;
process.env.DATABASE_URL =
'postgresql://postgres:postgres@localhost:5432/postgres?schema=agent';
process.env.NATS_URL = 'nats://localhost:4222';
process.env.ECSURL = 'http://localhost:9200/';
process.env.AGENT_HOST = 'http://localhost';
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_PUBLIC_DID_SEED = '6b8b882e2618fa5d45ee7229ca880083';
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