Skip to content

feat(meta): advertise the team secret types the server accepts - #103

Merged
kipavy merged 1 commit into
mainfrom
feat/meta-team-secret-types
Oct 10, 2026
Merged

kipavy merged 1 commit into
mainfrom
feat/meta-team-secret-types

Conversation

@kipavy

@kipavy kipavy commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Part of VoltiusApp/voltius#608.

Problem

A desktop client newer than a self-hosted server cannot tell which team secret types that server stores. Saving a port-knock sequence to a server without migration 055 came back as a bare 400, and the client had nothing to check beforehand.

Change

  • GET /v1/meta now returns team_secret_types, the list of secret types PUT /v1/teams/{id}/secrets accepts.
  • The list comes from one table, SECRET_TYPES, in routes/team_objects.rs. secret_owner_type now reads that same table, so the advertised list cannot drift from what the handler accepts.
  • The field is additive. Existing clients, the admin dashboard and the web app ignore it.

A client treats a server that omits the field as one that predates it (VoltiusApp/voltius client PR to follow).

Deploy order

Deploy this before the client release that reads the field. A client that meets a server without the field still works: it tries the upload and reads a 400 on the knock type as "server too old".

Tests

  • New meta_advertises_the_team_secret_types_it_accepts.
  • canonical_secret_ids_match_the_client_key_names now also asserts the advertised list equals the canonical-id table.
  • cargo clippy --all-targets -- -D warnings: clean. cargo test: 693 pass locally, with no database configured, so the DB-backed tests skipped; CI runs them.

A client newer than the server had no way to know that a team secret
type was missing: uploading a port-knock sequence to a server without
migration 055 came back as a bare 400 (VoltiusApp/voltius#608).

/v1/meta now carries team_secret_types, built from the same table the
upload handler uses to resolve a type's owner, so the list cannot drift
from what is accepted. A client reads it before uploading and treats a
server that omits the field as one that predates it.
@kipavy
kipavy merged commit 597d80d into main Oct 10, 2026
1 check passed
@kipavy
kipavy deleted the feat/meta-team-secret-types branch October 10, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant