Skip to content

About

The SIROS ID Stack helm chart

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

siros-id-stack

Introduction

This Helm Chart aims to help users configure and deploy components in the "SIROS ID stack". In addition, it may also serve as practical reference for working component configuration.

Warning: This chart is under heavy development and has some rough edges. Review open issues before usage.

Features

Sets up the SIROS ID Stack:

Requirements

  • Helm 4
  • Kubernetes 1.34 (due to pod-level resource requests/limits)
  • Gateway API, ingress is NOT supported at this time
  • cert-manager (tested with 1.20.0)
  • mongodb-kubernetes, community edition is supported (tested with 1.8.0)

Required values

The following must be set in your values overlays (the chart defaults alone are not deployable):

  • tenant.id — logical tenant identifier
  • domain.root — base domain for hostnames
  • features.credentialTypes — at least one credential type definition
  • issuer.apiAuth.jwks.enabled or issuer.apiAuth.oidc.enabled — issuer API authentication
  • gateway.name - name of the shared gateway to attach HTTPRoutes to

Commonly modified values

  • networkPolicies.kubeApiServerPort - port of the kube-apiserver if not 6443
  • networkPolicies.ciliumNetworkPolicies - if you are using Cilium. Required because of network policy access to the kube-apiserver.
  • global.clusterDomain - k8s cluster domain if not cluster.local

Examples

  • values-demo.yaml - demo values for the stack, including credentials. Expects that the issuer authProvider has an account providing the following claims:
    • "birth_date": "1988-09-09"
    • "family_name": "Oldman"
    • "given_name": "Gary"
  • example-tenant.yaml - example with required values defined
  • config/demo - demo credentials, documents and identities
  • quickstart - example values and scripts

Demo credentials

values-demo.yaml declares two groups of credential types:

scope vct issuance
demo_1 urn:demo:1 OIDC claims, built on the fly
demo_pid_rb_1_5 registry URL OIDC login, from the datastore
ehic urn:eudi:ehic:1 PID presentation
diploma urn:eudi:diploma:1 PID presentation
ebw_oid uri:eu.ebw.oid.1 PID presentation
eucc urn:eudi:eucc:1 PID presentation
eu_poa uri:eu.eudi.eu-poa.1 PID presentation
iban_ov eu.we-build.iban-ov.1 PID presentation

The last four are the WE BUILD EU Business Wallet attestations - owner identification (ds001), the company-register extract (ds004), a power of attorney (ds007) and IBAN ownership verification. Their type metadata is served from registry.siros.org.

Every type marked PID presentation is issued through an OpenID4VP presentation of demo_pid_rb_1_5 (issuance.authProvider: openid4vp, source: datastore): the holder gets a PID first, and the identity in that PID - given name, family name, date of birth - selects which documents come out of the datastore. Business attestations work this way because they say something about a legal person through the natural person representing it, which is how they would be issued in a live setting.

The sample documents in config/demo give both demo identities a company of their own, so either one can exercise the full set:

demo user company EBW-OID EUCC EU PoA IBAN-OV
100 - Helen Mirren Aurora Analytics AB (SE) yes yes attorney for Rheinmark Logistik SEB account
102 - Gary Oldman Rheinmark Logistik GmbH (DE) yes yes attorney for Aurora Analytics Deutsche Bank account

Each person holds a power of attorney for the other person's company, so the two-party case is testable from either identity. The verifier gets matching presentation-request templates and two presets ("Demo: Company identity", "Demo: Representation + company account").

Minimal and -full documents

