Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/
- Loading branch information