feat(audit): allow extending a key's expires_at

Open
#947 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
fastapi, python

Research direction

Start by reading model/audit.py and the PATCH handler that currently allows name, scopes, and rate_limit, then inspect the /audit/keys page. The issue leaves shortening and un-setting expires_at undecided, so those rules need to be settled before the change is complete. Done means PATCH supports future ISO timestamps and the page exposes expires_at.

Written by the indexing model from the issue text.

Description

enhancement

expires_at is immutable after mint (model/audit.py mutable=False; PATCH allows only name/scopes/rate_limit), so "extend a student's key for another term" is impossible — the only moves are rotate (new secret, same id) or revoke + re-mint + redistribute. At term boundaries that churn is avoidable: let PATCH accept expires_at (future ISO timestamps only; shortening and un-setting both need a ruling) and expose it on the /audit/keys page. Small follow-up from the 2026-10-21 gap review (bullet 1).

Dominant language
Python
Stars
0
Forks
2
Avg merge
39m
Merged PRs (30d)
235

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 nyjc-computing/campus

All issues in nyjc-computing/campus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.