bregctl test: the schema-test runtime cannot run a project with encrypted fields

Abierto
#2,647 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
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, rust

Línea de trabajo

Read crates/registry-breg/src/fixtures.rs and compare SchemaTestRuntime::new with startup setup in crates/registry-breg/src/startup.rs; trace how mutations report FieldEncryptionUnavailable in crates/registry-breg/src/mutation.rs. Start by locating the schema-test runtime's encryption setup and related fixture journey tests. Done means a journey can create, read, and list a Record with an encrypted field, while the ephemeral key is neither written to disk nor printed.

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

Descripción

Problem

bregctl test (and rstack dev start, which runs the project's journeys through the same schema-test runtime) fails for any project whose Record types use field encryption. A journey that writes an encrypted field gets 503 with runtime.field_encryption.unavailable.

Cause

SchemaTestRuntime::new in crates/registry-breg/src/fixtures.rs builds the record, revision, snapshot and mutation services without with_field_encryption, unlike startup (crates/registry-breg/src/startup.rs). A mutation on an encrypted type then fails with MutationError::FieldEncryptionUnavailable (crates/registry-breg/src/mutation.rs), which the API maps to the fixed RuntimeFieldEncryptionUnavailable problem.

Consequence

An author cannot test a project with encrypted fields offline, and rstack dev cannot run its journeys either. The only workaround is to remove the encryption from the project under test, which tests a different project.

Suggested fix

Give the schema-test runtime field encryption with an ephemeral, in-memory key generated per test run. Its database is disposable, so the key needs no custody beyond the process. Keep the key out of reports and logs.

Done when

  • A fixture journey that creates, reads and lists a Record with an encrypted field passes under bregctl test.
  • The test runtime never writes the key to disk or prints it.
  • No static warning is added to rstack dev check for this; the limitation disappears with the fix.
Lenguaje dominante
Rust
Estrellas
2
Forks
0
Merge medio
9 h 48 min
PR fusionados (30 d)
151

Preparar el entorno

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 registrystack/registry-stack

Todos los issues de registrystack/registry-stack

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.