Skip to content

Commit 680d66f

Browse files
API review feedback (Azure#19164)
* First set of API review feedback Co-authored-by: McCoy Patiño <[email protected]>
1 parent 2e3670a commit 680d66f

File tree

111 files changed

+9923
-6044
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+9923
-6044
lines changed
Lines changed: 99 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,97 @@
11
# Release History
22

3-
## 1.0.0b5 (Unreleased)
3+
## 1.0.0 (2021-07-06)
44

55
### Features Added
66

7+
Sample cleanup - instead of using `ClientSecretCredentials`, the samples now use
8+
DefaultAzureCredential.
9+
710
### Breaking Changes
811

12+
* TPM attestation takes a JSON string parameter and returns a JSON string parameter.
13+
* `TPMAttestationRequest` and `TPMAttestationResponse` type were removed.
14+
* `confirmation` attribute removed from `AttestationResult` type.
15+
* The `AttestationSigningKey` type was removed, replaced with a `signing_key` and
16+
`signing_certificate` kwargs parameter.
17+
* All certificates and keys accepted and returned by the SDK are now PEM encoded
18+
strings instead of DER encoded arrays of bytes for easier manipulation and
19+
interoperability.
20+
* Removed `AttestationResponse` type, token value merged into `AttestationResult`,
21+
`PolicyResult`, etc.
22+
* Removed `TokenValidationOptions` type and merged the validation options into
23+
keyword arguments on the APIs which validate returned tokens. Those keyword
24+
arguments can also be specified on the Client classes to simplify individual
25+
API invocations.
26+
* Renamed `instance_url` parameter to the constructors to `endpoint`.
27+
* Many optional fields in `AttestationResult` were made non-optional.
28+
* `AttestationToken._validate_token` is made internal-only, and now returns `None`.
29+
* The caller provided `validation_callback` now must throw exceptions on invalid
30+
tokens rather than returning `False`.
31+
* Removed the `AttestationData` type, instead the `attest_xxx` APIs take two sets
32+
of parameters: `inittime_data` and `inittime_json` and `runtime_data` and `runtime_json`.
33+
if the `_json` value is set, the value of the parameter is an array of UTF8 encoded
34+
JSON values, if the `_data` value is set, the value of the parameter is an array
35+
of bytes.
36+
* The `get_policy` API now returns a `Tuple[str, AttestationToken]` to simplify
37+
the consumption experience.
38+
* The `get_policy_management_certificates` API also returns a `Tuple[list[list[string]], AttestationToken]` to simplify the consumption experience. Note that each of the entries
39+
in the list is a PEM encoded X.509 certificate.
40+
41+
To call into the attest APIs if you care about the attestation policy and token,
42+
you can write:
43+
44+
```python
45+
policy, token = attest_client.get_policy(AttestationType.SGX_ENCLAVE)
46+
```
47+
48+
If you only care about the policy, you can write any of the following:
49+
50+
```python
51+
policy, _ = attest_client.get_policy(AttestationType.SGX_ENCLAVE)
52+
```
53+
54+
or
55+
56+
```python
57+
policy = attest_client.get_policy(AttestationType.SGX_ENCLAVE)[0]
58+
```
59+
60+
or
61+
62+
```python
63+
response = attest_client.get_policy(AttestationType.SGX_ENCLAVE)
64+
policy = response[0]
65+
```
66+
67+
* The `AttestationToken` class no longer inherits from `Generic`.
68+
* The `attest_sgx_enclave`, and `attest_openenclave` APIs now return a tuple of
69+
`AttestationResult`, `AttestationToken`, similar to the `get_policy` API.
70+
* The `set_policy`, `reset_policy`, `add_policy_management_certificate`, and `remove_policy_management_certificate` APIs all return a tuple.
71+
* The `AttestationToken.get_body()` API was renamed `AttestationToken.body()`
72+
* Several time related properties were renamed to be consistent with the usage from
73+
keyvault:
74+
* The `expiration_time` property on `AttestationToken` was renamed to `expires`.
75+
* The `issuance_time` property on `AttestationToken` was renamed to `issued_on`.
76+
* The `not_before_time` property on `AttestationToken` was renamed to `not_before`.
77+
* The `StoredAttestationPolicy` model type has been removed. To validate the attestation policy hash, use the `AttestationPolicyToken` model object instead.
78+
* The `get_openidmetadata` API has been renamed `get_open_id_metadata`.
79+
980
### Key Bugs Fixed
1081

1182
### Fixed
1283

13-
1484
## 1.0.0b4 (2021-06-08)
1585

1686
### Features Added
1787

18-
- Added reset_policy API which was missed in the previous API.
19-
- Added models for all the generated API types.
20-
- Documentation cleanup for several APIs.
88+
* Added reset_policy API.
89+
* Added models.
90+
* Documentation cleanup.
2191

2292
### Breaking Changes
2393

24-
- Creating the `StoredAttestationPolicy` model type means that the `attestation_policy`
94+
* Creating the `StoredAttestationPolicy` model type means that the `attestation_policy`
2595
kwargs parameter for the constructor has been replaced with a positional `policy` parameter. As a result of this change, this code:
2696

2797
```python
@@ -34,32 +104,32 @@ changes to:
34104
StoredAttestationPolicy(attestation_policy)
35105
```
36106

37-
- Several parameters for the `AttestationResult` type have been renamed, and
107+
* Several parameters for the `AttestationResult` type have been renamed, and
38108
several parameters which were shared with `AttestationToken` have been
39109
removed. In general, the naming changes removed some protocol specific
40110
elements and replaced them with friendlier names. Finally, the deprecated
41111
attributes have been removed from the `AttestationResult`
42112

43113
Full set of changes:
44-
- `iss` renamed to `issuer`
45-
- `cnf` renamed to `confirmation`
46-
- `jti` renamed to `unique_identifier`
47-
- `iat` removed
48-
- `exp` removed
49-
- `nbf` removed
50-
- `deprecated_version` removed
51-
- `deprecated_is_debuggable` removed
52-
- `deprecated_sgx_collateral` removed
53-
- `deprecated_enclave_held_data` removed
54-
- `deprecated_enclave_held_data2` removed
55-
- `deprecated_product_id` removed
56-
- `deprecated_mr_enclave` removed
57-
- `deprecated_mr_signer` removed
58-
- `deprecated_svn` removed
59-
- `deprecated_tee` removed
60-
- `deprecated_policy_signer` removed
61-
- `deprecated_policy_hash` removed
62-
- `deprecated_rp_data` removed
114+
* `iss` renamed to `issuer`
115+
* `cnf` renamed to `confirmation`
116+
* `jti` renamed to `unique_identifier`
117+
* `iat` removed
118+
* `exp` removed
119+
* `nbf` removed
120+
* `deprecated_version` removed
121+
* `deprecated_is_debuggable` removed
122+
* `deprecated_sgx_collateral` removed
123+
* `deprecated_enclave_held_data` removed
124+
* `deprecated_enclave_held_data2` removed
125+
* `deprecated_product_id` removed
126+
* `deprecated_mr_enclave` removed
127+
* `deprecated_mr_signer` removed
128+
* `deprecated_svn` removed
129+
* `deprecated_tee` removed
130+
* `deprecated_policy_signer` removed
131+
* `deprecated_policy_hash` removed
132+
* `deprecated_rp_data` removed
63133

64134
If customers need to access the removed or renamed fields directly, they can
65135
use the `get_body` method of the `AttestationResponse` object:
@@ -73,16 +143,16 @@ StoredAttestationPolicy(attestation_policy)
73143

74144
### Features Added
75145

76-
- Preliminary implementation of a Track 2 SDK for the attestation service.
146+
* Preliminary implementation of a Track 2 SDK for the attestation service.
77147

78148
### Breaking Changes
79149

80-
- Complete reimplementation of the API surface, follows the API patterns already
150+
* Complete reimplementation of the API surface, follows the API patterns already
81151
established for the attestation service.
82152

83153
## 1.0.0b1 (2021-01-15)
84154

85155
Initial early preview release for MAA Data Plane SDK
86156
Demonstrates use of the machine generated MAA APIs.
87157

88-
- Initial Release
158+
* Initial Release

0 commit comments

Comments
 (0)