Easy to intercept gRPC request to authenticate metadata.
1.4K
Easy to intercept gRPC request to authenticate metadata.
Maxfocker ([email protected])

docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper help
docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper server -p {goalkeeper port} -t {target address}
docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper server -p {goalkeeper port} -t {target address} --force-auth -a BASIC
docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper server -p {goalkeeper port} -t {target address} --force-auth -a JWT --jwt-type {ES256/RS256/HS256/EES256/ERS256/EHS256} --jwt-key {private key string}
docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper server -p {goalkeeper port} -t {target address} --force-auth -a GRPC --auth-server {auth gRPC address}
docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper server -p {goalkeeper port} -t {target address} --force-auth -a HTTP --auth-server {auth http address (include api path)}
docker run --rm -ti justdomepaul/goalkeeper -timeout 60s /app/goalkeeper server -p {goalkeeper port} -t {target address} --limiter --bbr
authorization: Bearer {your jwt token or anything token}
If you want to use gRPC proxy authenticate, follow this gRPC proto and implement to your gRPC server.
syntax = "proto3";
package auth;
option go_package = ".;auth";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
// Auth service
service Auth {
rpc Ping(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
get: "/api/v1/auth/ping"
};
}
rpc Authenticate(AuthenticateRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/v1/auth/authenticate"
body: "*"
};
}
}
message AuthenticateRequest {
string token = 1;
}
.DEFAULT_GOAL := help
.PHONY: help clean build
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
HOST = $(abspath .)
GRPC_SRC = $(notdir ${wildcard *.proto})
GPRC_DIST_GO = ./dist/go
GRPC_DOCKER = docker run --rm -u 1000 -v $(HOST):/workspace/auth -w /workspace/auth justdomepaul/protobuf:v3.12.4 $(1)
GRPC_DOCKER_EXECUTE = docker run -ti --rm -u 1000 -v $(HOST):/workspace/auth -w /workspace/auth justdomepaul/protobuf:v3.12.4 sh
clean: clean-grpc ## clean all generated files
clean-grpc: ## clean GRPC generated files
@rm -rf $(GPRC_DIST_GO)
run: ## run execute
@$(call GRPC_DOCKER_EXECUTE)
build: build-grpc-go-fast ## build all
build-grpc-go-fast: ## build gRPC GO fast
$(info build gRPC GO)
@mkdir -p ./$(GPRC_DIST_GO)
$(eval INCLUDE := --descriptor_set_out=./dist/go/descriptor.protoset --include_source_info --include_imports -I=. -I=/go/pkg/mod -I=/go/pkg/mod/github.com/gogo/[email protected]/protobuf -I=/go/pkg/mod/github.com/gogo/[email protected]/ -I=/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/)
$(eval OUT_GO := --gofast_out=plugins=grpc,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/typesZ,paths=source_relative:$(GPRC_DIST_GO))
$(eval CMD := protoc $(INCLUDE) $(OUT_GO) $(GRPC_SRC))
@$(call GRPC_DOCKER, $(CMD))
MIT
MIT License
Copyright (c) 2020 goalkeeper
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Content type
Image
Digest
Size
54 MB
Last updated
over 5 years ago
docker pull justdomepaul/goalkeeper