-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add credshelper package to support the credentials helper interface (#…
…562) This adds all the credentials helper relevant code from bazelbuild/reclient/internal/pkg/auth to the new credshelper package in remote-apis-sdks with some changes: - CredentialsHelper isn't an auth "Mechanism" (since we're only supporting one mechanism, we don't need to define a type for that) - If no cache file is provided then it is assumed that no caching is required. If a valid cache file path is provided then it always caches credentials. - Updated oauth2 package version to support ReuseTokenWithExpiry - this had to be moved earlier in the Workspace file to override older versions imported from elsewhere.
- Loading branch information
1 parent
e71ca79
commit e74bc3d
Showing
11 changed files
with
938 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") | ||
|
||
proto_library( | ||
name = "credshelper_proto", | ||
srcs = ["credshelper.proto"], | ||
visibility = ["//visibility:public"], | ||
deps = ["@com_google_protobuf//:timestamp_proto"], | ||
) | ||
|
||
go_proto_library( | ||
name = "credshelper_go_proto", | ||
importpath = "github.com/bazelbuild/remote-apis-sdks/go/api/credshelper", | ||
proto = ":credshelper_proto", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_library( | ||
name = "credshelper", | ||
embed = [":credshelper_go_proto"], | ||
importpath = "github.com/bazelbuild/remote-apis-sdks/go/api/credshelper", | ||
visibility = ["//visibility:public"], | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
package credshelper; | ||
|
||
option go_package = "github.com/bazelbuild/remote-apis-sdks/go/api/credshelper"; | ||
|
||
// Stores information used for authenticating to the remote execution service. | ||
message Credentials { | ||
// Authentication mechanism. | ||
string auth_source = 1; | ||
// The token string. | ||
string token = 2; | ||
// Token expiry. | ||
google.protobuf.Timestamp expiry = 3; | ||
// Reauth expiry. | ||
google.protobuf.Timestamp refresh_expiry = 4; | ||
// Credshelper command digest in canonical form of hash/size. | ||
string credsHelperCmdDigest = 5; | ||
} |
Oops, something went wrong.