• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

m-lab / token-exchange / 19438473659
70%

Build:
DEFAULT BRANCH: main
Ran 17 Nov 2025 05:25PM UTC
Jobs 1
Files 7
Run time 99min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Nov 2025 05:24PM UTC coverage: 69.504% (+19.1%) from 50.397%
19438473659

push

github

web-flow
feat: implement client-integration token exchange (#7)

This diff implements token exchange for client integrations.

Here's the general design we are implementing:

1. organizations maintaining client integrations (e.g., Acme Inc embedding m-lab/ndt7-client-js to provide NDT to its users) register with the system and obtain 1+ API keys

2. Acme Inc provisions a backend `B` that stores its API keys

3. backend `B` receives a query for Acme Inc clients when they initiate running a NDT test

4. backend `B` queries m-lab/token-exchange to exchange one of its API keys with a short-lived JWT

5. backend `B` returns the JWT to the client

6. the client queries m-lab/locate including the JWT

7. m-lab/locate uses the JWT to route the client to the proper NDT server and/or to perform accounting and access control to prevent a single integration from overloading the platform

8. the JWT is included into the URLs to access m-lab/ndt-server where it is again used to perform access control

This diff specifically only implements the portion of this design pertaining to m-lab/token-exchange.

We take care of not storing the API key in Datastore. We use bcrypt instead to compare it to a known hash.

224 of 303 new or added lines in 7 files covered. (73.93%)

294 of 423 relevant lines covered (69.5%)

0.78 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
93.33
0.61% internal/auth/jwt.go
8
0.0
0.0% main.go
69
27.37
store/autojoin.go
Jobs
ID Job ID Ran Files Coverage
1 0 - 19438473659.1 17 Nov 2025 05:25PM UTC 7
69.5
GitHub Action Run
Source Files on build 19438473659
  • Tree
  • List 7
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 50d76978 on github
  • Prev Build on main (#16057430651)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc