Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
/v1/telemetry/subscribe,/unsubscribeand/:vehicleTokenId/startaccept anyauth.dimo.zonetoken whose wallet is the DIMO Mobile license. The DIMO console now gives team members their own signer on a license and disables it when they're removed. dex stamps that signer on developer JWTs assigner_address, and this PR makes tesla-oracle refuse a removed member's still-valid token.What
signer_addressthrough token-exchange-api'sSignerCheckgRPC (5 s deadline; token-exchange caches for 60 s and skips addresses that aren't licenses).403 signer no longer authorized for this license.503 could not verify signer.TOKEN_EXCHANGE_GRPC_ADDRandSIGNER_CHECK_MODE(enforcedefault,log,off). The chart setslogin dev and prod for the rollout; production switches toenforceafter a week.signer_check_total{service="tesla-oracle",result}, alerted on from token-exchange-api's PrometheusRule.Release order
token-exchange-api with
SignerCheck(DIMO-Network/token-exchange-api#120) must be live in an environment before this, and dex must emit the claim (DIMO-Network/dex#332).go.modcurrently pins token-exchange-api to the #120 branch commit (24b46c9), which also raises some shared minimums (golang-jwt 5.3.0, fasthttp 1.65.0, swag 1.16.6, cloudevent 0.1.4). Re-point it to token-exchange-apimainafter #120 merges, before merging this.Successor services
dauthandvtaren't live. If either takes over these routes, it needs the same check.Tests
TestSignerCheckOnTelemetryRoutes: enforce refuses, empty mode enforces and allows an enabled signer, log never refuses, claimless tokens skip the check, an invalid mode fails startup.The onboarding e2e test builds the app the way production does, with
SIGNER_CHECK_MODE=offbecause it runs no token-exchange-api.