LQL: support table/setof-returning functions for SECURITY DEFINER row reads
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Área
- backend-api-design, databases
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 68
- Forks
- 4
- Merge medio
- 50 min
- PR fusionados (30 d)
- 2
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Nimblesite/DataProvider
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
Nimblesite/DataProvider#137 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Nimblesite/DataProvider#72 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Nimblesite/DataProvider#121 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Nimblesite/DataProvider#108 ·
Los mantenedores suelen responder en 1 día
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Nimblesite/DataProvider#107 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Nimblesite/DataProvider
Issues similares
-
kronos:develop:queued priority:P0
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nopSolutions/nopCommerce#8512 ·
Los mantenedores suelen responder en 4 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
modelcontextprotocol/csharp-sdk#2061 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día