Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

Problem with SGX DCAP Attestation

gadamsriram
Beginner
695 Views

Hello ,

We are working in Confidential Computing Domain.

We are developing a solution, which is required to run in SGX Platform.

Before running, we need to make sure that the software is running in proper SGX Plaform.

Went through intel documentation and followed the below steps to verify DCAP Attestation process.

 

https://www.intel.com/content/www/us/en/developer/articles/guide/intel-software-guard-extensions-data-center-attestation-primitives-quick-install-guide.html

Followed exact steps, other than that, used Ubuntu-24.04 version.

This has builtin SGX drivers in the Kernel.

Our Server has Xeon Processor:  Intel(R) Xeon(R) Gold 6438N

 

I ran PCKIDRetrievalTool. Here is the output.

mahan@host:~$ sudo PCKIDRetrievalTool

Intel(R) Software Guard Extensions PCK Cert ID Retrieval Tool Version 1.22.100.3

Warning: platform manifest is not available or current platform is not multi-package platform.
the pccs_url setting coming from network_setting.conf, and the value is: https://localhost:8081/sgx/certification/v3/platforms.
the use_secure_cert setting coming from network_setting.conf, and the value is: FALSE.
the user_token setting coming from network_setting.conf, and the value is: *** (actual value hidden).
the proxy_type setting coming from network_setting.conf, and the value is: DIRECT.
Error: unexpected error occurred while sending data to cache server.
pckid_retrieval.csv has been generated successfully, however the data couldn't be sent to cache server!

 

I have been trying this for last week with the different combinations.

And End result is same.

 

Can you shed some light on this?

 

 

Adding more information:

BTW, I have subscribed to SGX Registration Service as well. But, I don't know, where to use these keys.

 

log messages from /opt/intel/sgx-dcap-pccs/logs/pccs_server.log

