Associate API tokens with users for importer authorization
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- api, authentication, authorization
Direzione di ricerca
Start in Bulkrax::ImportersController and find the temporary API branches that call Importer.all or Importer.find without CanCan checks, plus the token-to-user TODOs. Then look at the Ability configuration to see how session requests are scoped. Done means a valid token resolves to a user whose CanCan rules govern index, DataTables and member actions, invalid tokens get 401 or 403, and request specs cover owner, non-owner, service-account and invalid-token cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature
Associate authenticated Bulkrax API tokens with a user and apply the existing CanCan importer authorization rules to API requests.
The importer ownership work currently preserves compatibility by bypassing per-user scoping for token-authenticated requests: a valid token can list all importers and access importer members without evaluating ownership. This is temporary until the token-to-user relationship is available.
Desired behavior
- Authenticate a Bulkrax API token and resolve it to a user exposed as
current_userfor the request. - Apply the same CanCan rules used for session-authenticated importer requests to API collection and member actions.
- Return an appropriate authentication/authorization response (401 or 403) when a token is invalid or cannot be resolved to an authorized user.
- Support intentionally broad integration access through an explicit service-account Ability rule (for example,
can :manage, Bulkrax::Importer) rather than an API-wide authorization bypass.
Implementation notes
- Remove the temporary API branches in
Bulkrax::ImportersControllerthat useImporter.allorImporter.findwithout CanCan authorization once the authenticated user context is available. - Ensure API list, DataTables, and member actions all use the same scoped authorization path.
- Preserve existing non-API behavior.
- Coordinate with #1054, which investigates whether the Bulkrax JSON API is usable and documented; this issue addresses the authorization model required for secure user-scoped API access.
Acceptance criteria
- A valid API token resolves to the intended user for the request.
- API index and DataTables responses include only importers readable by that user.
- API member actions deny access to importers the user cannot read/manage.
- Invalid or unresolved tokens do not receive an unscoped importer response.
- A service account can be deliberately granted broad importer access through Ability configuration.
- Request/controller specs cover owner, non-owner, admin/service-account, and invalid/unresolved-token cases.
- The temporary token-to-user TODOs in
Bulkrax::ImportersControllerare removed or updated as part of the implementation.
- Lingua principale
- Ruby
- Stelle
- 14
- Fork
- 27
- Merge medio
- 3g 4h
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di samvera/bulkrax
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
Updating a file set's remote file crashes on Valkyrie and never replaces the fileForse già presa @kirkkwang l’ha presa 1 giorno fa. Apertabug
samvera/bulkrax#1264 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Blank `id` column makes a new-record import fail with ObjectNotFoundErrorForse già presa @laritakr l’ha presa 2 giorni fa. Aperta
samvera/bulkrax#1263 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[Guided import]: Unresolvable `children` reference passes validation and leaves a permanently Pending entryForse già presa @laritakr l’ha presa 1 giorno fa. Apertabug guided-import
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
samvera/bulkrax#1262 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di samvera/bulkrax
Issue simili
-
bug needs-triaging
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SeleniumHQ/seleniumhq.github.io#2952 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
hashicorp/homebrew-tap#433 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 8 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
TheOdinProject/curriculum#31509 ·
I maintainer di solito rispondono entro 1 giorno