Skip to content

Remove AuthHelper from attestation lookups#11

Merged
asgrim merged 2 commits intoThePHPF:mainfrom
asgrim:composer-2-9-compatibility-auth-helper
Nov 13, 2025
Merged

Remove AuthHelper from attestation lookups#11
asgrim merged 2 commits intoThePHPF:mainfrom
asgrim:composer-2-9-compatibility-auth-helper

Conversation

@asgrim
Copy link
Collaborator

@asgrim asgrim commented Nov 13, 2025

The context for this change:

  • Now that Composer 2.9 is released, I tried implementing the existing stuff with the new addAuthenticationOptions method.
  • I noticed that the auth token wasn't actually returning anything; this is a bug that also affects PIE (currently investigating)
  • When the token was being correctly provided, the attestation endpoint was giving me a 401 when using the Composer HttpDownloader. This was very odd, since a CLI curl command with a PAT DID work: curl -H "Authorization: token <redacted>" https://api.github.com/orgs/php/attestations/sha256:5ea836df7244a05d62b300a2294b5b6ae10c951f4f6a5e0d2ae2de84541142f0
  • Since the attestations AP doesn't actually need auth when looking up public attestations, debugging this seemed kinda pointless

Therefore, this PR accepts a new limitation that this only works with public attestations for now. If we want to update to support private too, we can open a new issue to investigate further.

@asgrim asgrim self-assigned this Nov 13, 2025
@asgrim asgrim added the enhancement New feature or request label Nov 13, 2025
@asgrim asgrim changed the title Composer 2.9 compatibility auth helper Remove AuthHelper from attestation lookups Nov 13, 2025
@asgrim asgrim modified the milestones: 0.0.2, 0.0.3 Nov 13, 2025
@asgrim asgrim merged commit c77994f into ThePHPF:main Nov 13, 2025
16 checks passed
@asgrim asgrim deleted the composer-2-9-compatibility-auth-helper branch November 13, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant