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

オープン
#17 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Java
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CenterForDigitalHumanities/tinyPaul のほかの issue

CenterForDigitalHumanities/tinyPaul の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。