Closed amwolff closed 3 months ago
Change pkg/auth: save public project ID with authservice data mentions this issue.
Change pkg/authclient: support public_project_id in authservice response mentions this issue.
Change testsuite/authservice: add integration test mentions this issue.
Change pkg/server/middleware: show public project ID in events and logs mentions this issue.
Goal
It would be useful for edge services to be able to retrieve and know what the public project ID tied to the access grant at hand is. It would be most useful to have it in logs. Because we don't want to incur additional roundtrips to the satellite on every, e.g., S3 operation, it makes sense to save the public project ID to the Auth Database when Auth Service registers the access grant the same way we save the macaroon head from the access grant. Project IDs always reference the same macaroon heads/access grants, so it's safe to do this.
Acceptance Criteria
Make Auth Service use the new API to query the satellite for the public project ID and save it.
Links
Current database schema of Auth Database:
https://github.com/storj/edge/blob/6f460d76aaee91a6e5ec18b0cdfa02fcc6a05660/pkg/auth/spannerauth/spannerauthtest/spannerauthtest.go#L43-L55