Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: authzed/api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: authzed/api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix-openapi-security-def
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 11, 2024

  1. fixes OpenAPI spec security definitions

    SpiceDB does not use ApiKeyAuth authentication, but Bearer authentication, where
    the type of bearer token is an API Key.
    
    However, the OpenAPI v2 Spec, which is the one supported by grpc-gateway,
    does not support bearer authentication:
    https://swagger.io/docs/specification/v2_0/authentication/authentication/
    
    Still, the grpc-gateway maintainers indicated in
    grpc-ecosystem/grpc-gateway#1089
    that bearer is actually supported in grpc-gateway generator.
    
    This was reported in authzed/authzed-go#255,
    indicating that folks generating code out of the OpenAPI definition
    will have errors because the generated error did not properly provide
    the preshared key with the expected `Authorization: Bearer <psk>`
    format.
    
    I'm not 100% sure if this is a legit intermediate state
    between v2 and v3 we can leverage, but the current generated
    code is clearly broken anyway.
    
    See https://swagger.io/docs/specification/v3_0/authentication/api-keys/
    See https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/
    vroldanbet committed Nov 11, 2024
    Copy the full SHA
    d7c3c64 View commit details

This comparison is taking too long to generate.

Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.

You can try running this command locally to see the comparison on your machine:
git diff main...fix-openapi-security-def