Hardcoded personal Auth0 tenant in `src/io/rerum/crud/Constant.java` (userinfo endpoint, JWKS provider, expected issuer)

Aperta
#17 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Start with src/io/rerum/crud/Constant.java, especially userInfo() and verifyToken(), to see how the userinfo endpoint, JWKS provider, and issuer are currently set. Choose a configuration mechanism that supplies all three from one tenant value while preserving token validation behavior. Check that git grep -n "cubap\.auth0\.com" finds no occurrences and that the Java file compiles; verify cross-tenant tokens remain rejected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

This was generated by AI during triage.

Everything below points at cubap.auth0.com, a personal Auth0 tenant, not a TPEN-owned one. TPEN 3.0 is restarting (NEH funding reinstated; formal work resumes January 2027, grant completion 31 August 2028), and before that restart the identity provider has to be TPEN-owned regardless of which mechanism injects the values. This is the Java back end, so three occurrences matter for token validation, not just for the login link:

The tenant decision itself is tracked upstream in CenterForDigitalHumanities/rerum_server_nodejs#164 “code constants to .env instead of hardcoding” (open) and CenterForDigitalHumanities/TPEN3#79 “Hardcoded personal Auth0 tenant (cubap.auth0.com + client ID) in shipped public client code” (open). This ticket deliberately does not restate that work — it records this repo's occurrences and asks only that they stop being baked into source.

Verified 2026-11-20 against the current default branch, not from a search index: gh api /repos/CenterForDigitalHumanities/tinyPaul/contents/<path>?ref=main (main @ 38dbd255493d80835d27cae2c98fee5c6be4b0c5), line numbers are the ones in the decoded content.

Live — three occurrences in one file, src/io/rerum/crud/Constant.java:

 56: String url = "https://cubap.auth0.com/userinfo"; //?access_token=token         // userInfo()
143: JwkProvider provider = new UrlJwkProvider("https://cubap.auth0.com/");            // verifyToken()
150: JWTVerifier verifier = JWT.require(algorithm).withIssuer("https://cubap.auth0.com/").build();

verifyToken() is called from the role check on :134 (return Boolean.TRUE.equals(hasRole) && verifyToken(token);), so the tenant is load-bearing on the authorization path.

tinyPaul and TinyMatt carry the identical file — src/io/rerum/crud/Constant.java is duplicated between the two repos; TinyMatt's copies sit at :59, :155, :162. The sibling ticket is CenterForDigitalHumanities/TinyMatt#20 — please fix both with one shared pattern so the copy doesn't drift again.

Desired end state: the tenant URL is read from configuration rather than being a literal. Being Java, the mechanism is a deliberate choice and is not prescribed here (properties file, environment variable, or system property all work); the requirement is that the issuer, the JWKS host and the userinfo endpoint come from one value.

Verification: git grep -n "cubap\.auth0\.com" on main returns no hits, and the file still compiles under the toolchain already in use (no root pom.xml/build.xml is committed here; adding one is out of scope); cross-tenant tokens are still rejected.

Do-not-change boundary: config mechanism only. No auth-behaviour edits — leave redirect/URL logic (returnTo, callback handling, state encoding), the requested scopes, what a client ID means, and all token-validation semantics exactly as they are. If a fix appears to require changing behaviour, stop and report instead.

No credential is exposed here, and nothing needs rotation. The tenant domain, the /api/v2/ audience and the client IDs are public-by-design Auth0 identifiers — a browser SPA has to ship them to work. The RERUM maintainers have confirmed no Auth0 client secret is committed in the tree. This is a tenancy/config-hygiene issue, not a leak.

Org-wide scope, so nobody re-runs the search: an org-wide gh search code "cubap.auth0.com" --owner CenterForDigitalHumanities hits roughly 22 files across 12 repos. Carriers already open: TPEN3#79, TPEN-services#538, rerum_server_nodejs#164, TPEN-Users#32. Seven sibling tickets (this batch) cover the non-TPEN repos: Glossing-Users, glossing-entries, Glossing-Matthew, DLA, TinyMatt, tinyPaul, LesTrouves.

Labels: filed without labels — bug/enhancement exist here but ready-for-agent does not. Recommend enhancement + ready-for-agent once the taxonomy exists.

Lingua principale
Java
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CenterForDigitalHumanities/tinyPaul

Tutte le issue di CenterForDigitalHumanities/tinyPaul

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.