I'm working on an API that is secured via Firebase ( multiple Firebase projects, actually ).
I've sorted out how to add Firebase to the YAML file that defines the GRPC service by adding the following:
authentication:
providers:
- id: project-1
audiences: aud-1
- id: project-2
audiences: aud-2
- id: project-3
audiences: aud-2
rules:
- selector: "*"
requirements:
- provider_id: project-1
- provider_id: project-2
- provider_id: project-3
However, in the auto-generated developer portal the REST API only shows requiring an API key, it doesn't show that it also requires an Authorization header. I know how to add security definitions to the proto file, but neither the google.api.http annotation or the protoc_gen_swagger.options.openapiv2_swagger annotation seem to support adding anything other than api key & oauth2 security definitions.
How do I set up the proto file so that the auto-generated Endpoints docs show that a user needs to provide the Authorization header?
For reference, here's the relevant part of my proto file:
syntax = "proto3";
package api;
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "protoc-gen-swagger/options/annotations.proto";
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
info: {
title: "The API";
version: "v3.1.19";
contact: {
name: "Sean Hagen";
};
};
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
};
service Thing {
rpc List(ThingFilter) returns (ThingList){
option (google.api.http) = {
get: "/v2/things"
};
}
}
Is there some way to provide a OpenAPI JSON file that describes the HTTP REST endpoints to `gcloud endpoints services deploy` along with the descriptor.pb and grpc API YAML files so that I can better define the HTTP API in the docs?