Skip to content

feat(keepiq): build connection-certificate-expiry-for-integriq - #1899

Open
rubenvdlinde wants to merge 1 commit into
developmentfrom
quality/build-connection-certificate-expiry-for-integriq
Open

rubenvdlinde wants to merge 1 commit into
developmentfrom
quality/build-connection-certificate-expiry-for-integriq

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Builds keepiq's share of connection-certificate-expiry-for-integriq.

Tasks done

  • 1.1 Expiry at mint: an application write (SecretService::createByApplication / updateByApplication) may carry notAfter (ISO 8601). It is stored as the secret's expires_at in UTC without touching the ciphertext, so the existing expiry scan reminds its owners. A sent null clears it, an unparsable value is refused, and a write without it leaves the expiry alone. New BrokerMintRecorder, an optional last constructor argument, so existing callers are unchanged.
  • 2.1 Answering integriq: new CredentialExpiryRequestedEvent (credentialId, actingOrganisationId; collects notAfter and renewUrl) and CredentialExpiryRequestedListener, registered in Application. It answers only when the secret is application-owned, the broker minted it for the consumer integriq and for the acting organisation, it is not trashed or tombstoned, and it has an expiry. Every other request, including personal entries, another organisation's credential, another consumer, an unknown secret or one without an expiry, stays unanswered. The answer has exactly the two fields and is stored nowhere.
  • Who a secret was minted for (organisation and consumer) is kept in the new table keepiq_broker_mints (migration Version001022Date20261117160000, also in the consolidated schema and the backup registry). It holds no name and no material. The app version is bumped so the migration runs.

Tasks left

  • 3.1 (composer check:strict, npm run lint, npm run test:l10n): not run as a whole. phpcs and phpstan pass on every touched lib/ file, and no frontend or l10n file changed.
  • Not in this repository: OpenRegister's broker (DoriathCredentialStore::put) must send notAfter, organisation and consumer with the mint, and integriq must dispatch the event. Until then nothing is recorded and integriq shows "expiry unknown", as the design intends.

Tests added

  • tests/Unit/Service/BrokerMintRecorderTest.php (6): UTC expiry with the ciphertext unchanged, absent and null notAfter, refusal of a non-date, the mint record replaced, nothing recorded when neither field is sent, and the create path through SecretService.
  • tests/Unit/Listener/CredentialExpiryRequestedListenerTest.php (6): integriq's own certificate is answered with 2026-11-30T00:00:00+00:00 and the secret's link; personal, foreign-organisation and other-consumer credentials get no answer; unknown, trashed, no-expiry and empty-organisation requests get no answer; other events are ignored.

Suite: after, 5631 tests with 0 failures (241 skipped); the baseline on development was not run separately, and the only failure seen on the branch was the registry test below, now fixed. ArchiveTest::testRegistryMatchesTheConsolidatedSchema failed until the table was added to the backup registry.


Generated by Claude Code

A broker mint may carry the certificate's notAfter, stored as expires_at
without touching the ciphertext, and the organisation and consumer it was
minted for, kept in the new keepiq_broker_mints table. The new
CredentialExpiryRequestedEvent is answered with notAfter and a link to the
secret only for an application-owned credential minted for integriq and for
the organisation integriq acts for; every other request gets no answer.

Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
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