Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when using credential helper: "externally provided auth token was invalid" #37

Open
nqcuongit95 opened this issue Mar 14, 2024 · 1 comment

Comments

@nqcuongit95
Copy link

nqcuongit95 commented Mar 14, 2024

Hi guys, I'm trying to use reclient with buildbarn. My authentication method uses a custom credential helper, in my case it was just echo hard coded json like this:

{     
        "token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImFjY2Vzc190b2tlbiI6InRlc3RfYnVpbGRiYXJuIiwidG9rZW5fdHlwZSI6IkJlYXJlciIsImV4cGlyZXNfaW4iOjB9.Buen5gwvRe5daKqajuscm-NK2hQ-zt3s9wQC_SXe_oeSVxmQCe-Hl0R99U5OxMX6xBitBcIVi6rcW1QKm81VTAWGdkLxY6BBBy9zElBd3otG3wb8AX7Zmjt5xz5zzbP0I0ocVye8w9OAR_wOiJ4ShQdhpfUXjeRgFgEw0H7cEbp-Fo6mydIMmkVGEH1USvxK-hlynfZ1X_y4AemQgN5YcyLAQ3apGTDll14-83RcWSlQ8z5NGqwNLpmuObNP9VHZ8fo6zIGNDwEcQV2WGMafx3JTsci6v4LgpAbuqyZeYq6PPoiubOPYoBL1svYsnjHXfWgJ5YKtimmCOLDm2SQOaA",
        "expiry":"Sat Mar 15 14:21:16 CET 2024",
        "refresh_expiry":"Sat Mar 15 14:21:16 CET 2024"
}

I was able to authenticate with my builbarn server using above token (send a GetCapabilities request via postman grpc) but reclient complain with error Command failed: rpc error: code = Unauthenticated desc = Unable to authenticate with RBE, externally provided auth token was invalid

This is a part in reproxy.Info log showing that the call to GetCapabilities fails

I0314 15:18:47.055880   11928 depsscannerclient.go:184] Connected to dependency scanner service on 127.0.0.1:58654
I0314 15:18:47.055978   11928 main.go:342] Finished setting up input processor
I0314 15:18:47.055978   11928 server.go:218] Startup status: Input Processor started? true, RBE connected (or disabled)? false, Startup error? false
I0314 15:18:47.639044   11928 capabilities.go:68] call failed with err=rpc error: code = Unavailable desc = all SubConns are in TransientFailure, retrying.
I0314 15:18:47.857893   11928 capabilities.go:68] call failed with err=rpc error: code = Unavailable desc = all SubConns are in TransientFailure, retrying.
I0314 15:18:48.130595   11928 capabilities.go:68] call failed with err=rpc error: code = Unavailable desc = all SubConns are in TransientFailure, retrying.
I0314 15:18:48.474757   11928 capabilities.go:68] call failed with err=rpc error: code = Unavailable desc = all SubConns are in TransientFailure, retrying.
I0314 15:18:48.802904   11928 capabilities.go:68] call failed with err=rpc error: code = Unavailable desc = all SubConns are in TransientFailure, retrying.
I0314 15:18:49.435857   11928 capabilities.go:68] call failed with err=rpc error: code = Unavailable desc = all SubConns are in TransientFailure, retrying.
E0314 15:18:49.435857   11928 main.go:373] Failed to initialize SDK client: rpc error: code = Unavailable desc = rpc error: code = Unavailable desc = retry budget exhausted (6 attempts): all SubConns are in TransientFailure, authentication type (identity) used="external authentication token (gcert?)"
I0314 15:18:49.443053   11928 server.go:218] Startup status: Input Processor started? true, RBE connected (or disabled)? false, Startup error? true

I also attached full log below, Any advice for troubleshooting this guys, many thanks!

fullog.zip

@kfarnung
Copy link

This looks similar to the behavior of #27. I saw a similar issue when using the current versoin in the Chromium codebase, but the fix for the bug landed in the next version. Try updating the reclient_version in DEPS to the latest version from https://chrome-infra-packages.appspot.com/p/infra/rbe/client/linux-amd64 (currently re_client_version:0.137.1.08a9f1e-gomaip).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants