Skip to content
New issue

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

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

Already on GitHub? # to your account

Add GQ proof of authentication checking. #118

Closed
wants to merge 1 commit into from
Closed

Add GQ proof of authentication checking. #118

wants to merge 1 commit into from

Conversation

znewman01
Copy link
Owner

Requires a modified version of Fulcio that embeds a JWT header/body (no signature) into the certificate, along with the GQ proof of authentication.

Changes include:

  • Added the GQ-based proof-of-authentication library in pkg/cosign/poa.
  • Add support for deserializing the new extensions for JWT token header/body and GQ proof.
  • Disable some (important!) checks, like requiring a signed timestamp, to make local testing easier.
  • Hard-code the Sigstore Dex instance's JWK URL. This should use OIDC discovery and a local cache.
  • Check the GQ proof in verification.

Needs (substantial) cleanup before merge, but serves as a proof-of-concept.

Can be verified by starting the modified Fulcio:

$ go run main.go serve --port 5555 --ca ephemeralca --ct-log-url=""

Then, sign and verify:

$ ./cosign sign-blob \                                                                                                                                                                        ~/git/cosign
    --fulcio-url http://localhost:5555 \
    --insecure-skip-verify \
    --tlog-upload=false \
    --output-certificate crt.pem.b64 \
    --output-signature sig \
    --yes \
    /dev/null
$ export SIGSTORE_ROOT_FILE=<(curl http://localhost:5555/api/v1/rootCert)
$ ./cosign verify-blob \
    --certificate-oidc-issuer https://accounts.google.com \
    --certificate-identity zjn@chainguard.dev \
    --certificate <(base64 -d crt.pem.b64) \
    --signature sig \
    --insecure-ignore-tlog \
    --insecure-ignore-sct=true \
    /dev/null

Requires a modified version of Fulcio that embeds a JWT header/body (no
signature) into the certificate, along with the GQ proof of authentication.

Changes include:

- Added the GQ-based proof-of-authentication library in `pkg/cosign/poa`.
- Add support for deserializing the new extensions for JWT token header/body and
  GQ proof.
- Disable some (important!) checks, like requiring a signed timestamp, to make
  local testing easier.
- Hard-code the Sigstore Dex instance's JWK URL. This *should* use OIDC
  discovery and a local cache.
- Check the GQ proof in verification.

Needs (substantial) cleanup before merge, but serves as a proof-of-concept.

Can be verified by starting the modified Fulcio:

```
$ go run main.go serve --port 5555 --ca ephemeralca --ct-log-url=""
```

Then, sign and verify:

```
$ ./cosign sign-blob \                                                                                                                                                                        ~/git/cosign
    --fulcio-url http://localhost:5555 \
    --insecure-skip-verify \
    --tlog-upload=false \
    --output-certificate crt.pem.b64 \
    --output-signature sig \
    --yes \
    /dev/null
$ export SIGSTORE_ROOT_FILE=<(curl http://localhost:5555/api/v1/rootCert)
$ ./cosign verify-blob \
    --certificate-oidc-issuer https://accounts.google.com \
    --certificate-identity zjn@chainguard.dev \
    --certificate <(base64 -d crt.pem.b64) \
    --signature sig \
    --insecure-ignore-tlog \
    --insecure-ignore-sct=true \
    /dev/null
```
@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions
Copy link

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this Sep 24, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant