Skip to main content

Interface Definition

Auth Data Source Abstraction: Go interface to gRPC service

PADS defines an AuthDataSource interface in grpc/data_source.go.

This interface is abstracted via the gRPC Service named GatewayEndpoints in gateway_endpoints.proto.

Together, this is used to stream data from Endpoint Auth Data Source to the Envoy Go External Auth Server seen in the diagram above.

PADS go Interface

type AuthDataSource interface {
FetchAuthDataSync() (*proto.AuthDataResponse, error)
AuthDataUpdatesChan() (<-chan *proto.AuthDataUpdate, error)
}
FunctionReturnsDetails
FetchAuthDataSync()Full set of Gateway EndpointsCalled when PADS starts to populate its Gateway Endpoint Data Store
AuthDataUpdatesChan()Channel receiving auth data updatesUpdates are streamed as changes are made to the data source

PATH gRPC Interface

gRPC Proto File Documentation

See the gateway_endpoint.proto documentation for complete details.

service GatewayEndpoints {
rpc FetchAuthDataSync(AuthDataRequest) returns (AuthDataResponse);
rpc StreamAuthDataUpdates(AuthDataUpdatesRequest) returns (stream AuthDataUpdate);
}
MethodRequestResponseDescription
FetchAuthDataSyncAuthDataRequestAuthDataResponseFetches initial set of GatewayEndpoints from remote gRPC server
StreamAuthDataUpdatesAuthDataUpdatesRequestStream AuthDataUpdateStreams real-time updates of GatewayEndpoint changes from the server