Remote Attestation Add-On for OpenFL #1457
Replies: 4 comments 4 replies
-
@anshubit5516, as discussed offline, please add more details on how the remote attestation feature will be enabled via the FL plan (f.e. via a |
Beta Was this translation helpful? Give feedback.
-
@anshubit5516 Thanks for design, overall looks good to me. Two small comments:
|
Beta Was this translation helpful? Give feedback.
-
@anshubit5516 where ITA details will be added, will it be added in any section of plan.yaml and circulated by model owner to all participants. |
Beta Was this translation helpful? Give feedback.
-
We have reached the following agreement during the design review:
The semi-manual approach described in this comment has been approved for implementation in OpenFL 1.9. CC: @psfoley |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
Even though they can run in TEE-ready containers, in the current implementation of OpenFL, both collaborators and aggregators implicitly trust each other (based on their TLS certificates). This lack of explicit trust verification of the FL workloads leaves the system vulnerable to potential attacks by malicious users or entities that could compromise the privacy of the model or the data.
To address this vulnerability, attestation becomes a critical requirement. Attestation plays a critical role in federated learning by verifying the integrity and authenticity of the software and hardware involved. By ensuring that both aggregators and collaborators are trusted, we can protect sensitive data and models from malicious actors. This verification process is essential for maintaining a secure and trusted environment, which is crucial for the confidentiality and integrity of the federated learning workflow. Attestation significantly reduces the risk of attacks and ensures that all participants adhere to elevated trust and security standards.
Additional background:
Confidential Federated Learning with OpenFL
The proposal involves enhancing the existing OpenFL topology by incorporating a remote attestation process. This additional trust and security layer will further verify the integrity of the software and hardware of the participants involved in federated learning.
Components
Aggregators: Usually operated by the model owner, it collects model updates from other participants (collaborators) to build an aggregate model without directly accessing the collaborators’ private data.
Collaborators: Collaborator nodes are operated by data owners, to train the model on local data, sending intermediate results (weight updates) to the aggregator.
Intel Trust Authority (ITA): A remote attestation service operated by Intel, which can be used to confirm the integrity and trustworthiness of each participant’s TEE (software + hardware). ITA returns an independently verifiable attestation certificate if the enclave is valid against policies defined by the federation.
End to End Attestation flow:
The main methods for (remote) workload attestation include Passport Attestation and Background attestation. Each has its own advantages and disadvantages. We will look into both strategies and decide on which suits best for our case.
In the proposed design we extend the secured gRPC over mTLS connection to perform attestation between aggregators and collaborators. We assume that each participant is running in an SGX environment.
NB! The attestation flow feature will be controlled by FL plan flag : enable_remote_attestation, for example under the
network
section:Option 1: Passport Model
In this approach, each node interacts with the attestation service to generate a remote attestation certificate (“passport”) based on their local SGX quote.
Generate a Local SGX Quote:
The collaborator generates its own SGX quote and obtains a token from the Intel Trust Authority (ITA).
Share remote attestation Token with Aggregator (via secure gRPC over mTLS channel):
The collaborator shares its ITA token with the aggregator and requests the aggregator's ITA token.
Aggregator can check the token’s validity via the ITA verification service, or autonomously by validating the token against an ITA-issued public key
If verification fails, aggregator terminates the connection, as it does not trust the collaborator
Otherwise, the Aggregator gets its own enclave token from ITA and share with collaborators for mutual attestation.
Verify the Aggregator's Token:
Upon receiving the aggregator's ITA token, the collaborator verifies it (i.e. using the ITA verification service).
Verification Outcome:
If the verification fails, the collaborator terminates the gRPC connection and exits the network, as the aggregator cannot be trusted.
If the verification succeeds, the collaborator continues with task execution.
NB! At this stage the aggregator and the collaborator trust each other based on their remote attestation certificates.
Pros:
Simplicity:
Passport attestation is straightforward and easy to implement. It involves presenting a certificate or token that proves the entity's identity and trustworthiness.
Speed:
The process is typically faster since it relies on pre-issued certificates or tokens, reducing the need for real-time verification.
Offline Capability:
Passport attestation can be performed offline if the certificates or tokens are pre-issued and stored locally.
Reduced Load on Attestation Service:
Since the attestation is done using pre-issued credentials, it reduces the load on the attestation service, making it more scalable and reducing usage costs.
Cons:
Static Trust:
The trust is static and based on the validity of the certificate or token. If the certificate is compromised, the trust is also compromised until the certificate is revoked.
Revocation Challenges:
Revoking a compromised certificate or token can be challenging and may not be immediate, leaving a window of vulnerability. This can be mitigated by using the ITA token verification service.
Limited Flexibility:
Passport attestation may not provide real-time verification of the entity's current state or behaviour, limiting its flexibility in dynamic environments.
Option 2: Background Model (Recommended)
In this approach, participants share their local SGX quotes, whereas the relying party (other participants) interact with the attestation service to generate a remote attestation report.
Generate Self Quote:
The collaborator generates its own SGX quote and shares it with the aggregator over a secure gRPC channel, requesting the aggregator's SGX quote.
Receive and Verify Collaborators Quote:
Upon receiving the collaborator’s quote, aggregator verifies it with ITA. If verification fails, Aggregator terminates gRPC channel.
Verification of Aggregators Quote:
Upon receiving the aggregators quote, collaborator verifies with ITA.
Verification Outcome:
If the verification fails, the collaborator terminates the gRPC connection and exits the network.
If the verification succeeds, the collaborator continues with task execution.
Note: Currently in this solution for simplicity we added only ITA for verification of quote. User can also use dcap library to attest of sgx quote.
Pros:
Dynamic Trust:
Background attestation provides real-time verification of the entity's current state, ensuring that the entity is trustworthy at the time of interaction.
Enhanced Security:
By continuously verifying the entity's state, background attestation reduces the risk of compromised entities participating in the system.
Immediate Revocation:
If an entity is found to be compromised, it can be immediately revoked, reducing the window of vulnerability.
Flexibility:
Background attestation can adapt to changing conditions and provide more granular control over the trustworthiness of entities.
Cons:
Complexity:
Implementing background attestation is more complex and requires continuous monitoring and verification of entities.
Performance Overhead:
The continuous verification process can introduce performance overhead, potentially impacting the system's overall performance.
Dependency on Attestation Service:
Background attestation relies on the availability and reliability of the attestation service, making it a potential single point of failure.
Increased Load on Attestation Service:
The continuous verification process increases the load on the attestation service, requiring more resources and scalability considerations.
Technical Details
The Trust Authority (TA) provides two APIs for generating and verifying attestation tokens:
/appraisal/v1/attest:
Example :

/faithful-verification/v1/token-audit-report:
Error Handling
SGX Quote Generation Error:
Description:
If an error occurs during the generation of the SGX quote, it is critical to handle it immediately.
Action:
Throw an exception and exit the process. Without a valid SGX quote, the attestation process cannot proceed, and continuing would compromise the integrity of the system.
ITA Attestation Error:
Description:
Errors during the ITA (Intel Trust Authority) attestation process can occur due to various reasons, such as invalid quotes or ill formed quote.
Action:
Terminate the TLS channel and exit the federation. This ensures that no untrusted entities can participate in the federated learning process.
ITA Not Available:
Description:
If the ITA service is unavailable, the attestation process cannot proceed, which is crucial for maintaining the security of the federation.
Action:
Implement a retry mechanism to keep attempting the attestation. Without a valid attestation token, the flow cannot proceed, and retrying ensures that temporary issues do not halt the process permanently.
Alternatives Considered
In the previous design, attestation was performed using an existing mTLS gRPC channel to exchange quotes and attested tokens. While this approach was convenient, it had a significant drawback: the TLS keys have been generated outside of the enclave.
To address this issue, we propose the following solution:

Pros:
OpenFl participants only establishes connection if they have attested each other's identity.
Keys are generated inside enclave, hence more secured.
Cons:
Currently in OpenFL, no REST support is available.
Risks and Mitigations
In both, Passport/Background attestation model, ITA becomes a risk of being single point of failure.
Possible Mitigation:
Passport model: We can introduce ‘KID’ based attestation which can help in verifying the token.
Background model: Since we have the quote, we can try for DCAP attestation.
Appendices:
Data Center Attestation Primitives Attestation (DCAP):
DCAP attestation is a mechanism used in Intel SGX (Software Guard Extensions) to verify the integrity and trustworthiness of an enclave (a secure execution environment). Unlike EPID-based attestation, DCAP does not rely on Intel's Attestation Service (IAS). Instead, it allows enterprises to perform attestation locally using a Provisioning Certification Service (PCS) provided by Intel.
How DCAP Attestation Works
1. Verifying the signature using the PCK.
2. Ensuring the PCK is valid by checking its certificate chain against Intel's Provisioning Certification Service (PCS).
Advantages of DCAP
Local Attestation:
No dependency on Intel's IAS for attestation. Though, it needs to download time to time latest PCK certificates, CRLs, TCB information. But in real time verification, mostly cached information is used, if not staled.
Scalability:
Suitable for large-scale deployments in data centers.
Flexibility:
Enterprises can implement their own attestation policies.
KID Verification:
KID (Key ID) Verification is a process used in Intel SGX attestation to ensure the authenticity and validity of a Provisioning Certification Key (PCK) certificate. The KID is a unique identifier associated with the PCK certificate, and it helps in verifying that the certificate belongs to a specific platform and is issued by Intel's Provisioning Certification Service (PCS).
How KID Verification Works
1. Checking its signature against Intel's root CA.
2. Ensuring the certificate is not revoked (using CRLs).
3. Verifying the certificate's validity period.
Purpose of KID Verification
1. Ensures the PCK certificate used in attestation is authentic and issued by Intel.
2. Links the quote to a specific platform's hardware.
3. Prevents tampering or misuse of invalid certificates.
Key Benefits
Efficiency:
The KID allows quick lookup of the PCK certificate, reducing overhead.
Security:
Ensures only trusted certificates are used for attestation.
Scalability:
Simplifies certificate management in large-scale deployments.
Beta Was this translation helpful? Give feedback.
All reactions