Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Dedicated TARGET_FILTER permissions

Aperta
#2,993 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
api, authorization

Direzione di ricerca

Start with SpPermission.java and getAuthorities(), then inspect MgmtTargetFilterQueryRestApi or its resource implementation to trace the existing TARGET permission checks. Update docs/authorization.md to document the separate permissions. Done means target-filter CRUD uses the new permissions and the documentation reflects them.

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

Descrizione

Problem / limitation

Target Filter Query CRUD operations are currently gated behind the generic TARGET permissions (CREATE_TARGET, READ_TARGET, UPDATE_TARGET, DELETE_TARGET). This makes it impossible to grant a user the ability to register devices without also granting them the ability to create, modify, or delete target filters.

Example: A "factory" user whose sole responsibility is registering devices (targets) via POST /rest/v1/targets must be granted CREATE_TARGET — but this same permission also allows POST /rest/v1/targetfilters, which is an unrelated and potentially dangerous operation.

Expected Behavior

Target Filter Query operations should be protected by their own permission group, following the existing pattern:

  • CREATE_TARGET_FILTER
  • READ_TARGET_FILTER
  • UPDATE_TARGET_FILTER
  • DELETE_TARGET_FILTER

This is consistent with how other resource types are handled (e.g. CREATE_ROLLOUT, CREATE_DISTRIBUTION_SET, etc.).

Suggested Implementation

  1. Add constants to SpPermission.java:
    public static final String TARGET_FILTER        = "TARGET_FILTER";
    public static final String CREATE_TARGET_FILTER = CREATE_PREFIX + TARGET_FILTER;
    public static final String READ_TARGET_FILTER   = READ_PREFIX   + TARGET_FILTER;
    public static final String UPDATE_TARGET_FILTER = UPDATE_PREFIX + TARGET_FILTER;
    public static final String DELETE_TARGET_FILTER = DELETE_PREFIX + TARGET_FILTER;
    
  2. Include the new group in getAuthorities().
  3. Apply the new permissions in MgmtTargetFilterQueryRestApi (or its resource implementation),
    replacing the current TARGET permission checks.
  4. Update documentation (docs/authorization.md).

Current Behavior (from API docs)

Operation Required permission
GET /targetfilters READ_TARGET
POST /targetfilters CREATE_TARGET
PUT /targetfilters/{id} UPDATE_TARGET
DELETE /targetfilters/{id} DELETE_TARGET

Use Case

We are defining a production provisioning workflow for devices that lack a TPM or Secure Element, and therefore cannot use mTLS for authentication out of the box.

The approach we have settled on is to inject a per-device security token immediately after the initial firmware flash, while the device is still on the production line. This operation is performed by a restricted "factory" user whose sole responsibility is registering devices and setting their security token (this will be partially automated).

To follow the principle of least privilege, this user should only be granted CREATE_TARGET + READ_TARGET. However, those same permissions currently also allow managing target filters, which drive auto-assignment rollouts — a completely unrelated and potentially destructive capability.

Introducing a dedicated TARGET_FILTER permission group would allow operators to precisely scope
factory accounts without exposing rollout automation controls.

Lingua principale
Java
Stelle
601
Fork
228
Merge medio
15h 48m
PR unite (30g)
62

Preparare l'ambiente

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 eclipse-hawkbit/hawkbit

Tutte le issue di eclipse-hawkbit/hawkbit

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.