You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete the Attestation Administration APIs. (Azure#25480)
* Complete policy management management APIs
* Removed a bunch of dead code; cleaned up some comments
* Use Options for Set policy management certificates
* Mandatory parameters are now ctor parameters for PolicyManagementCertificateOptions object
Copy file name to clipboardExpand all lines: sdk/attestation/azure-security-attestation/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,10 @@ be introduced later.)
45
45
design guidelines.
46
46
* Removed `buildPolicyClient`, `buildPolicyAsyncClient`, `buildPolicyCertificatesClient` and `buildPolicyCertificatesAsyncClient` methods
47
47
on the `AttestationClientBuilder` class and implemented a new `AttestationAdministrationClient` class which contains the administrative APIs.
48
+
* Removed `buildPolicyCertificatesClient` and `buildPolicyCertificatesAsyncClient`, and `PolicyCertificatesClient` and `PolicyCertificatesAsyncClient` replacing the functionality
49
+
with the `listPolicyManagementCertificates`, `addPolicyManagementCertificate` and `removePolicyManagementCertificate` APIs on the `AttestationAdministrationClient` object.
50
+
* Removed `JsonWebKey`, `JsonWebKeySet`, `PolicyCertificatesModificationResult`, `PolicyCertificatesModifyResponse`, and `CertificatesResponse` objects
51
+
because they are no longer a part of the public API surface.
48
52
49
53
### Bugs Fixed
50
54
* Attestation tests now all pass when run in Live mode.
Copy file name to clipboardExpand all lines: sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationAsyncClient.java
Copy file name to clipboardExpand all lines: sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationClient.java
* The AttestationAdministrationClient provides access to the administrative policy APIs
@@ -58,7 +64,7 @@ public final class AttestationAdministrationClient {
58
64
*
59
65
* <p>
60
66
* <b>NOTE:</b>
61
-
* The {@link AttestationAdministrationClient#getAttestationPolicyWithResponse(AttestationType, Context)} API returns the underlying
67
+
* The {@link AttestationAdministrationClient#getAttestationPolicyWithResponse(AttestationType, AttestationTokenValidationOptions, Context)} API returns the underlying
62
68
* attestation policy specified by the user. This is NOT the full attestation policy maintained by
63
69
* the attestation service. Specifically it does not include the signing certificates used to verify the attestation
64
70
* policy.
@@ -73,15 +79,16 @@ public final class AttestationAdministrationClient {
73
79
* </p>
74
80
*
75
81
* @param attestationType Specifies the trusted execution environment whose policy should be retrieved.
82
+
* @param validationOptions Options used when validating the token returned by the attestation service.
76
83
* @param context Context for the operation.
77
84
* @throws IllegalArgumentException thrown if parameters fail the validation.
78
85
* @throws HttpResponseException thrown if the request is rejected by server.
79
86
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
80
87
* @return the attestation policy expressed as a string.
@@ -94,7 +101,7 @@ public Response<String> getAttestationPolicyWithResponse(AttestationType attesta
94
101
* policy.
95
102
* </p>
96
103
* <p>
97
-
* To retrieve the signing certificates used to sign the policy, use the {@link AttestationAdministrationClient#getAttestationPolicyWithResponse(AttestationType, Context)} API.
104
+
* To retrieve the signing certificates used to sign the policy, use the {@link AttestationAdministrationClient#getAttestationPolicyWithResponse(AttestationType, AttestationTokenValidationOptions, Context)} API.
98
105
* The {@link Response} object is an instance of an {@link com.azure.security.attestation.models.AttestationResponse} object
99
106
* and the caller can retrieve the full information maintained by the service by calling the {@link AttestationResponse#getToken()} method.
100
107
* The returned {@link com.azure.security.attestation.models.AttestationToken} object will be
@@ -247,4 +254,122 @@ public Response<PolicyResult> resetAttestationPolicyWithResponse(AttestationType
247
254
}
248
255
249
256
// endregion
257
+
258
+
/**
259
+
* Retrieves the current set of attestation policy signing certificates for this instance.
260
+
*
261
+
* <p>
262
+
* On an Isolated attestation instance, each {@link AttestationAdministrationAsyncClient#setAttestationPolicy(AttestationType, AttestationPolicySetOptions)}
263
+
* or {@link AttestationAdministrationAsyncClient#resetAttestationPolicy(AttestationType, AttestationPolicySetOptions)} API call
264
+
* must be signed with the private key corresponding to one of the certificates in the list returned
265
+
* by this API.
266
+
*</p>
267
+
* <p>
268
+
* This establishes that the sender is in possession of the private key associated with the
269
+
* configured attestation policy management certificates, and thus the sender is authorized
270
+
* to perform the API operation.
271
+
* </p>
272
+
*
273
+
* @param tokenValidationOptions Options to be used validating the token returned by the attestation service.
274
+
* @param context Context for the operation.
275
+
* @throws IllegalArgumentException thrown if parameters fail the validation.
276
+
* @throws HttpResponseException thrown if the request is rejected by server.
277
+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
278
+
* @return the attestation policy expressed as a string.
* Retrieves the current set of attestation policy signing certificates for this instance.
288
+
*
289
+
* <p>
290
+
* On an Isolated attestation instance, each {@link AttestationAdministrationAsyncClient#setAttestationPolicy(AttestationType, AttestationPolicySetOptions)}
291
+
* or {@link AttestationAdministrationAsyncClient#resetAttestationPolicy(AttestationType, AttestationPolicySetOptions)} API call
292
+
* must be signed with the private key corresponding to one of the certificates in the list returned
293
+
* by this API.
294
+
* </p>
295
+
* <p>
296
+
* This establishes that the sender is in possession of the private key associated with the
297
+
* configured attestation policy management certificates, and thus the sender is authorized
298
+
* to perform the API operation.
299
+
* </p>
300
+
*
301
+
*
302
+
* @throws IllegalArgumentException thrown if parameters fail the validation.
303
+
* @throws HttpResponseException thrown if the request is rejected by server.
304
+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
305
+
* @return the response to an attestation policy operation.
Copy file name to clipboardExpand all lines: sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationClientBuilder.java
/** A builder for creating a new instance of the AttestationClient type. */
27
+
/**
28
+
* A builder for creating a new instance of the AttestationClient type.
29
+
*
30
+
* The AttestationAdministrationClient provides access to the administrative policy APIs
31
+
* implemented by the Attestation Service.
32
+
* <p>
33
+
* More information on attestation policies can be found <a href='https://docs.microsoft.com/azure/attestation/basic-concepts#attestation-policy'>here</a>
34
+
* </p>
35
+
*
36
+
* There are two main families of APIs available from the Administration client.
0 commit comments