Skip to content

Decide whether CI keeps patching upstream's API key test (GET returns a masked key since #161) #162

Backlog

Description

@VibeSWE

Since #161 the server keeps only a hash of each API key, so GET /api/prism/v1/apikeys/{id} returns the key masked (**** plus the last four characters). Upstream Parseable returns the key itself from that endpoint, and its integration suite (Quest) asserts it.

To keep CI meaningful, #161 patches that one assertion in the pinned Quest source before the test image is built (scripts/ci/quest-api-key-hash.patch, applied in .github/workflows/integration-test.yaml). The patched test expects the mask.

This was done to get #161 merged and needs a decision on whether it stays.

Options

  1. Keep it (current state). This fork deliberately differs from upstream on this endpoint. Costs: the patch must be carried when the Quest pin moves (the step fails if the source stops matching, so it cannot rot silently), a local Quest run built straight from upstream fails TestSmokeAPIKeyLifecycle/GetAPIKey, and any client written against upstream that reads a key back from this endpoint gets the mask.
  2. Restore upstream's behaviour. Store keys encrypted at rest instead of hashed, so the key can be returned. That keeps compatibility and drops the patch, but anyone who obtains the encryption key and the metadata gets every API key, which is what hashing prevents. It would also need a second migration of stored records.
  3. Propose the change upstream. Offer hashed keys (and the adjusted Quest test) to parseablehq/parseable and parseablehq/quest. If accepted, the patch goes away when the pin moves.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions