Skip to content

oidc: rename expected_certificate_subject -> federated_issuer #1016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ All versions prior to 0.9.0 are untracked.
have been re-homed under `sigstore.models`
([#990](https://github.com/sigstore/sigstore-python/pull/990))

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

## [2.1.5]

## Fixed
Expand Down
6 changes: 3 additions & 3 deletions sigstore/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def issuer(self) -> str:
return self._iss

@property
def expected_certificate_subject(self) -> str:
def federated_issuer(self) -> str:
"""
Returns a URL identifying the **expected** subject for any Sigstore
Returns a URL identifying the **federated** issuer for any Sigstore
certificate issued against this identity token.

The behavior of this field is slightly subtle: for non-federated
Expand All @@ -218,7 +218,7 @@ def expected_certificate_subject(self) -> str:
implementation-defined claim.

This attribute exists so that clients who wish to inspect the expected
subject of their certificates can do so without relying on
underlying issuer of their certificates can do so without relying on
implementation-specific behavior.
"""
if self._federated_issuer is not None:
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,4 @@ def test_ok(self, dummy_jwt, iss, identity_claim, identity_value, fed_iss):
assert identity.in_validity_period()
assert identity.identity == identity_value
assert identity.issuer == iss
assert identity.expected_certificate_subject == iss if not fed_iss else fed_iss
assert identity.federated_issuer == iss if not fed_iss else fed_iss
Loading