Add routing information to Personal Access Tokens
Overview
In Update TokenAuthenticatable with routable infor... (#486946 - closed) we extended TokenAuthenticatable so that we can add routing information to it. We'll update the personal access tokens to add routing information to it so that we can decode that information later in the HTTP router and route the request to the correct Cell.
We need to add the following routing information to personal access tokens to start off with:
-
o: Organization ID (organization_id.to_s(36)) -
u: User ID (user_id.to_s(36)) -
c: Cell ID (Settings.cell[:id]&.to_s(36))
All this information is going to be base64 encoded so the HTTP router will decode it as explained in https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/routable_tokens/.
Edited by Rémy Coutable