Authentication Service
This service issues JWTs using two entry points:
Wallet challenge flow
SAML flow with marketplace token cross-validation
Important runtime switch:
Auth controllers are enabled only when
features.providers.enabled=true.Repository default is
false(application.properties), so/auth/*endpoints are disabled unless enabled.
Wallet Flow
1) Challenge
GET /auth/message(default purpose:login)Response:
{
"purpose": "login",
"message": "Login request: <timestampMs>",
"timestamp": "<timestampMs>"
}2) Signature format
Client signs
messagewithpersonal_sign.API expects
signature = <65-byte-signature-hex><timestampHex13>.Timestamp validity window: 5 minutes.
Replay protection: same
wallet+timestampis rejected (AntiReplayService).
3) Authentication endpoints
POST /auth/wallet-authInput:
wallet,signatureOutput:
{ "token": "..." }
POST /auth/wallet-auth2Input:
wallet,signature, and eitherreservationKeyorlabIdOutput:
{ "token": "...", "labURL": "..." }
Booking checks use BlockchainBookingService and require a valid active reservation for the signer.
Check-in Message Mode
GET /auth/message also supports purpose=checkin:
Query params:
signer, and eitherreservationKeyorlabId(optionalpuc)Returns typed data payload for EIP-712 check-in signing (
typedData), plus resolvedreservationKey.
SAML Flow
Endpoints:
POST /auth/saml-authPOST /auth/saml-auth2
Request body:
Validation pipeline:
Validate marketplace JWT signature using key from
marketplace.public-key-url.Validate SAML assertion signature and required attributes using
SamlValidationService.Cross-check
useridandaffiliationbetween marketplace JWT and SAML attributes.If booking info is requested (
/auth/saml-auth2), enforce booking entitlement:bookingInfoAllowed=trueORrequired scope (
auth.saml.required-booking-scope, defaultbooking:read).
SAML trust defaults:
saml.idp.trust-mode=whitelist(default)saml.trusted.idp={...}map is used in whitelist modeMetadata URL resolution supports per-issuer/global overrides and assertion hints
HTTPS metadata required by default (
saml.metadata.allow-http=false)
Discovery and Keys
GET /.well-known/openid-configurationGET /auth/jwks
JWT signing keys:
PRIVATE_KEY_PATH(default/app/config/keys/private_key.pem)PUBLIC_KEY_PATH(default/app/config/keys/public_key.pem)
Error Semantics
400invalid input / missing fields401authentication/signature/scope failures503upstream metadata/service unavailable (SAML mapped failures)500unexpected internal errors
Last updated