Repository navigation
CMR-11629: As a CMR operator I want the CMR to validate EDL JWTs with EDL when local verification is off - #2538
Merged
Merged
Conversation
jceaser
approved these changes
Nov 16, 2026
jceaser
left a comment
Contributor
There was a problem hiding this comment.
consider adding a commend and using a random text generator.
| [cmr.transmit.tokens :as tokens])) | ||
|
|
||
| (deftest loggable-params-test | ||
| (let [system-token "system-token-0123456789-abcdefghij" |
Contributor
There was a problem hiding this comment.
don't we have a random text generator for using in tests instead of having a hard coded token?
Contributor
Author
There was a problem hiding this comment.
it probably wouldn't hurt but this is more deterministic.
…y switch and anchor JWT detection
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2538 +/- ##
==========================================
+ Coverage 54.46% 54.51% +0.05%
==========================================
Files 1047 1047
Lines 73552 73638 +86
Branches 2413 2418 +5
==========================================
+ Hits 40057 40147 +90
+ Misses 31220 31205 -15
- Partials 2275 2286 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eereiter
approved these changes
Nov 17, 2026
isja17
pushed a commit
that referenced
this pull request
Nov 17, 2026
… EDL when local verification is off (#2538) * CMR-11629: validate EDL JWTs with EDL when local verification is off * CMR-11629: validate EDL JWTs with token introspection * CMR-11629: read the user from EDL introspection username * CMR-11629: always validate JWTs with EDL on writes * CMR-11629: report EDL credential failures as server errors and skip the system token * CMR-11629: check search and provider writes with EDL, add an emergency switch and anchor JWT detection * CMR-11629: note the test token is a sample
isja17
pushed a commit
that referenced
this pull request
Nov 17, 2026
… EDL when local verification is off (#2538) * CMR-11629: validate EDL JWTs with EDL when local verification is off * CMR-11629: validate EDL JWTs with token introspection * CMR-11629: read the user from EDL introspection username * CMR-11629: always validate JWTs with EDL on writes * CMR-11629: report EDL credential failures as server errors and skip the system token * CMR-11629: check search and provider writes with EDL, add an emergency switch and anchor JWT detection * CMR-11629: note the test token is a sample
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.
Overview
What is the objective?
With
CMR_LOCAL_EDL_VERIFICATIONfalse, CMR sent EDL JWTs to the retired ECHO REST token endpoint, so every JWT was rejected. With it true, CMR only checks a JWT's signature and expiry, so a token revoked in EDL keeps working until it expires. This validates JWTs with EDL when local verification is off, and on all writes.What are the changes?
tokens/get-user-idvalidates JWTs with EDL token introspection (POST /oauth/introspect, Basic auth with CMR's EDL app credentials) instead of the legacy call.CMR_LOCAL_EDL_VERIFICATIONis set to: ingest (concepts, generic documents, bulk updates, subscriptions, providers), access-control (groups, ACLs) and search (tags, associations, humanizers, community usage metrics). Admin maintenance routes are not covered. With local verification on, the local signature and expiry check still runs first.CMR_LOCAL_EDL_VERIFICATIONnow only decides reads. With it true, reads are unchanged; writes with a JWT need EDL to be reachable.CMR_EDL_VALIDATE_WRITE_TOKENS, default true. False turns the write check off, so writes verify JWTs the same way as reads.uid,usernameorsub, and the token must beactive.CMR_EDL_TOKEN_CACHE_SECONDS(default 300), or until the token expires if sooner. Rejections are cached the same way as for Launchpad tokens.is-jwt-token?trims the token and matches all of it instead of searching within it.What areas of the application does this impact?
Required Checklist
Additional Checklist