Every type has its demo data in two documents, and for every type but diploma the two are different sizes, so both the everyday case and a credential carrying every optional claim can be exercised. (diploma is the exception described below: its two documents are identical apart from the -full marker, because its data is an embedded W3C credential nobody has decided the shape of yet.)

  • the minimal document carries the claims the type's own metadata marks mandatory, plus the handful of optional claims this chart's demo surface actually reads - the svg_id bindings in the VCTM, and the claims named by verifier.presets and verifier.presentationRequestTemplates. Where a type marks nothing mandatory at all (ehic), it is the type's identifying core;
  • the maximal document carries mandatory and every optional claim the type declares. Its meta.document_id ends in -full - that suffix is the only marking, so grep -l -- '-full' config/demo/*.json finds them.

User 100 (Helen Mirren) holds the minimal document of every type and user 102 (Gary Oldman) the -full one. 102 is the identity the demo OIDC account above logs in as, so the richest documents are the ones you can actually obtain, and every shipped preset and presentation-request template still matches. A holder never has two documents of the same scope: nothing would pick between them at issuance time.

scope minimal -full what only the -full document has
demo_pid_rb_1_5 100 102 address, birth names, sex, email, phone, issuance date and jurisdiction, trust_anchor, attestation_legal_category
ehic 100 102 authentic_source, date_of_issuance
diploma - 102 nothing - see below
pid_mdoc 100 102 document and administrative numbers, residence, birth names, contact details, sex, pseudonym_seed
mdl 100 102 ages, residence, birth place, height, weight, eye/hair colour, national-character names, signature_usual_mark, pseudonym_seed, driving_privileges[].codes
ebw_oid 100 102 trust_anchor
eucc 100 102 structured address, activity description, share capital, contact point, legal_person_duration, trust_anchor
eu_poa 100 102 identification documents, home addresses, places of birth, register location, trust_anchor
iban_ov 100 102 account type, owner's given name and surname, provider country, bank codes, provider identifiers, trust_anchor_url

diploma is the exception. Its document_data is an entire embedded W3C Verifiable Credential - roughly 200 nested fields - while vctm_diploma.json declares 7 claims, and its credentialSubject describes a third person (EBSI/ELM sample data) rather than the holder. Both demo documents are identical apart from the -full marking; nobody has decided yet whether the type metadata should grow to describe what is issued or the documents should shrink to what the type declares.

When you add a claim to a demo document, add it to that type's config/demo/vctm_*.json first: a claim no metadata declares may be dropped at issuance, and nothing reports that it happened.

Note that documents are imported only when the datastore is initialised. An environment that already holds data will not pick up a new credential type on upgrade - clear the datastore, or add the documents through the issuer API (see quickstart/add-documents.sh).

Deployment Examples

Example of templating with local chart:

helm template --values values-demo.yaml --values example-tenant.yaml --output-dir output --validate .

Example of templating with versioned remote chart:

helm template --values values-demo.yaml --values example-tenant.yaml --output-dir output --validate oci://ghcr.io/sirosfoundation/siros-id-stack --version 1.0.0

Using the examples above, the routes created for the gateway API will be the following:

Debug

Use the admin-tools pod to debug the stack. It has 0 replicas by default, so you need to manually set it to 1. Run mongosh --tls --tlsCAFile /mongo-cert/ca.crt --tlsCertificateKeyFile /mongo-cert/tls-combined.pem 'mongodb+srv://mongodb-svc.siros-tenant-<YOUR-TENANT-ID>.svc.cluster.local/vc?replicaSet=mongodb&ssl=true&authMechanism=MONGODB-X509' to connect to the database.

Use db.adminCommand( { replSetGetStatus: 1 } ) to get the status of the replica set. Use db.runCommand( { listCollections: 1 } ) to list the collections in the database.

# List all databases
db.adminCommand( { listDatabases: 1 } )
# Get status of the replica set
db.adminCommand( { replSetGetStatus: 1 } )

# List the collections in the database
db.runCommand( { listCollections: 1 } )

# Drop a database
use issuer-apigw_cache
db.dropDatabase()

Database restore

Download and decrypt the MongoDB backup archive from your configured S3-compatible bucket. Upload the decrypted file to the admin-tools pod using kubectl cp. Run the following command to restore a specfic database (--drop deletes the target collection before restore):

$ cat backup.gza | mongorestore \
    -v --ssl \
    --sslCAFile /mongo-cert/ca.crt --sslPEMKeyFile /mongo-cert/tls-combined.pem \
    --archive --gzip --drop --preserveUUID \
    'mongodb+srv://mongodb-svc.siros-tenant-<YOUR-TENANT-ID>.svc.cluster.local/<YOUR-DATABASE>?replicaSet=mongodb&ssl=true&authMechanism=MONGODB-X509'

About

The SIROS ID Stack helm chart

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages