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

Abierto
#17 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CenterForDigitalHumanities/tinyPaul

Todos los issues de CenterForDigitalHumanities/tinyPaul

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.