Skip to content

Conversation

woodruffw
Copy link
Member

This removes some usage of stubs in favor of real models (via factories) where possible, and eliminates some potential sources of double-state/divergence in the original services.

In particular:

  • OIDCPublisherMixin.supports_attestations is now attestation_identity, and returns a Publisher | None that can be used directly for verification
  • OIDCPublisherMixin.publisher_verification_policy is removed, since the Publisher now encodes the verification policy
  • _publisher_from_oidc_publisher is removed, since attestation_identity serves the same purpose

Signed-off-by: William Woodruff <william@trailofbits.com>
Handled latently via the Publisher identity.

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw self-assigned this Nov 18, 2024
@woodruffw woodruffw marked this pull request as ready for review November 18, 2024 20:30
@woodruffw woodruffw requested a review from a team as a code owner November 18, 2024 20:30
@woodruffw
Copy link
Member Author

To summarize: this makes it easier to enable attestations from other TP providers, since they no longer need to update multiple independent sites: each new attestation source only needs to add attestation_identity to its base mixin.

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
Copy link
Member Author

woodruffw commented Nov 18, 2024

NB: This also removes our top-level dependency on sigstore, since all ops go through pypi_attestations (which still uses sigstore itself, of course). I can remove that in this PR or a follow-on.

@di
Copy link
Member

di commented Nov 18, 2024

NB: This also removes our top-level dependency on sigstore, since all ops go through pypi_attestations (which still uses sigstore itself, of course). I can remove that in this PR or a follow-on.

Let's go ahead and do it here, thanks!

Signed-off-by: William Woodruff <william@trailofbits.com>
Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside from 1 nit.

Signed-off-by: William Woodruff <william@trailofbits.com>
@di di merged commit a2b945e into pypi:main Nov 18, 2024
20 checks passed
@woodruffw woodruffw deleted the ww/simplify-integrity-services branch November 18, 2024 21:15
@woodruffw woodruffw mentioned this pull request Nov 18, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants