Skip to content

CMR-11630: As a CMR operator I want to add a token and user deny list to CMR access control. - #2539

Open
daniel-zamora wants to merge 1 commit into
masterfrom
CMR-11630
Open

daniel-zamora wants to merge 1 commit into
masterfrom
CMR-11630

Conversation

@daniel-zamora

@daniel-zamora daniel-zamora commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Overview

What is the objective?

CMR has no way to revoke a specific token or user. Removing ACLs still leaves registered access, and tokens revoked in EDL keep working while JWTs are verified locally. This adds a CMR deny list for tokens and users.

What are the changes?

  • Deny list stored in a Redis hash, with entries keyed by a token's SHA-256 hash or a user id.
  • Search, ingest and access-control return 401 for requests whose token or user is listed. Each instance reloads the list every 30 seconds (CMR_TOKEN_DENYLIST_REFRESH_SECONDS) and keeps its last copy if Redis is unavailable. The system token is never blocked.
  • A token's user is only looked up when the list has user entries; legacy tokens are matched by hash only. Access-control gets a token to user id cache for this.
  • Access-control /current-sids also rejects listed tokens.
  • New access-control endpoints GET /token-denylist and PUT/DELETE /token-denylist/{tokens|users}/:id, requiring system INGEST_MANAGEMENT_ACL. Documented in the access-control API docs.
  • Token hashes ignore a Bearer prefix and normalize JWT encoding, so each token has a single hash.
  • Ingest's "Successfully ingested" log line adds user, when already known without extra lookups, and token_hash.

What areas of the application does this impact?

  • transmit-lib
  • common-app-lib
  • search-app
  • ingest-app
  • access-control-app

Required Checklist

  • New and existing unit and int tests pass locally and remotely
  • clj-kondo has been run locally and all errors in changed files are corrected
  • I have commented my code, particularly in hard-to-understand areas
  • I have made changes to the documentation (if necessary)
  • My changes generate no new warnings

Additional Checklist

  • I have removed unnecessary/dead code and imports in files I have changed
  • I have cleaned up integration tests by doing one or more of the following:
    • migrated any are2 tests to are3 in files I have changed
    • de-duped, consolidated, removed dead int tests
    • transformed applicable int tests into unit tests
    • reduced number of system state resets by updating fixtures. Ex) (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each

@daniel-zamora daniel-zamora changed the title CMR-11630: add token and user deny list CMR-11630: As a CMR operator I want to add a token and user deny list to CMR access control. Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant