UID2-4808 Add AKS protocol for AzureCCCoreAttestationService#374
UID2-4808 Add AKS protocol for AzureCCCoreAttestationService#374cYKatherine merged 20 commits intomainfrom
AzureCCCoreAttestationService#374Conversation
71335dc to
79b38c1
Compare
79b38c1 to
25ef824
Compare
|
|
||
| @Test | ||
| public void testHappyPath() throws AttestationException { | ||
| var provider = new AzureCCAksCoreAttestationService(alwaysPassTokenValidator, alwaysPassPolicyValidator); |
There was a problem hiding this comment.
This file is exactly the same as src/test/java/com/uid2/shared/secure/AzureCCCoreAttestationServiceTest.java, except testing on AzureCCAksCoreAttestationService
| .vmDebuggable(false) | ||
| .runtimeData(generateBasicRuntimeData()) | ||
| .ccePolicyDigest(CCE_POLICY_DIGEST) | ||
| .azureProtocol("azure-cc") |
There was a problem hiding this comment.
By default set it to be azure-cc. Test AKS in the tests below.
There was a problem hiding this comment.
Should we use MaaTokenPayload.AZURE_CC_ACI_PROTOCOL here?
|
|
||
| // CC stands for Confidential Container | ||
| @Slf4j | ||
| public class AzureCCAksCoreAttestationService extends AzureCCCoreAttestationServiceBase { |
There was a problem hiding this comment.
Do we actually need child classes for these? Could they just be one class that takes in the AZURE_CC_PROTOCOL?
AzureCCCoreAttestationServiceAzureCCCoreAttestationService
src/test/java/com/uid2/shared/secure/azurecc/MaaTokenSignatureValidatorTest.java
Show resolved
Hide resolved
src/main/java/com/uid2/shared/secure/azurecc/MaaTokenPayload.java
Outdated
Show resolved
Hide resolved
src/test/resources/com.uid2.shared/test/secure/azurecc/jwt_payload_aks.json
Show resolved
Hide resolved
src/main/java/com/uid2/shared/secure/AzureCCCoreAttestationService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/uid2/shared/secure/azurecc/MaaTokenPayload.java
Outdated
Show resolved
Hide resolved
src/test/java/com/uid2/shared/secure/AzureCCCoreAttestationServiceTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/uid2/shared/secure/azurecc/MaaTokenSignatureValidatorTest.java
Outdated
Show resolved
Hide resolved
| * @throws AttestationException | ||
| */ | ||
| MaaTokenPayload validate(String tokenString) throws AttestationException; | ||
| MaaTokenPayload validate(String tokenString, String protocol) throws AttestationException; |
There was a problem hiding this comment.
Should we introduce an enum for the protocols instead of using a String?
src/main/java/com/uid2/shared/secure/AzureCCCoreAttestationService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/uid2/shared/secure/AzureCCCoreAttestationService.java
Outdated
Show resolved
Hide resolved
src/test/java/com/uid2/shared/secure/azurecc/MaaTokenSignatureValidatorTest.java
Outdated
Show resolved
Hide resolved
c0056d8 to
8b3af91
Compare
8b3af91 to
a34056a
Compare
src/test/java/com/uid2/shared/secure/AzureCCCoreAttestationServiceTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/uid2/shared/secure/azurecc/MaaTokenSignatureValidatorTest.java
Outdated
Show resolved
Hide resolved
| .vmDebuggable(false) | ||
| .runtimeData(generateBasicRuntimeData()) | ||
| .ccePolicyDigest(CCE_POLICY_DIGEST) | ||
| .azureProtocol("azure-cc") |
There was a problem hiding this comment.
Should we use MaaTokenPayload.AZURE_CC_ACI_PROTOCOL here?
src/test/java/com/uid2/shared/secure/azurecc/PolicyValidatorTest.java
Outdated
Show resolved
Hide resolved
ffeb876 to
ed3c07d
Compare
src/test/java/com/uid2/shared/secure/AzureCCCoreAttestationServiceTest.java
Outdated
Show resolved
Hide resolved
…-aks-attestation Revert "UID2-4808 Add AKS protocol for `AzureCCCoreAttestationService`" (#374)
AzureCCCoreAttestationService#374azure-cc-aksto allowed protocols uid2-admin#368