Skip to content

Commit bc3d200

Browse files
authored
oidc: rename expected_certificate_subject -> federated_issuer (#1016)
* oidc: rename expected_certificate_subject -> federated_issuer Signed-off-by: William Woodruff <[email protected]> * CHANGELOG: record changes Signed-off-by: William Woodruff <[email protected]> --------- Signed-off-by: William Woodruff <[email protected]>
1 parent 2cb68fe commit bc3d200

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ All versions prior to 0.9.0 are untracked.
8282
have been re-homed under `sigstore.models`
8383
([#990](https://github.com/sigstore/sigstore-python/pull/990))
8484

85+
* API: `oidc.IdentityToken.expected_certificate_subject` has been renamed
86+
to `oidc.IdentityToken.federated_issuer` to better describe what it actually
87+
contains. No functional changes have been made to it
88+
([#1016](https://github.com/sigstore/sigstore-python/pull/1016))
89+
8590
## [2.1.5]
8691

8792
## Fixed

sigstore/oidc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ def issuer(self) -> str:
205205
return self._iss
206206

207207
@property
208-
def expected_certificate_subject(self) -> str:
208+
def federated_issuer(self) -> str:
209209
"""
210-
Returns a URL identifying the **expected** subject for any Sigstore
210+
Returns a URL identifying the **federated** issuer for any Sigstore
211211
certificate issued against this identity token.
212212
213213
The behavior of this field is slightly subtle: for non-federated
@@ -218,7 +218,7 @@ def expected_certificate_subject(self) -> str:
218218
implementation-defined claim.
219219
220220
This attribute exists so that clients who wish to inspect the expected
221-
subject of their certificates can do so without relying on
221+
underlying issuer of their certificates can do so without relying on
222222
implementation-specific behavior.
223223
"""
224224
if self._federated_issuer is not None:

test/unit/test_oidc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,4 @@ def test_ok(self, dummy_jwt, iss, identity_claim, identity_value, fed_iss):
267267
assert identity.in_validity_period()
268268
assert identity.identity == identity_value
269269
assert identity.issuer == iss
270-
assert identity.expected_certificate_subject == iss if not fed_iss else fed_iss
270+
assert identity.federated_issuer == iss if not fed_iss else fed_iss

0 commit comments

Comments
 (0)