bpa
by frank-bee
The BPA allows organizations to verify, hold, and issue verifiable credentials.
About this chart
bpa
The BPA allows organizations to verify, hold, and issue verifiable credentials.
The Business Partner Agent allows to manage and exchange master data between organizations.
This chart will install a business partner agent (bpa-core, bpa-acapy) and postgres. It will also create the default ingress routes.
TL;DR
helm repo add bpa https://labs.hyperledger.org/business-partner-agent-chart/
helm repo update
helm upgrade \
--set global.ingressSuffix=.example.com \
mybpa bpa/bpa -i -n mynamespace
Introduction
This chart bootstraps a business partner agent deployment on a Kubernetes cluster using the Helm package manager. Its default installation comes with PostgreSQL. Ingress routes are generated and activated, allowing the agent to communicate with other agents outside the cluster.
Requirements
- Kubernetes 1.12+
- Docker
- Helm v3.3.4+
- PV provisioner support in the underlying infrastructure (for PostgreSQL persistence)
- If activating Ingress (with is the default!):
- Ingress controller installed
- Cert-manager (TLS required/assumed for both endpoint: public profile and acapy)
- DNS records pointing to your routes
Initial preparation
The following steps have to be done only once.
Installing the chart
To install the chart with the release name bpa and generated ingress as subdomains of example.com in the namespace mynamespace
helm repo add bpa https://labs.hyperledger.org/business-partner-agent-chart/
helm repo update
helm upgrade \
--set global.ingressSuffix=.example.com \
mybpa bpa/bpa -i -n mynamespace
Get the generated application URL by running kubectl
kubectl get ingress -n mynamespace
Like this we deployed the BPA (bpa-core & bpa-acapy) and Postgres on the Kubernetes cluster in the default configuration. The Values section list the parameters that can be configured during installation.
Install chart with values file
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. E.g. deploying the chart to the IDunion network could be done as follows.
Remark:
In IDunion the DID cannot be autogenerated, therefore a seed has to be configured as pre-requisite.
To do so, create a secret in the same namespace named <helm release>-acapy and a key called seed.
Create a yaml file.
cat <<EOT >> values-mybpa.yaml
acapy:
agentName: did:sov:1234:agentname
agentSeed: 12345678912345678912345678900011
resources:
requests:
cpu: 100m
memory: 256Mi
bpa:
config:
bootstrap:
password: changeme
username: admin
ledger:
browser: https://explorer.idu.network
name: My BPA
resources:
requests:
cpu: 100m
memory: 256Mi
global:
ingressSuffix: .example.com
postgresql:
persistence:
enabled: true
size: 1Gi
storageClass: default
resources:
requests:
cpu: 100m
memory: 256Mi
schemas:
config:
bank-account:
defaultAttributeName: iban
id: UmZ25DANwS6ngGWB4ye4tN:2:BankAccount:0.1
label: Bank Account
restrictions:
- issuerDid: did:sov:UmZ25DANwS6ngGWB4ye4tN
label: Demo Bank
commercial-register:
defaultAttributeName: companyName
id: R6WR6n7CQVDjvvmwofHK6S:2:commercialregister:0.1
label: Commercial Register
restrictions:
- issuerDid: did:sov:R6WR6n7CQVDjvvmwofHK6S
label: Commercial Register
enabled: true
EOT
Install the chart with the release name mybpa, in the namespace mynamespace.
helm upgrade \
--values values-mybpa.yaml \
mybpa bpa/bpa -i -n mynamespace
Install multiple bpa instances
You could easily deploy a second business partner agent like this, e.g. for demo purpose. Just use a different helm release name, the seed of another DID and different ingress host names.
Install in local development cluster
No special handling, should work the same way as with a remote cluster. With minikube you would
Install and run minikube (see also minikube documentation)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start --vm-driver=docker
Install the chart
helm upgrade \
--values values-mybpa.yaml \
mybpa bpa/bpa -i -n mynamespace
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete mybpa
The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release.
To delete the PVC's associated with my-release:
kubectl delete pvc -l release=mybpa
Note: Deleting the PVC's will delete postgresql data as well. Please be cautious before doing it.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| acapy.adminURLApiKey | string | "2f9729eef0be49608c1cffd49ee3cc4a" | Please change: key used to protect acapy's admin endpoint |
| acapy.affinity | object | {} | |
| acapy.agentSeed | string | "5a7db011075444a19d9bcaed56ad624a" | Please change: the agent seed, 32 characters e.g. a UUID without the dashes. If the ledger is bcovrin-test the seed will be registered automatically. In all other cases this needs to happen manually beforehand. |
| acapy.fullnameOverride | string | "" | |
| acapy.image.pullPolicy | string | "IfNotPresent" | |
| acapy.image.repository | string | "bcgovimages/aries-cloudagent" | |
| acapy.image.tag | string | "py36-1.16-1_0.7.4" | Overrides the image tag whose default is the chart appVersion. |
| acapy.imagePullSecrets | list | [] | |
| acapy.ingress.annotations | object | {} | |
| acapy.ingress.enabled | bool | true | |
| acapy.ingress.tls | list | [] | |
| acapy.labelOverride | string | "" | |
| acapy.nameOverride | string | "" | |
| acapy.nodeSelector | object | {} | |
| acapy.openshift.route.enabled | bool | false | |
| acapy.openshift.route.path | string | "/" | |
| acapy.openshift.route.targetPort | string | "http" | |
| acapy.openshift.route.timeout | string | "30s" | |
| acapy.openshift.route.tls.enabled | bool | true | |
| acapy.openshift.route.tls.insecureEdgeTerminationPolicy | string | "None" | |
| acapy.openshift.route.tls.termination | string | "edge" | |
| acapy.openshift.route.wildcardPolicy | string | "None" | |
| acapy.podAnnotations | object | {} | |
| acapy.podSecurityContext | object | {} | |
| acapy.postgresql | object | {"database":"mywallet"} | Used for backwards compatibility |
| acapy.postgresql.database | string | "mywallet" | Can be used to overwrite 'postgresql.postgresqlDatabase', if set acapy and bpa backends use separate databases |
| acapy.readOnlyMode | bool | false | |
| acapy.resources.requests.cpu | string | "100m" | |
| acapy.resources.requests.memory | string | "256Mi" | |
| acapy.securityContext.runAsUser | int | 1001 | |
| acapy.service.adminPort | int | 8031 | |
| acapy.service.httpPort | int | 8030 | |
| acapy.service.type | string | "ClusterIP" | |
| acapy.staticArgs.autoAcceptInvites | bool | false | |
| acapy.staticArgs.autoAcceptRequests | bool | false | |
| acapy.staticArgs.autoDiscloseFeatures | bool | true | |
| acapy.staticArgs.autoPingConnection | bool | true | |
| acapy.staticArgs.autoProvision | bool | true | |
| acapy.staticArgs.autoRespondCredentialOffer | bool | false | |
| acapy.staticArgs.autoRespondCredentialProposal | bool | false | |
| acapy.staticArgs.autoRespondCredentialRequest | bool | false | |
| acapy.staticArgs.autoRespondMessages | bool | false | |
| acapy.staticArgs.autoRespondPresentationProposal | bool | true | |
| acapy.staticArgs.autoRespondPresentationRequest | bool | false | |
| acapy.staticArgs.autoStoreCredential | bool | true | |
| acapy.staticArgs.autoVerifyPresentation | bool | false | |
| acapy.staticArgs.emitNewDidcommMimeType | bool | true | |
| acapy.staticArgs.emitNewDidcommPrefix | bool | true | |
| acapy.staticArgs.enableUndeliveredQueue | bool | true | |
| acapy.staticArgs.exchUseUnencryptedTags | bool | true | |
| acapy.staticArgs.logLevel | string | "info" | |
| acapy.staticArgs.monitorPing | bool | true | |
| acapy.staticArgs.monitorRevocationNotification | bool | true | |
| acapy.staticArgs.notifyRevocation | bool | true | |
| acapy.staticArgs.preserveExchangeRecords | bool | false | |
| acapy.staticArgs.publicInvites | bool | true | |
| acapy.staticArgs.walletType | string | "askar" | indy or askar |
| acapy.tails.baseUrlOverride | string | "" | Override the otherwise ledger-specifically generated base URL of the external tails server |
| acapy.tails.enabled | bool | false | Set to true to enable revocation (external tails server required) |
| acapy.tails.uploadUrlOverride | string | "" | Override the otherwise ledger-specifically generated upload URL of the external tails server |
| acapy.tolerations | list | [] | |
| acapy.walletKey | string | "123" | Please change: Wallet encryption key, be aware that if this value is changed later aca-py needs to be restarted with the '--wallet-rekey' param which is not mapped |
| bpa.affinity | object | {} | |
| bpa.config.bootstrap.password | string | "changeme" | Default password |
| bpa.config.bootstrap.username | string | "admin" | The name of the default admin user |
| bpa.config.creddef.revocationRegistrySize | int | 3000 | |
| bpa.config.frontend | object | {"closeSidebar":false,"hideSidebarButton":false} | Frontend runtime variables which are injected into the frontend code on container startup (only if at least one runtime variable value has been set). These function e.g. as feature toggles for specific frontend changes. NOTE: The container startup time is impacted by using these. |
| bpa.config.frontend.closeSidebar | bool | false | Setting this to true keeps the sidebar in the frontend closed when loading the page in a browser |
| bpa.config.frontend.hideSidebarButton | bool | false | Setting this to true hides the sidebar burger button in the frontend. In combination with 'closeSidebar' the sidebar is completely gone. |
| bpa.config.i18n.fallbackLocale | string | "en" | |
| bpa.config.i18n.locale | string | "en" | |
| bpa.config.imprint.enabled | bool | false | |
| bpa.config.imprint.urlOverride | string | "" | |
| bpa.config.jmx.enabled | bool | false | |
| bpa.config.jmx.port | int | 9999 | |
| bpa.config.ledger.browserUrlOverride | string | "" | |
| bpa.config.logConfigurationFile | string | "log4j2-prod.xml" | log4j2 configuration file which must be in the classpath. Use log4j2.yml for non-json. Will be ignored if logging is set and has values. |
| bpa.config.logging | string | nil | log configuration overwrite, if set logConfigurationFile will be ignored. Takes an array of logger names and levels. See also log4j2. |
| bpa.config.mail | object | {"apiKey":"","apiSecret":"","username":""} | Mailjet service integration, requires a developer account with verified sender email and generated api keys |
| bpa.config.mail.apiKey | string | "" | Mail service api key |
| bpa.config.mail.apiSecret | string | "" | Mail service api secret |
| bpa.config.mail.username | string | "" | Mail service verified sender email address |
| bpa.config.nameOverride | string | "" | Override name shown in the frontend (may contain whitespaces and so on). Default: Helm release name, capitalized |
| bpa.config.pg.schema | string | "" | Sets the database schema the bpa backend should use, defaults to 'publlic' if empty |
| bpa.config.privacyPolicy.enabled | bool | false | |
| bpa.config.privacyPolicy.urlOverride | string | "" | |
| bpa.config.scheme | string | "https" | The scheme that is used to register the profile endpoint on the ledger |
| bpa.config.security.allowedHosts | object | {} | Comma separated list of csp host sources, used to set allowed origins |
| bpa.config.security.enabled | bool | true | Enable login page and endpoint security |
| bpa.config.security.strict | bool | true | Enable strict strict security headers |
| bpa.config.titleOverride | string | "" | Override title shown in the browser tab. Default: Helm release name, capitalized (or NameOverride if given) |
| bpa.config.web.only | bool | false | |
| bpa.image.pullPolicy | string | "IfNotPresent" | |
| bpa.image.repository | string | "ghcr.io/hyperledger-labs/business-partner-agent-new" | |
| bpa.image.tag | string | "" | Overrides the image tag whose default is the chart appVersion. |
| bpa.imagePullSecrets | list | [] | |
| bpa.ingress.annotations | object | {} | |
| bpa.ingress.enabled | bool | true | |
| bpa.ingress.tls | list | [] | |
| bpa.nodeSelector | object | {} | |
| bpa.openshift.route.enabled | bool | false | |
| bpa.openshift.route.path | string | "/" | |
| bpa.openshift.route.targetPort | string | "http" | |
| bpa.openshift.route.timeout | string | "30s" | |
| bpa.openshift.route.tls.enabled | bool | true | |
| bpa.openshift.route.tls.insecureEdgeTerminationPolicy | string | "None" | |
| bpa.openshift.route.tls.termination | string | "edge" | |
| bpa.openshift.route.wildcardPolicy | string | "None" | |
| bpa.podAnnotations | object | {} | |
| bpa.podSecurityContext | object | {} | |
| bpa.resources.limits.cpu | string | "2" | |
| bpa.resources.limits.memory | string | "384Mi" | |
| bpa.resources.requests.cpu | string | "0.2" | |
| bpa.re |
Deploy bpa with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has bpa on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartbpa is pinned at v0.12.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply