-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi Veraison Team,
I was testing the provisioning API by submitting endorsements from the PoC endorser for ARM CCA support. During this process, I observed a behaviour that may be problematic or unintended:
🔁 Submitting the same endorsement multiple times results in duplicate entries in the endorsement store database (kvstore).
🧪 Steps to Reproduce
These are the exact steps I followed to reproduce the issue:
✅ 1. Clone and build Veraison services
git clone https://github.com/veraison/services.git
cd services/deployments/docker
make
source env.bashThis builds the Docker images:
veraison/keycloakveraison/vtsveraison/provisioningveraison/verificationveraison/management
Start all services:
veraison start
veraison status # confirm all are runningReference: [Veraison Docker deployment guide](https://github.com/veraison/services/tree/main/deployments/docker)
✅ 2. Clone and build the PoC endorser
git clone https://git.codelinaro.org/linaro/dcap/cca-demos/poc-endorser.git
cd poc-endorser
make🔧 Modify endorse.sh:
-api_server=https://provisioning-service:8888/endorsement-provisioning/v1/submit
+api_server=https://provisioning-service:9443/endorsement-provisioning/v1/submit🔧 Modify Makefile:
-endorse: ; docker run --network=host $(TAG)
+endorse: ; docker run --network=veraison-net $(TAG)✅ 3. Submit endorsements
Submit the original endorsements:
make endorse # 1st time
make endorse # 2nd time (same data)Then, modify the BL1 measurement value in the input, and submit again:
# BL1 measurement changed in input cbor file (generated using evcli)
make endorse # 3rd time (conflicting value)🧾 4. Query the endorsement store (VTS)
docker exec vts-service sqlite3 /opt/veraison/stores/vts/en-store.sql \
"SELECT * FROM kvstore;" | grep rC27mzsskJvCzIG7wdFeL5V2byU9vP+Orhqo=Example output:
ARM_CCA://0/f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAUFgAAAAAAAA=| { ... "measurement-value": "micfKpFr..." }
ARM_CCA://0/f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAUFgAAAAAAAA=| { ... "measurement-value": "micfKpFr..." }
ARM_CCA://0/f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAUFgAAAAAAAA=| { ... "measurement-value": "dhanus/..." }
As seen above:
- The same entry was stored twice for the same
kv_key. - A third, conflicting value with the same
kv_keywas also accepted.
❓ Open Questions
This raises some concerns and requests for clarification:
1. Is this behavior expected?
- Should the provisioning API deduplicate or overwrite endorsements for an existing key?
- Should it reject conflicting entries?
2. How does verification handle this?
- If multiple entries exist under the same key but with different
measurement-valuefields, how does the verifier choose which one to match against? - Is there a coalescing strategy or precedence rule?
Metadata
Metadata
Assignees
Labels
No labels