refactor: consolidate platform-credentials on token-exchange/store#90
refactor: consolidate platform-credentials on token-exchange/store#90robertodauria merged 2 commits intomainfrom
Conversation
- Use token-exchange/store.AutojoinManager in main service (fixes namespace mismatch: was "autojoin", now "platform-credentials") - Remove duplicated internal/adminx/datastore.go (now uses token-exchange/store) - Remove dead code: internal/adminx/apikeys.go (unused GCP API Keys system) - Remove dead code: internal/adminx/keysiface/keys.go
Pull Request Test Coverage Report for Build 21392512518Details
💛 - Coveralls |
bassosimone
left a comment
There was a problem hiding this comment.
Please, make sure the datastore entities in autojoin and the entities in platform-credentials are equal before merging this pull request 🙏.
Motivation for the ask: in this PR and in #88, we are basically moving m-lab/autojoin away from the autojoin namespace.
Otherwise, trying to consolidate code that looks similar and should probably not be separated seems good to me. On this note, please, make sure that the commit you merge contains context about the overall plan that we're executing here (we're not using issues and commits are part of the repository history much more integrally than issues anyway, so it's probably good to have good documentation of the why).
Add -credentials-project flag to allow autojoin to read credentials from a different GCP project (mlab-oti) than where it runs (mlab-autojoin). This enables both authentication flows (direct API key and JWT via token-exchange) to use the same credential store in platform-credentials namespace.
|
All the datastore entites in I have added another small but important piece: the ability to read credentials from adifferent project ( |
Summary
token-exchange/store.AutojoinManagerin main service (fixes namespace mismatch: was"autojoin", now"platform-credentials")internal/adminx/datastore.go(now usestoken-exchange/store)internal/adminx/apikeys.go(unused GCP API Keys system)internal/adminx/keysiface/keys.goContext
The platform-credentials system evolved organically, creating inconsistencies:
orgadmwas already usingtoken-exchange/storewith namespace"platform-credentials"internal/adminx/datastore.gowith namespace"autojoin"This PR consolidates both to use
token-exchange/storewith the correct"platform-credentials"namespace.This change is