LQL: support table/setof-returning functions for SECURITY DEFINER row reads
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
調査の方向性
Start with the functions: surface in schema.yaml and the LQL/DataProvider handling for scalar returns such as boolean and uuid. Determine whether table/setof returns and tuple projection exist; document the supported syntax and behavior, or record the missing capability in the roadmap, using the linked kill-app-admin plans as acceptance context.
索引モデルが issue の本文から書いたものです。
説明
Need
NAP's `[AUTHZ-ONE-ROLE]` migration (docs/plans/kill-app-admin.md) drops the direct `app_user` SELECT grant on a handful of operator-owned tables (`cost_card_llm`, `cost_card_machine`, `wallet.markup`, `bundles` in the HMAC-only path). Reads from those tables move behind `SECURITY DEFINER` functions that re-verify the caller's intent server-side (HMAC, GUC, etc.) and return the row(s).
The existing LQL `functions:` surface in `schema.yaml` supports scalar returns (`boolean`, `uuid`). Example:
```yaml
- name: is_member
arguments: [...]
returns: boolean
securityDefiner: true
bodyLql: |
exists(tenant_members |> filter(fn(m) => m.user_id = u and m.tenant_id = t))
executeRoles: [app_user, app_admin]
```
The pipeline syntax `
|> filter(...)` could naturally extend to row sets, but there is no example of a function returning a row (`returns: table(...)` / `returns: setofAsk
- Document whether table/setof returns are supported today (and how — `returns: setof cost_card_llm` style?).
- If not supported, add it to the roadmap. NAP can work around by emitting JSON-encoded rows from a SECDEF returning `text` / `jsonb`, but that's a hack — proper typed support would be far cleaner.
Workarounds NAP is considering (in order of preference)
- `returns: jsonb` + decode in Python (works today if jsonb is supported by LQL).
- `returns: setof <table_name>` (needs DataProvider support).
- Multiple scalar SECDEF fns (one per column) — slow + many round-trips.
- Keep `admin_session` for these reads — defeats the whole `[AUTHZ-ONE-ROLE]` invariant.
Filed during the 2026-05-19 NAP coverage / kill-app-admin push. Cross-link: NimblesiteAgenticPlatform/docs/plans/kill-app-admin.md, NimblesiteAgenticPlatform/docs/plans/kill-app-admin-edit-list.md.
- 主要言語
- C#
- スター
- 68
- フォーク
- 4
- 平均マージ
- 50分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Nimblesite/DataProvider のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
Nimblesite/DataProvider#137 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Nimblesite/DataProvider#72 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Nimblesite/DataProvider#121 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
Nimblesite/DataProvider#108 ·
メンテナーはふだん 1 日以内に返信
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleオープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
Nimblesite/DataProvider#107 ·
メンテナーはふだん 1 日以内に返信
Nimblesite/DataProvider の issue をすべて見る
似ている issue
-
kronos:develop:queued priority:P0
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nopSolutions/nopCommerce#8512 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
modelcontextprotocol/csharp-sdk#2061 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信