Skip to content

feat: implement HKP op=index in LookupEndpoint #137

Description

@bmarwell

Motivation

GET /pks/lookup?op=index currently returns 501. GnuPG's gpg --search-keys uses op=index to list matching keys. Without it the server is not HKP-compliant for key search.

Machine-readable format (options=mr)

info:1:<N>
pub:<fingerprint>:<algo>:<keylen>:<ctime>:<exptime>:<flags>
uid:<escaped-uid>:<ctime>:<exptime>:<flags>

Flags: r = revoked, d = disabled, e = expired.

What to implement

  1. Add a UidRepository port (or extend KeyRepository) with a method returning key + UID metadata for a search term.
  2. Add a UidEntity JPA query that joins keys and uids tables.
  3. In LookupEndpoint, route op=index to a new handleIndex() method.
    • Without options=mr: return an HTML page (simple for now — not required for GnuPG interop).
    • With options=mr: return the text format above with Content-Type: text/plain.

Non-goals

op=vindex (verbose index) can come later; start with op=index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions