metabase: user attributes with \$Object: keys are indexed as system properties for SEARCH

Aperta
#4,339 0 commenti 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
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Start with pkg/local_object_storage/metabase/metadata.go, especially the system-property writes around lines 76, 84 and 101 and the user-attribute loop around lines 134–157. Trace the SEARCH query path to confirm it reads from this index, then check getObjAttribute in counter.go for FilterPayloadSize. Done means forged $Object: user attributes cannot match reserved system properties; assess whether existing indexes need migration or reindexing.

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

Descrizione

Problem

Metabase indexing skips only one reserved key, $Object:expirationTime, when it indexes user attributes. Any other user attribute with a $Object: key, such as $Object:payloadLength, $Object:objectType or $Object:version, is indexed under the same key as the real system property. A SEARCH filter on that property can then match an object through the forged attribute.

  • The real properties are written at metadata.go#L76, #L84 and #L101.
  • User attributes are written under their own key at #L134-L157. The only reserved key that loop skips is FilterExpirationTime.

This is the SEARCH side of #4300. PR #4338 fixes only the eACL header builders in pkg/services/object/acl/eacl/v2. The fix here is different: the metabase has to skip $Object: attributes, and objects that are already indexed probably need a migration or reindex.

Not verified

I read the code but did not run a reproduction. An earlier worker test on #4300 reported that SEARCH matches forged payloadLength, objectType and version attributes. Two things still need checking: whether the SEARCH query path reads these keys from the same index, and whether getObjAttribute(..., FilterPayloadSize) in counter.go can return the forged value.

Lingua principale
Go
Stelle
37
Fork
56
Merge medio
1g 21h
PR unite (30g)
46

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 nspcc-dev/neofs-node

Tutte le issue di nspcc-dev/neofs-node

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.