025-01-23 09:54:43.438 [info]: Client Request-ID : 89fa9a90e4a447da96bd1df1d787e6d1
2025-01-23 09:54:44.403 [info]: Request-ID is : 844e0c8a46834bdaadb56a1ffde20cac
2025-01-23 09:54:44.404 [error]: Intel PCS server returns error(404).
2025-01-23 09:54:44.404 [error]: Error: No cache data for this platform.
at Module.getPckCertFromPCS (file:///opt/intel/sgx-dcap-pccs/services/logic/commonCacheLogic.js:159:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ReqCachingMode.registerPlatforms (file:///opt/intel/sgx-dcap-pccs/services/caching_modes/cachingMode.js:205:7)
at async Module.registerPlatforms (file:///opt/intel/sgx-dcap-pccs/services/platformsRegService.js:107:3)
at async postPlatforms (file:///opt/intel/sgx-dcap-pccs/controllers/platformsController.js:52:5)
2025-01-23 09:54:44.406 [info]: 127.0.0.1 - - [23/Jan/2025:09:54:44 +0000] "POST /sgx/certification/v3/platforms HTTP/1.1" 404 32 "-" "-"

 

pccs status:

ahan@induz-compute-sgx:~$ systemctl status pccs
● pccs.service - Provisioning Certificate Caching Service (PCCS)
Loaded: loaded (/usr/lib/systemd/system/pccs.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-01-23 08:11:00 UTC; 1h 48min ago
Docs: https://github.com/intel/SGXDataCenterAttestationPrimitives/blob/master/QuoteGeneration/pccs/README.md
Main PID: 9458 (node)
Tasks: 15 (limit: 153802)
Memory: 56.5M (peak: 64.7M)
CPU: 3.028s
CGroup: /system.slice/pccs.service
└─9458 /usr/bin/node /opt/intel/sgx-dcap-pccs/pccs_server.js

Jan 23 09:54:43 induz-compute-sgx node[9458]: 2025-01-23 09:54:43.438 [info]: Client Request-ID : 89fa9a90e4a447da96bd1df1d787e6d1
Jan 23 09:54:44 induz-compute-sgx node[9458]: 2025-01-23 09:54:44.403 [info]: Request-ID is : 844e0c8a46834bdaadb56a1ffde20cac
Jan 23 09:54:44 induz-compute-sgx node[9458]: 2025-01-23 09:54:44.404 [error]: Intel PCS server returns error(404).
Jan 23 09:54:44 induz-compute-sgx node[9458]: 2025-01-23 09:54:44.404 [error]: Error: No cache data for this platform.
Jan 23 09:54:44 induz-compute-sgx node[9458]: at Module.getPckCertFromPCS (file:///opt/intel/sgx-dcap-pccs/services/logic/commonCacheLogic.js:159:11)
Jan 23 09:54:44 induz-compute-sgx node[9458]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Jan 23 09:54:44 induz-compute-sgx node[9458]: at async ReqCachingMode.registerPlatforms (file:///opt/intel/sgx-dcap-pccs/services/caching_modes/cachingMode.js:205:7)
Jan 23 09:54:44 induz-compute-sgx node[9458]: at async Module.registerPlatforms (file:///opt/intel/sgx-dcap-pccs/services/platformsRegService.js:107:3)
Jan 23 09:54:44 induz-compute-sgx node[9458]: at async postPlatforms (file:///opt/intel/sgx-dcap-pccs/controllers/platformsController.js:52:5)
Jan 23 09:54:44 induz-compute-sgx node[9458]: 2025-01-23 09:54:44.406 [info]: 127.0.0.1 - - [23/Jan/2025:09:54:44 +0000] "POST /sgx/certification/v3/platforms HTTP/1.1" 404 32 "-" "-"

Thanks

Sriram

0 Kudos
8 Replies
Benny_Intel
Moderator
655 Views

Hello Sriram,

This main clue is the warning message:  "Warning: platform manifest is not available or current platform is not multi-package platform."

If the platform manifest has been read once by one of our tools, the tools set the SgxRegistrationStatus.Status bit = 1. This instructs the BIOS to not present the platform manifest in subsequent reboots, which is done for security reasons. At this point, you have to "Enable" the "SGX Factory Reset" in the BIOS.

This will generate new platform keys and re-create the platform manifest, which can then be used to register the platform. But be aware that any data sealed with the previous platform keys will no longer be accessible/unsealable, because of the new platform keys. If you want to have access to the platform manifest after registration, you should store it somewhere.

Best regards,
Benny

 

 

0 Kudos
gadamsriram
Beginner
645 Views

Hi Benny,

Thanks for the Quick reply.

I did as suggested by you. Now also it is failing, But not getting this error.

mahan@induz-compute-sgx:~$ sudo PCKIDRetrievalTool
[sudo] password for mahan:

Intel(R) Software Guard Extensions PCK Cert ID Retrieval Tool Version 1.22.100.3

the pccs_url setting coming from network_setting.conf, and the value is: https://127.0.0.1:8081/sgx/certification/v3/platforms.
the use_secure_cert setting coming from network_setting.conf, and the value is: FALSE.
the user_token setting coming from network_setting.conf, and the value is: *** (actual value hidden).
the proxy_type setting coming from network_setting.conf, and the value is: DIRECT.
Error: unexpected error occurred while sending data to cache server.
Registration status has been set to completed status.
pckid_retrieval.csv has been generated successfully, however the data couldn't be sent to cache server!

 

pccs_server.log

2025-01-23 10:32:58.134 [info]: Client Request-ID : 9ee16033b98048f495419f305be9d077
2025-01-23 10:32:59.425 [info]: Request-ID is : 2c6a58f3fdf64d829f4de46300df08d5
2025-01-23 10:32:59.426 [error]: Intel PCS server returns error(400).
2025-01-23 10:32:59.427 [error]: Error-Code:PackageNotFound
2025-01-23 10:32:59.427 [error]: Error-Message:The request was rejected by the server as at least one of the processor packages could not be recognized by the server.
2025-01-23 10:32:59.428 [error]: Error: No cache data for this platform.
at Module.getPckCertFromPCS (file:///opt/intel/sgx-dcap-pccs/services/logic/commonCacheLogic.js:159:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ReqCachingMode.registerPlatforms (file:///opt/intel/sgx-dcap-pccs/services/caching_modes/cachingMode.js:205:7)
at async Module.registerPlatforms (file:///opt/intel/sgx-dcap-pccs/services/platformsRegService.js:107:3)
at async postPlatforms (file:///opt/intel/sgx-dcap-pccs/controllers/platformsController.js:52:5)
2025-01-23 10:32:59.454 [info]: 127.0.0.1 - - [23/Jan/2025:10:32:59 +0000] "POST /sgx/certification/v3/platforms HTTP/1.1" 404 32 "-" "-"

 

Thanks

Sriram

 

 

0 Kudos
Benny_Intel
Moderator
629 Views

Can you please execute the following on your machine and respond with the output?

sudo apt install msr-tools ; sudo modprobe msr
rdmsr 0xce -f 27:27

This will tell us whether or not you have production CPUs.

0 Kudos
gadamsriram
Beginner
625 Views

Hi Benny,

Here is the output of the said command:

mahan@induz-compute-sgx:~$ sudo rdmsr 0xce -f 27:27
1
mahan@induz-compute-sgx:~$

 

Thanks

Sriram

0 Kudos
Benny_Intel
Moderator
573 Views

Hello Sriram,

This output tells us that you have a pre-production CPU.

Attestation of pre-production CPUs is not expected to work with the public documentation. Please reach out to Intel through the channel that provided you these CPUs for more information.

Best regards,
Benny

0 Kudos
gadamsriram
Beginner
530 Views

Hi Benny,
Instead of using my SGX Server, I have taken Azure SGX Instance to test the same.

used following application to test quote Generation

https://github.com/intel/SGXDataCenterAttestationPrimitives/tree/main/SampleCode/RustSGXQuoteGenerationSample

Now I am getting Failure " Failed to get the target_info"

 

My requirement is to test Attestation process.

1. I am trying to generate the Quote, which i need to integrate into my application.

2. Add Verification logic into my Root of Trust Application for the Generated Quote.

 

Please Advice.

 

Thanks

Sriram

0 Kudos
Benny_Intel
Moderator
518 Views

Hi Sriram,

As your new question goes into a completely different direction from your initial question, I would ask you to create a new thread.
Before you do, please consider the following thread
 and Azure's documentation about the topic.

Best regards,
Benny

0 Kudos
gadamsriram
Beginner
392 Views

Thanks

0 Kudos
Reply