Skip to content

Commit

Permalink
Pass through error messages from AuthFromMD for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
evankanderson committed Dec 19, 2023
1 parent 26cc49f commit 817514b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deployment/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.13.3
digest: sha256:6fbdc8a525f6f9f98ec4ac5d11b049993f2e5800fd2f44b3abb3b00b74936ee0
generated: "2023-10-27T10:44:53.947903137+03:00"
version: 2.13.4
digest: sha256:3d041bf804861d1b205322f51bbf39745e1437de236c1fc0e74f6e5031a70e73
generated: "2023-12-18T13:06:30.589568-08:00"
3 changes: 3 additions & 0 deletions internal/controlplane/handlers_authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func AuthUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.Unary

token, err := gauth.AuthFromMD(ctx, "bearer")
if err != nil {
if statusErr, ok := status.FromError(err); ok {
return nil, util.FromRpcError(statusErr)
}
return nil, status.Errorf(codes.Unauthenticated, "no auth token: %v", err)
}

Expand Down

0 comments on commit 817514b

Please sign in to comment.