constellation/joinservice
renovate[bot] 6013665de1
deps: update gcr.io/distroless/static Docker digest to 8d4cc4a (#1547)
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-03-29 14:56:07 +02:00
..
cmd internal: refactor oid package to variant package (#1538) 2023-03-29 09:30:13 +02:00
internal go: remove unused parameters 2023-03-20 08:41:01 -04:00
joinproto bazel: add buf as protobuf formatter to //:tidy (#1511) 2023-03-23 18:08:49 +01:00
Dockerfile deps: update gcr.io/distroless/static Docker digest to 8d4cc4a (#1547) 2023-03-29 14:56:07 +02:00
README.md dev-docs: Go package docs (#958) 2023-01-19 15:57:50 +01:00

Join Service

Implementation for Constellation's node flow to join an existing cluster.

The join service runs on each control-plane node of the Kubernetes cluster. New nodes (at cluster start, or later through autoscaling) send an IssueJoinTicket request to the service over aTLS. The join service verifies the new nodes certificate and attestation statement. If attestation is successful, the new node is supplied with a disk encryption key for its state disk, and a Kubernetes bootstrap token, so it may join the cluster.

Packages

joinproto

Proto definitions for the join service.

internal/server

The server implements gRPC endpoints for joining the cluster and holds the main application logic.

Connections between the join service and joining nodes are secured using aTLS

sequenceDiagram
    participant New Node
    participant Join Service
    New Node-->>Join Service: aTLS Handshake (server side verification)
    Join Service-->>New Node: #
    New Node->>+Join Service: grpc::IssueJoinTicket(DiskUUID, NodeName, IsControlPlane)
    Join Service->>+KMS: grpc::GetDataKey(DiskUUID)
    KMS->>-Join Service: DiskEncryptionKey
    Join Service->>-New Node: [DiskEncryptionKey, KubernetesJoinToken, ...]

internal/kms

Implements interaction with Constellation's keyservice. This is needed for fetching data encryption keys for joining nodes.

internal/kubeadm

Implements interaction with the Kubernetes API to create join tokens for new nodes.

Dockerfile

export VERSION=0.0.0
DOCKER_BUILDKIT=1 docker build --build-arg PROJECT_VERSION=${VERSION} -t ghcr.io/edgelesssys/constellation/join-service:v${VERSION} -f joinservice/Dockerfile .