constellation/internal/atls
renovate[bot] 24af06b02f
deps: update Go dependencies (#3411)
* deps: update Go dependencies

* bazel: force Gazelle generation for xDS

xDS has an upstream set of build files that makes Gazelle consider their project a whole new Bazel project, which makes Gazelle not generate any build files, even though the upstream ones aren't valid.

See https://github.com/cncf/xds/issues/104.

* go: update cel.dev/expr for Bazel fixes

cel.dev/expr had some upstream Bazel fixes in v0.16.2 without which Gazelle doesn't work.

* chore: generate

* e2e: remove references to kubeProxyVersion

kubeProxyVersion is deprecated as of KEP-4004. It was never being set to an accurate value before, and we only used it in the e2e test, so removing the additional check should not hurt here.

See https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/4004-deprecate-kube-proxy-version

* constellation-node-operator: use typed rate-limiter

The untyped rate-limiter was deprecated in favor of a generic one that can just be instantiated to `any` to achieve the previous behaviour.

* Advertise ALPN settings in NextProtos required by gRPC

Signed-off-by: Daniel Weiße <dw@edgeless.systems>

* atls: add nextProtos

nextProtos (for ALPN) is now required by gRPC, so add it.

* go: add cri-client replace

* deps: tidy all modules

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
Co-authored-by: Daniel Weiße <dw@edgeless.systems>
Co-authored-by: edgelessci <edgelessci@users.noreply.github.com>
2024-10-16 17:35:51 +02:00
..
atls_test.go chore: fix unused parameter lint in new golangcilint version 2024-02-21 17:54:07 +01:00
atls.go deps: update Go dependencies (#3411) 2024-10-16 17:35:51 +02:00
BUILD.bazel attestation: add awsSEVSNP as new variant (#1900) 2023-06-09 15:41:02 +02:00
README.md attestation: add awsSEVSNP as new variant (#1900) 2023-06-09 15:41:02 +02:00

Attested TLS (aTLS)

In a confidential computing (CC) environment, attested TLS (aTLS) can be used to establish secure connections between two parties utilizing the remote attestation features of the CC components.

aTLS modifies the TLS handshake by embedding an attestation statement into the TLS certificate. Instead of relying on a Certificate Authority, aTLS uses this attestation statement to establish trust in the certificate.

The protocol can be used by clients to verify a server certificate, by a server to verify a client certificate, or for mutual verification (mutual aTLS).

Client side verification

  1. The client sends a ClientHello message, setting ServerName to a random nonce.

  2. The server generates an attestation statement using the clients nonce and its CC capabilities.

    • The attestation is embedded in the server certificate using x509 certificate extensions with an object identifier (OID) to identify the CC attestation type. Take a look at the variant package for implementation details.
  3. The client verifies the attestation statement.

  4. If successful the client can trust the server to be running the expected configuration, and finish the TLS handshake.

sequenceDiagram
    participant Client
    participant Server
    Client->>Server: ClientHello(nonce)
    Server->>Client: ServerCertificate(AttestationStatement), ServerHelloDone
    Note over Client: Verify Attestation
    Client->>Server: ClientKeyExchange
    Client->>Server: ChangeCipherSpec, Finished
    Server->>Client: #

Server side verification

  1. The client sends a ClientHello message

  2. The server sends back a certificate and a random nonce. The nonce is encoded as the Distinguished Name of an acceptable CA.

  3. The client does not verify the servers certificate, but uses the nonce to generate an attestation based on its CC capabilities.

    • The attestation is embedded in the client certificate using x509 certificate extensions with an OID to identify the CC attestation type.
  4. The server verifies the client's attestation statement.

  5. If successful the server can trust the client to be running the expected configuration, and finish the TLS handshake.

sequenceDiagram
    participant Client
    participant Server
    Client->>Server: ClientHello
    Server->>Client: ServerCertificate, AcceptableCAs(nonce), ServerHelloDone
    Client->>Server: ClientKeyExchange, ClientCertificate(AttestationStatement)
    Client->>Server: ChangeCipherSpec, Finished
    Note over Server: Verify Attestation
    Server->>Client: ChangeCipherSpec, Finished

Mutual aTLS

  1. The client sends a ClientHello message, setting ServerName to a random nonce.

  2. The server generates an attestation statement using the clients nonce and its CC capabilities.

    • The attestation is embedded in the server certificate using x509 certificate extensions with an OID to identify the attestation type.
    • A nonce is encoded as the Distinguished Name of an acceptable CA.
  3. The client verifies the attestation statement.

  4. The client uses the nonce to generate an attestation based on its CC capabilities.

    • The attestation is embedded in the client certificate using x509 certificate extensions with an OID to identify the CC attestation type.
  5. The server verifies the client's attestation statement.

  6. If all verifications were successful, mutual trust in each others configuration is established, and the TLS handshake can be finished.

sequenceDiagram
    participant Client
    participant Server
    Client->>Server: ClientHello(nonce)
    Server->>Client: ServerCertificate(AttestationStatement), AcceptableCAs(nonce), ServerHelloDone
    Note over Client: Verify Attestation
    Client->>Server: ClientKeyExchange, ClientCertificate(AttestationStatement)
    Client->>Server: ChangeCipherSpec, Finished
    Note over Server: Verify Attestation
    Server->>Client: ChangeCipherSpec, Finished