Page MenuHomePhabricator

[identity] Support service-to-service token in auth RPCs
ClosedPublic

Authored by bartek on Thu, Mar 20, 3:58 AM.
Tags
None
Referenced Files
F5054210: D14465.id47475.diff
Tue, Mar 25, 5:31 AM
F5050640: D14465.id.diff
Tue, Mar 25, 2:36 AM
F5026277: D14465.id47475.diff
Mon, Mar 24, 11:57 AM
Unknown Object (File)
Mon, Mar 24, 8:16 AM
Unknown Object (File)
Sun, Mar 23, 9:56 PM
Subscribers

Details

Summary

To call authenticated RPCs from other services, we have to support providing s2s token.
Modified the interceptor to look for the token, in addition to traditional Auth Metadata (uid + did + csat).

Test Plan

Tested locally, using GUI gRPC client and default localstack-stored service-to-service token.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Sun, Mar 23, 11:48 PM
kamil added inline comments.
services/identity/src/grpc_services/authenticated.rs
101–107

Why are we not using verify_auth_credential here? It seems to be doing the same thing as for AuthorizationCredential::UserToken. Maybe this could make the code simpler.

This revision is now accepted and ready to land.Mon, Mar 24, 3:13 AM
services/identity/src/grpc_services/authenticated.rs
101–107

verify_auth_credential is for non-Identity services. It calls the VerifyUserAccessToken Identity RPC which does this DDB call internally. It would create an unnecessary network call to self.