Audience-bound tokens; API key only to the build's own hosts

Open
#2,741 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start with the backend contract v1 issue, which this work depends on, and the referenced ADRs 0114 and 0119. The issue describes the credential rules but does not name implementation files or tests; first trace where the CLI selects credentials for each host and audience. Done means the API key is limited to the build's own hosts and other audiences receive scoped, short-lived, revocable tokens as specified.

Written by the indexing model from the issue text.

Description

backend feature security

Goal

The master API key stops being the credential for everything.

Scope

  • The API key is sent only to hosts on the build's own allow-list (ADR 0114 stands for those).
  • Every other audience (agents, jobs, user-added backends) gets an audience-bound token from the OpenID Connect (OIDC) provider (ADR 0119): one audience, scopes, a short lifetime, revocable.
  • A user-added backend never receives the API key.
  • Agent tokens: read-only scope, optionally one dataset, at most a few days, listed and revocable by the person.

ADR

"The API key goes to the build's own hosts; every other audience gets a token of its own."

Depends on

The backend contract v1 issue (the descriptor carries the audience).

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
4h 48m
Merged PRs (30d)
468

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nemarOrg/nemar-cli

All issues in nemarOrg/nemar-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.