Lane-sequence repair gives no route for sequences owned by an application role

Abierto
#682 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
postgresql, rust

Línea de trabajo

The issue names awa.lane_sequence_problems, awa.repair_lane_sequence, awa migrate, awa storage lane-sequences --repair, and the security guide’s lane-ownership section. Start by reading the 0.6.14 definer_lane_provisioning patch and the guide section, then inspect the reported repair roles and permissions. Done means repairable roles or role combinations are reported, superuser-only cases are explicit, and the manual fix is documented.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

When a lane sequence belongs to an application login role that the migration role isn't a member of (for example a lane created on 0.6.13 by a runtime role with schema CREATE), the repair tooling can't fix it, and doesn't say who can.

  • awa.lane_sequence_problems(schema) returns repair_roles = {} for such a sequence, even though its reassign_sql (ALTER SEQUENCE … OWNER TO awa_owner) works for a superuser, or for a role that is a member of both the current owner and the schema owner.
  • awa.repair_lane_sequence has EXECUTE revoked from PUBLIC, so the owning app role can't run the repair itself either.
  • awa migrate and awa storage lane-sequences --repair report these sequences as left over, which is correct, but the operator is left without a next step.

Reproduced on a database brought to 0.6.13's state with awa migrate, a lane created by an app login through awa storage prepare-queue, and then the 0.6.14 definer_lane_provisioning patch plus repair run as a migration login that is a member of the schema owner. The 16 app-owned sequences stayed unrepaired with empty repair_roles, and another runtime role got permission denied for sequence on them.

Proposal

  • Report the roles or role combinations that can repair a sequence: the owner itself, a role holding both the owner's and the schema owner's privileges, or a superuser. Say explicitly when only a superuser can.
  • Document the manual fix in the security guide's lane-ownership section.
Lenguaje dominante
Rust
Estrellas
37
Forks
8
Merge medio
14 h 16 min
PR fusionados (30 d)
244

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hardbyte/awa

Todos los issues de hardbyte/awa

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.