Quick Start
Categories:
For the latest deployment document, please refer to the CoCoAS github page.
The CoCoAS supports different APIs. Now we have gRPC version and RESTful version.
gRPC CoCo AS
Quick Start and Test
Users can use a community version of gRPC CoCoAS image to deploy quickly.
# run gRPC CoCoAS server locally
docker run -d \
-v <path-to-attestation-service>/docs/sgx_default_qcnl.conf:/etc/sgx_default_qcnl.conf \ # this qcnl config is used when verifying SGX/TDX quotes
-p 50004:50004 \
ghcr.io/confidential-containers/staged-images/coco-as-grpc:latest \
grpc-as
The sgx_default_qcnl.conf
configures the PCS (Provisioning Certification Service) / PCCS (Provisioning Certification Cache Service) of Intel platforms. If you want to verify SGX/TDX quotes, please refer to the Intel Platform Configuration section.
We can use a sample grpc client to test the gRPC API using the following test request body.
{
"tee": "snp",
"evidence": "eyJhdHRlc3RhdGlvbl9yZXBvcnQiOnsidmVyc2lvbiI6MiwiZ3Vlc3Rfc3ZuIjo0LCJwb2xpY3kiOjE5NjYzOSwiZmFtaWx5X2lkIjpbMSwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMF0sImltYWdlX2lkIjpbMiwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMF0sInZtcGwiOjAsInNpZ19hbGdvIjoxLCJjdXJyZW50X3RjYiI6eyJib290bG9hZGVyIjozLCJ0ZWUiOjAsIl9yZXNlcnZlZCI6WzAsMCwwLDBdLCJzbnAiOjgsIm1pY3JvY29kZSI6MjA2fSwicGxhdF9pbmZvIjoxLCJfYXV0aG9yX2tleV9lbiI6MCwiX3Jlc2VydmVkXzAiOjAsInJlcG9ydF9kYXRhIjpbMjM2LDEwOCw4MiwyMTUsODMsNjAsMTk0LDE5NiwyNDQsOTEsMjMxLDEzMiwxNTYsMjQxLDE4LDE3MSwxMzAsMTc4LDAsMTU5LDIzMSwxODksNjcsMjMxLDMwLDIwOCwxNDAsMjAsNjQsMTAsMjE1LDIyNiwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAs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CwyMjAsNjMsMjUzLDQyLDIyOCwxNzEsMjQ3LDI0LDE3OSwxNTgsOTcsMzIsMTk5LDQxLDIzOCwxMTksMjQ3LDI0OSwyMTksMTUyLDIzMywxNjQsMTQ3LDI4LDE1LDI1MCwzMSwxMDksMTIsODQsMTAyLDIyNSwxMzgsMTg5LDE4OSwyMjMsMjIzLDYwLDE5MCwxMDQsMTg4LDEwNiwxMzcsMjE4LDIzLDIzOCw3LDI2LDIxNywxMTksMTI1LDE0MywzNyw1MCwyMjksMTQzLDI1MiwyMjMsMjMwLDc3LDExMSw2MiwxNSwxMDMsMzEsNTMsODAsMTU2LDIxNSw4NCwxNDMsNjQsNCw3MiwxMjQsMjU1LDI0LDE2NSwxLDU2LDExNywxMDMsMTksMTU4LDYxLDQ4LDczLDE0MCwyMjIsMjI5LDEzMCwxODksMzcsOTQsMjEwLDE1MiwxNDEsOTUsMjQ4LDIyMyw0NCwxNzcsMTI5LDcwLDQzLDkyLDIxNCw4MiwxNjAsMTgwLDEzNCwyMTcsMjEwLDE5NCw0MywyMTcsMTYzLDE0MiwxODIsMTQzLDE0MSwxNzEsMTgzLDIyNV19XX0",
"policy_ids": []
}
and the protobuf definition file declared in API section
# Use the following cmdline to install grpcurl
# go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
REQ=$(cat <path-to-request>)
grpcurl \
-plaintext \
-import-path <path-to-parent-directory-of-proto-file> \
-proto <path-to-proto-file> \
-d @ 127.0.0.1:50004 attestation.AttestationService/AttestationEvaluate <<EOF
$REQ
EOF
Then you can see a token looking like the following
{
"attestationToken": "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJjdXN0b21pemVkX2NsYWltcyI6eyJ0ZXN0X2tleSI6InRlc3RfdmFsdWUifSwiZXZhbHVhdGlvbi1yZXBvcnRzIjpbeyJldmFsdWF0aW9uLXJlc3VsdCI6IntcImFsbG93XCI6dHJ1ZX0iLCJwb2xpY3ktaGFzaCI6ImMwZTc5Mjk2NzFmY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o-AS is defined by the following proto file
syntax = "proto3";
package attestation;
message AttestationRequest {
// TEE enum. Specify the evidence type
string tee = 1;
// Base64 encoded evidence. The alphabet is URL_SAFE_NO_PAD.
// defined in https://datatracker.ietf.org/doc/html/rfc4648#section-5
string evidence = 2;
// Runtime Data used to check the binding relationship with report data in
// Evidence
oneof runtime_data {
// Base64 encoded runtime data slice. The whole string will be base64
// decoded. The result one will then be accumulated into a digest which
// is used as the expected runtime data to check against the one inside
// evidence.
//
// The alphabet is URL_SAFE_NO_PAD.
// defined in https://datatracker.ietf.org/doc/html/rfc4648#section-5
string raw_runtime_data = 3;
// Runtime data in a JSON map. CoCoAS will rearrange each layer of the
// data JSON object in dictionary order by key, then serialize and output
// it into a compact string, and perform hash calculation on the whole
// to check against the one inside evidence.
//
// After the verification, the structured runtime data field will be included
// inside the token claims.
string structured_runtime_data = 4;
}
// Init Data used to check the binding relationship with init data in
// Evidence
oneof init_data {
// Base64 encoded init data slice. The whole string will be base64
// decoded. The result one will then be accumulated into a digest which
// is used as the expected init data to check against the one inside
// evidence.
//
// The alphabet is URL_SAFE_NO_PAD.
// defined in https://datatracker.ietf.org/doc/html/rfc4648#section-5
string raw_init_data = 5;
// Init data in a JSON map. CoCoAS will rearrange each layer of the
// data JSON object in dictionary order by key, then serialize and output
// it into a compact string, and perform hash calculation on the whole
// to check against the one inside evidence.
//
// After the verification, the structured init data field will be included
// inside the token claims.
string structured_init_data = 6;
}
// Hash algorithm used to calculate runtime data. Currently can be "sha256",
// "sha384" or "sha512". If not specified, "sha384" will be selected.
string runtime_data_hash_algorithm = 7;
// Hash algorithm used to calculate init data. Currently can be "sha256",
// "sha384" or "sha512". If not specified, "sha384" will be selected.
string init_data_hash_algorithm = 8;
// List of IDs of the policy used to check evidence. If not provided,
// a "default" one will be used.
repeated string policy_ids = 9;
}
message AttestationResponse {
string attestation_token = 1;
}
message SetPolicyRequest {
string policy_id = 1;
string policy = 2;
}
message SetPolicyResponse {}
message ChallengeRequest {
// ChallengeRequest uses HashMap to pass variables like:
// tee, tee_params etc
map<string, string> inner = 1;
}
message ChallengeResponse {
string attestation_challenge = 1;
}
service AttestationService {
rpc AttestationEvaluate(AttestationRequest) returns (AttestationResponse) {};
rpc SetAttestationPolicy(SetPolicyRequest) returns (SetPolicyResponse) {};
rpc GetAttestationChallenge(ChallengeRequest) returns (ChallengeResponse) {};
// Get the GetPolicyRequest.user and GetPolicyRequest.tee specified Policy(.rego)
}
RESTful CoCoAS
Quick Start and Test
Users can use a community version of restful CoCoAS image to verify attestation reports.
# run restful CoCoAS server locally
docker run -d \
-v <path-to-attestation-service>/docs/sgx_default_qcnl.conf:/etc/sgx_default_qcnl.conf \ # this qcnl config is used when verifying SGX/TDX quotes
-p 8080:8080 \
ghcr.io/confidential-containers/staged-images/coco-as-restful:latest \
restful-as
The sgx_default_qcnl.conf
configures the PCS (Provisioning Certification Service) / PCCS (Provisioning Certification Cache Service) of Intel platforms. If you want to verify SGX/TDX quotes, please refer to the Intel Platform Configuration section.
We can use curl
to test the RESTful API using the same request body declared in the gRPC part.
cd <path-to-attestation-service>
curl -k -X POST http://127.0.0.1:8080/attestation \
-i \
-H 'Content-Type: application/json' \
-d @tests/coco-as/request.json
Then, a token will be retrieved as HTTP response body like
eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJjdXN0b21pemVkX2NsYWltcyI6eyJ0ZXN0X2tleSI6InRlc3RfdmFsdWUifSwiZXZhbHVhdGlvbi1yZXBvcnRzIjpbeyJldmFsdWF0aW9uLXJlc3VsdCI6IntcImFsbG93XCI6dHJ1ZX0iLCJwb2xpY3ktaGFzaCI6ImMwZTc5Mjk2NzFmYjY3ODAzODdmNTQ3NjBkODRkNjVkMmNlOTYwOTNkZmIzM2VmZGEyMWY1ZWIwNWFmY2RhNzdiYmE0NDRjMDJjZDE3N2IyM2E1ZDM1MDcxNjcyNjE1NyIsInBvbGljeS1pZCI6ImRlZmF1bHQifV0sImV4cCI6MTcwMTY3Mjk2NSwiaX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LCJzZ3guYm9keS5yZXNlcnZlZDQiOiIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAiLCJzZ3guaGVhZGVyLmF0dF9rZXlfZGF0YV8wIjoiMDAwMDAwMDAiLCJzZ3guaGVhZGVyLmF0dF9rZXlfdHlwZSI6IjAyMDAiLCJzZ3guaGVhZGVyLnBjZV9zdm4iOiIwZDAwIiwic2d4LmhlYWRlci5xZV9zdm4iOiIwODAwIiwic2d4LmhlYWRlci51c2VyX2RhdGEiOiJkY2NkZTliMzFjZTg4NjA1NDgxNzNiYjRhMmE1N2ExNjAwMDAwMDAwIiwic2d4LmhlYWRlci52ZW5kb3JfaWQiOiI5MzlhNzIzM2Y3OWM0Y2E5OTQwYTBkYjM5NTdmMDYwNyIsInNneC5oZWFkZXIudmVyc2lvbiI6IjAzMDAifX0.SG7TUxm0E3yZs7rozijScMJIZTY8WVPZN3Yxu2CsW8HFE6lDLymdTzc1XTVrYb97PpGc6oCLwuLax786XHLN250SY_IW5GmR5WKRcYSGSQtOnYfsY7AMX3hvpV3rHGjP0QWZo_ezUp9yIbnJNwSprmFTzcNZkr2YNr1KmwWU-LhGSVCyviQwgtnqnhmQGwH-nHCcmgk0F3su_hdoFXImCggSHStXECAJ0cNjpAuTCsSQvrB4g3lM-dMii-D6a58uB_TGuOVf8Yqj9Gi6PrdxvIJZc1LSDDgo9uYuavNzunU3S3TkA2ZLDK4HIB0zDWfOnS2ZTrjyRdu5ZkzoGVK_YQ
API
RESTful CoCo-AS’s endpoints are as following:
/attestation
: receives evidence verification request. The request POST payload is like
{
"tee": "sgx", // tee type.
"evidence": "YWFhCg==...", // base64 encoded evidence in URL SAFE NO PAD,
"runtime_data": { // `runtime_data` is optional. If given, the runtime data binding will
// be checked.
// The field `raw` and `structured` are exclusive.
"raw": "YWFhCg==...", // Base64 encoded runtime data slice. The whole string will be base64
// decoded. The result one will then be accumulated into a digest which
// is used as the expected runtime data to check against the one inside
// evidence.
//
// The alphabet is URL_SAFE_NO_PAD.
// defined in https://datatracker.ietf.org/doc/html/rfc4648#section-5
"structured": {} // Runtime data in a JSON map. CoCoAS will rearrange each layer of the
// data JSON object in dictionary order by key, then serialize and output
// it into a compact string, and perform hash calculation on the whole
// to check against the one inside evidence. The hash algorithm is defined
// by `runtime_data_hash_algorithm`.
//
// After the verification, the structured runtime data field will be included
// inside the token claims.
},
"init_data": { // `init_data` is optional. If given, the init data binding will
// be checked.
// The field `raw` and `structured` are exclusive.
"raw": "YWFhCg==...", // Base64 encoded init data slice. The whole string will be base64
// decoded. The result one will then be accumulated into a digest which
// is used as the expected init data to check against the one inside
// evidence. The hash algorithm is defined by `init_data_hash_algorithm`.
//
// The alphabet is URL_SAFE_NO_PAD.
// defined in https://datatracker.ietf.org/doc/html/rfc4648#section-5
"structured": {} // Init data in a JSON map. CoCoAS will rearrange each layer of the
// data JSON object in dictionary order by key, then serialize and output
// it into a compact string, and perform hash calculation on the whole
// to check against the one inside evidence.
//
// After the verification, the structured init data field will be included
// inside the token claims.
},
"runtime_data_hash_algorithm": "sha384",// Hash algorithm used to calculate runtime data. Currently can be
// "sha256", "sha384" or "sha512". If not specified, "sha384" will be selected.
"init_data_hash_algorithm": "sha384", // Hash algorithm used to calculate init data. Currently can be
// "sha256", "sha384" or "sha512". If not specified, "sha384" will be selected.
"policy_ids": ["default", "policy-1"] // List of IDs of the policy used to check evidence. If
// not provided, a "default" one will be used.
}
/policy
: receives policy setting request. The request POST payload is like
{
"type": "rego", // policy type
"policy_id": "yyyyy", // raw string of policy id
"policy": "xxxxx" // base64 encoded policy content
}
Launch Configuration
For both gRPC and RESTful version CoCoAS, you can use the -c
parameter to specify the path of the configuration file.
The configuration file is a JSON file.
The following properties can be set globally, i.e. not under any configuration section:
Property | Type | Description | Required | Default |
---|---|---|---|---|
work_dir |
String | The location for Attestation Service to store data. | False | Firstly try to read from ENV AS_WORK_DIR . If not any, use /opt/confidential-containers/attestation-service |
rvps_config |
RVPSConfiguration | RVPS configuration | False | - |
attestation_token_broker |
AttestationTokeBroker | Attestation result token configuration. | False | - |
AttestationTokenBroker
Property | Type | Description | Required | Default |
---|---|---|---|---|
type |
String | Type of token to issue (Ear or Simple ) |
No | Ear |
When type
field is set to Ear
, the following extra properties can be set:
Property | Type | Description | Required | Default |
---|---|---|---|---|
duration_min |
Integer | Duration of the attestation result token in minutes. | No | 5 |
issuer_name |
String | Issure name of the attestation result token. | No | CoCo-Attestation-Service |
developer_name |
String | The developer name to be used as part of the Verifier ID in the EAR | No | https://confidentialcontainers.org |
build_name |
String | The build name to be used as part of the Verifier ID in the EAR | No | Automatically generated from Cargo package and AS version |
profile_name |
String | The Profile that describes the EAR token | No | tag:github.com,2024:confidential-containers/Trustee` |
policy_dir |
String | The path to the work directory that contains policies to provision the tokens. | No | /opt/confidential-containers/attestation-service/token/ear/policies |
signer |
TokenSignerConfig | Signing material of the attestation result token. | No | None |
When type
field is set to Simple
, the following extra properties can be set:
Property | Type | Description | Required | Default |
---|---|---|---|---|
duration_min |
Integer | Duration of the attestation result token in minutes. | No | 5 |
issuer_name |
String | Issure name of the attestation result token. | No | CoCo-Attestation-Service |
policy_dir |
String | The path to the work directory that contains policies to provision the tokens. | No | /opt/confidential-containers/attestation-service/token//simple/policies |
signer |
TokenSignerConfig | Signing material of the attestation result token. | No | None |
TokenSignerConfig
This section is optional. When omitted, a new RSA key pair is generated and used.
Property | Type | Description | Required | Default |
---|---|---|---|---|
key_path |
String | RSA Key Pair file (PEM format) path. | Yes | - |
cert_url |
String | RSA Public Key certificate chain (PEM format) URL. | No | - |
cert_path |
String | RSA Public Key certificate chain (PEM format) file path. | No | - |
RVPS Configuration
Property | Type | Description | Required | Default |
---|---|---|---|---|
type |
String | It can be either BuiltIn (Built-In RVPS) or GrpcRemote (connect to a remote gRPC RVPS) |
No | BuiltIn |
BuiltIn RVPS
If type
is set to BuiltIn
, the following extra properties can be set
Property | Type | Description | Required | Default |
---|---|---|---|---|
store_type |
String | The underlying storage type of RVPS. (LocalFs or LocalJson ) |
No | LocalFs |
store_config |
JSON Map | The optional configurations to the underlying storage. | No | Null |
Different store_type
will have different store_config
items.
For LocalFs
, the following properties can be set
Property | Type | Description | Required | Default |
---|---|---|---|---|
file_path |
String | The path to the directory storing reference values | No | /opt/confidential-containers/attestation-service/reference_values |
For LocalJson
, the following properties can be set
Property | Type | Description | Required | Default |
---|---|---|---|---|
file_path |
String | The path to the file that storing reference values | No | /opt/confidential-containers/attestation-service/reference_values.json |
Remote RVPS
If type
is set to GrpcRemote
, the following extra properties can be set
Property | Type | Description | Required | Default |
---|---|---|---|---|
address |
String | Remote address of the RVPS server | No | 127.0.0.1:50003 |
Configuration Examples
Running with a built-in RVPS:
{
"work_dir": "/var/lib/attestation-service/",
"policy_engine": "opa",
"rvps_config": {
"type": "BuiltIn",
"store_type": "LocalFs",
"store_config": {
"file_path": "/var/lib/attestation-service/reference-values"
}
},
"attestation_token_broker": {
"type": "Ear",
"duration_min": 5
}
}
Running with a remote RVPS:
{
"work_dir": "/var/lib/attestation-service/",
"policy_engine": "opa",
"rvps_config": {
"type": "GrpcRemote",
"address": "127.0.0.1:50003"
},
"attestation_token_broker": {
"type": "Ear",
"duration_min": 5
}
}
Configurations for token signer
{
"work_dir": "/var/lib/attestation-service/",
"policy_engine": "opa",
"rvps_config": {
"type": "GrpcRemote",
"address": "127.0.0.1:50003"
},
"attestation_token_broker": {
"type": "Ear",
"duration_min": 5,
"issuer_name": "some-body",
"signer": {
"key_path": "/etc/coco-as/signer.key",
"cert_url": "https://example.io/coco-as-certchain",
"cert_path": "/etc/coco-as/signer.pub"
}
}
}
Backups
Intel Platform Configuration
A workable file which will directly connect to Intel’s PCS without caching is given.
{"collateral_service": "https://api.trustedservices.intel.com/sgx/certification/v4/"}
This can be used for test. Users are expected to set the file to connect to another available PCCS which keeps cache.
PCCS are usually supported by cloud providers, you can find the steps to configure /etc/sgx_default_qcnl.conf
for
- Aliyun (Alibaba Cloud): Build an SGX confidential computing environment
- Azure: Trusted Hardware Identity Management
- IBM Cloud: Attestation with Intel SGX and Data Center Attestation Primitives (DCAP) for Virtual Servers for VPC Or you can set-up a PCCS yourself.