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

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

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.

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

説明

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.

主要言語
Go
スター
37
フォーク
56
平均マージ
1日 21時間
マージ済み PR(30日)
46

環境構築

はじめの一歩

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

nspcc-dev/neofs-node のほかの issue

nspcc-dev/neofs-node の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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