Skip to content

attestation: update Hygon DCU verification support - #232

Merged
jialez0 merged 5 commits into
mainfrom
agent/hygon-dcu-verifier-1.10.1-alpha
Sep 21, 2026
Merged

jialez0 merged 5 commits into
mainfrom
agent/hygon-dcu-verifier-1.10.1-alpha

Conversation

@jialez0

@jialez0 jialez0 commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Enable Hygon DCU verification in both attestation-service binaries, update the verifier to Hygon's requested csv-rs baseline plus the fixed-width chip-ID compatibility fix, and prepare the AL8 1.10.1-beta package.

Changes

  • Build gRPC AS and RESTful AS with hygon-dcu-verifier while preserving the existing default verifier set.
  • Pin csv-rs to 1c6fa975f1c74fefbea63739c91feb23efae7186:
    • parent: Hygon commit 2824f17c3d877f6155b65581f3b96ee8c4e5eb3a;
    • added fix: trim trailing NUL padding in fixed-width DCU chip IDs before local HSK/CEK lookup and online fallback URL construction.
  • Build the integration RPM as trustee-1.10.1-beta.al8.
  • Keep prerelease handling for non-final RPM tags.
  • Preserve the four /etc/trustee service configs with %config(noreplace).
  • Preserve an existing Trustee signing key pair across upgrades, derive a missing public key from the existing private key, and reject a public-only state before payload installation instead of silently rotating identity.
  • Skip systemctl lifecycle calls when systemd is not present, so the RPM can be installed cleanly in a container.
  • Update the release workflow's GitHub Actions to their Node.js 24 runtime generations after the platform deprecated the previous Node.js 20 actions.

The csv-rs fix is under Hygon review at panpingsheng/csv-rs#1.

Why the extra chip-ID fix is required

Exact 2824f17 collected evidence successfully, but the verifier received a 16-byte chip ID containing two trailing NUL bytes. It therefore looked for a padded filename instead of the valid local certificate:

Certificate not found at /opt/dcu/certs/<chip-id-with-padding>_hsk_cek.cert, attempting download
kds_url: https://cert.hygon.cn/hsk_cek?snumber=<chip-id>

The Trustee cluster is isolated from cert.hygon.cn, so verification could not complete. The patched beta verifier instead logged:

Reading certificate from: /opt/dcu/certs/<chip-id>_hsk_cek.cert
HygonDcu Verifier/endorsement check passed.

Composite-attestation context

The original resource failure also contained an AA-side nonce mismatch: HygonTPM primary evidence uses negotiated SM3, whereas HygonDcu additional evidence is bound with RCAR's default SHA-384. guest-components PR #115 fixes that distinction. Its beta CDH package requires the matching beta AA; operators must upgrade AA and CDH together because upgrading AA alone does not replace an old CDH's in-process RCAR path. Trustee's strict nonce verification remains unchanged.

Validation

Source/build validation:

  • cargo metadata --locked: passed;
  • cargo check -p verifier --features hygon-dcu-verifier: passed;
  • csv-rs network unit tests: 7 passed;
  • full AL8 rpmbuild -ba: passed;
  • RPM digest, package metadata, isolated AL8 installation/file verification, binary --help, and host ldd: passed.
  • isolated AL8 lifecycle tests passed for first install without systemd, upgrade preserving keys/configs, private-only recovery, and transaction-level rejection of a public-only state;
  • generated private/public key modes are 0600/0644, and the generated public key matches the private key.

Live target/K8s validation with all beta packages installed:

  • Trustee pod package: trustee-1.10.1-beta.al8.x86_64;
  • gRPC AS, RESTful AS, KBS and Gateway all restarted from beta payloads; ports 50004, 50005, 8080 and 8081 were reachable;
  • three fresh KBS token sessions: 3/3 succeeded;
  • three CDH reads of a test KBS resource: 3/3 succeeded, with no resource content logged;
  • HygonTPM signature/PCR checks passed on every fresh attestation;
  • HygonTPM and HygonDcu endorsement checks both passed;
  • local certificate lookup used /opt/dcu/certs/<chip-id>_hsk_cek.cert;
  • KBS /attest returned HTTP 200;
  • no Attestation nonce mismatch, hycu_misc_security_cmd: wait ack timeout, or Hygon TPM 0x70001 was observed in final validation.

Artifact:

trustee-1.10.1-beta.al8.x86_64.rpm
sha256 75246df81abb78aa9b83affaea7717618a66b116a2115f7dcdf256abbff31bf2

Follow-up

The full-SHA fork pin is a temporary, reproducible integration pin approved for this validation. Move it to the final Hygon-owned csv-rs commit after panpingsheng/csv-rs#1 is reviewed and merged.

Upstream 2824f17 currently proceeds to ioctl if hyflash is unavailable or execution fails. The validated environment has working hyflash; this PR does not claim fail-closed behavior for arbitrary hyflash failures.

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@ostest-bot

Copy link
Copy Markdown

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。

@jialez0
jialez0 merged commit bdf0e5c into main Sep 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants