Skip to content

Require eeID authentication for pending delete and registrant change confirmations - #2978

Open
OlegPhenomenon wants to merge 5 commits into
masterfrom
feature/2975-eeid-registrant-confirmation
Open

OlegPhenomenon wants to merge 5 commits into
masterfrom
feature/2975-eeid-registrant-confirmation

Conversation

@OlegPhenomenon

@OlegPhenomenon OlegPhenomenon commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2975

Companion PR: internetee/registrant_center#189 (eeID login on the confirmation page). Both must be deployed together.

What changes

eeID requirement (time-gated)

  • Feature.registrant_confirmation_eeid_required? — active from ENV registrant_confirmation_eeid_required_from; blank → 2027-01-18T00:00:00+02:00, unparsable → active (fail closed).
  • Api::V1::Registrant::ConfirmsController (GET/POST /api/v1/registrant/confirms/...): when active, requires a registrant bearer token issued after eeID login in registrant_center and carrying authenticated_at. Checked before domain/token lookup; no side effects on failure (401 {"errors":[{"base":["Not authorized"]}]}).
  • POST /api/v1/registrant/auth/eid accepts optional authenticated_at (eeID auth_time), stored in the bearer token.
  • Confirmation link is actionable only within the existing 48h window (registrant_*_confirmable?), independent of the daily cron.
  • Confirm jobs carry the pending operation id and are a no-op if the operation was meanwhile expired, cancelled or replaced. Admin approve/reject rights unchanged.
  • Rejected delete clears the verification token so the old link can't become actionable again.

Audit trail — new append-only table pending_operation_events (per pending operation, linked by pending_operation_id = UUIDv5 of the verification token):
started (registrar), email_sent (actual recipient, via mail observer), authenticated (eeID identity + auth time), terminal approved / denied / cancelled / expired with actor (registrant identity / admin id / registrar id / system). One terminal event per operation enforced by a unique index.

Docs: doc/registrant-api/v1/confirms.md (incl. test scenarios for the .ee test environment), CHANGELOG.

Deploy

  • Run migrations.
  • .ee test environment: registrant_confirmation_eeid_required_from: '2026-12-01T00:00:00+02:00'. Production: leave blank (default 18.01.2027) or set the exact time from the release plan.
  • Deploy together with the registrant_center PR.

Identity matching (resolved)

No matching of the eeID identity against the registrant (the registrant may be an organisation and the approver its representative). Decided by the product owner: registry only has to record who exactly approved or denied; whether that person was authorised is between the approver and the registrant. The authenticated, approved and denied audit events store the eeID identity (registrant_ident, name, registrant user id) and the eeID authentication time.

Known limits

…confirmations

Confirmation endpoints require a registrant bearer token carrying the eeID
authentication time once registrant_confirmation_eeid_required_from is reached
(default 2027-01-18T00:00:00+02:00). Confirmation links are only actionable
within the existing 48h window; queued decisions are revalidated against the
current pending operation.

Adds pending_operation_events audit trail: start, confirmation email sent with
recipient, eeID authentication, and the final outcome with its actor.

Refs #2975
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

2 similar comments
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

The ruby:3.0.3-slim base ships ca-certificates 20210119 without Sectigo
Public Server Authentication Root E46, so TLS to Äriregister fails
(certificate verify failed) and the registrant domain list returns 500.
@OlegPhenomenon

Copy link
Copy Markdown
Contributor Author

Added 5e95106 (same change as #2979) so the staging slot can be tested: without it the registrant domain list returns 500 on AWS staging (Äriregister TLS, missing Sectigo Root E46 in the image). Once #2979 is merged this commit becomes a no-op in the diff.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

1 similar comment
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Complete!

Property Value
App registry
Slot 1
URL https://registry1-dev.cloud.tld.ee
Namespace registry1-dev

(Environment ready for testing)

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.

Add eeID identity verification step to pendind registrant change and delete processes

2 participants