fix(certs): default to active certs when no search term #2
Reference in New Issue
Block a user
Delete Branch "fix/certs-list-default"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GET /api/v1/certswith no?searchsent an empty criteria list to EJBCA'scertificate/search, which rejects it (Invalid criteria value, cannot be empty) → ops-api returned 500. Default to aSTATUS=CERT_ACTIVEcriterion when no search term is given, so the list endpoint returns active certificates. Search-by-query is unchanged.Verified on the live service (binary
1.1.1):GET /certs→ 200 (50 active certs);GET /certs?search=ops-api-ra→ 200 (1).Part of enabling
/certs: the EJBCA REST Certificate Management protocol was enabled on fihelvca01 and a scopedops-api-raadmin cert/role provisioned (cert at/etc/gsc-ops-api/tls/ejbca-client.*).🤖 Generated with Claude Code
EJBCA's certificate/search REST endpoint rejects an empty criteria list ("Invalid criteria value, cannot be empty"), so GET /certs with no ?search returned a 500. Default to a STATUS=CERT_ACTIVE criterion in that case so the list endpoint returns active certificates. Search-by-query is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>