Upgrading to AttestoPhoenix 5.0

Copy Markdown View Source

AttestoPhoenix 5.0 follows FAPI-CIBA Draft 04's unsigned-request default. It requires attesto >= 2.33.0 and < 3.0.0. No database migration is required when upgrading from AttestoPhoenix 4.29.0.

CIBA request policy

Before 5.0, ciba: [enabled: true] required every backchannel authentication request to be a signed request JWT. In 5.0 it accepts the plain CIBA Core parameters by default, while still accepting an optional signed request when a shared atomic :replay_check is configured.

If your deployment profile requires signed requests, make that policy explicit:

ciba: [
  enabled: true,
  require_signed_request: true
],
replay_check: &AttestoPhoenix.Store.EctoReplayCheck.check_and_record/2

The algorithm policy and 60-minute signed-request lifetime bound are unchanged.

For every client that sends signed CIBA requests, ensure client_ciba_registration/1 returns the registered algorithm:

%{
  token_delivery_mode: :poll,
  request_signing_alg: "ES256"
}

A non-nil :request_signing_alg requires that client to sign every request with exactly that algorithm. When the field is absent or nil, signed requests are rejected. Audit custom AttestoPhoenix.ClientStore implementations before deploying 5.0; older code that returned only the delivery mode must add this field for signed clients.

To advertise ecosystem-specific login_hint_token types, add:

ciba: [
  enabled: true,
  login_hint_token_types_supported: ["urn:example:login-hint-token"]
]

Dynamic clients use the matching backchannel_endpoint_login_hint_token_types registration metadata member.