-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remote authenticator and authorizer (#234)
* Move authorizer_factory out to pkg/auth/configuration Prepare for remote authentication and authorization to avoid future curcular dependency. * Add grpcClientFactory to grpc.NewAuthenticatorFromConfiguration * Add grpcClientFactory to http.NewAuthenticatorFromConfiguration * Add grpcClientFactory to NewAuthorizerFromConfiguration * Add remote auth .proto definitions * Implement remote authenticator and authorizer The authenticate and authorize tasks can now be sent remotely over gRPC to an external service. This way, custom authentication and authorization does not require a modified builds of the Buildbarn components. To avoid spamming the remote service with calls for every REv2 request and keep the latency low, the verdicts, both allow and deny, are cached for a duration specified in the response from the remote service. * Deduplicate JWT header authenticator code
- Loading branch information
Showing
39 changed files
with
3,316 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
load("@rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "configuration", | ||
srcs = ["authorizer_factory.go"], | ||
importpath = "github.com/buildbarn/bb-storage/pkg/auth/configuration", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/auth", | ||
"//pkg/clock", | ||
"//pkg/digest", | ||
"//pkg/eviction", | ||
"//pkg/grpc", | ||
"//pkg/proto/configuration/auth", | ||
"//pkg/util", | ||
"@com_github_jmespath_go_jmespath//:go-jmespath", | ||
"@org_golang_google_grpc//codes", | ||
"@org_golang_google_grpc//status", | ||
"@org_golang_google_protobuf//encoding/protojson", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.