You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: adds mTLS support for gRPC hook. grpc hook now have a hooks-grpc-secure flag
* fix: fix gRPC call when Authorization header is missing
* ignore .vscode ide settings
* Remove automatic forwarding of Authorization header
* Fix imports and format
* Minor code and comment improvements
---------
Co-authored-by: Tarida George Cristian <[email protected]>
Co-authored-by: Marius Kleidl <[email protected]>
Copy file name to clipboardExpand all lines: cmd/tusd/cli/flags.go
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,10 @@ var Flags struct {
55
55
GrpcHooksEndpointstring
56
56
GrpcHooksRetryint
57
57
GrpcHooksBackoff time.Duration
58
+
GrpcHooksSecurebool
59
+
GrpcHooksServerTLSCertFilestring
60
+
GrpcHooksClientTLSCertFilestring
61
+
GrpcHooksClientTLSKeyFilestring
58
62
EnabledHooks []hooks.HookType
59
63
ProgressHooksInterval time.Duration
60
64
ShowVersionbool
@@ -165,6 +169,10 @@ func ParseFlags() {
165
169
f.StringVar(&Flags.GrpcHooksEndpoint, "hooks-grpc", "", "An gRPC endpoint to which hook events will be sent to")
166
170
f.IntVar(&Flags.GrpcHooksRetry, "hooks-grpc-retry", 3, "Number of times to retry on a server error or network timeout")
167
171
f.DurationVar(&Flags.GrpcHooksBackoff, "hooks-grpc-backoff", 1*time.Second, "Wait period before retrying each retry")
172
+
f.BoolVar(&Flags.GrpcHooksSecure, "hooks-grpc-secure", false, "Enables secure connection via TLS certificates to the specified gRPC endpoint")
173
+
f.StringVar(&Flags.GrpcHooksServerTLSCertFile, "hooks-grpc-server-tls-certificate", "", "Path to the file containing the TLS certificate of the remote gRPC server")
174
+
f.StringVar(&Flags.GrpcHooksClientTLSCertFile, "hooks-grpc-client-tls-certificate", "", "Path to the file containing the client certificate for mTLS")
175
+
f.StringVar(&Flags.GrpcHooksClientTLSKeyFile, "hooks-grpc-client-tls-key", "", "Path to the file containing the client key for mTLS")
returnerrors.New("hooks-grpc-secure was set to true but no gRPC server TLS certificate file was provided. A value for hooks-grpc-server-tls-certificate is missing")
0 commit comments