cadrumo.application.live.session module

Live AEAT session acquisition helpers.

This module is the shared read-only entry gate for application-live services. It loads Settings, enforces cadrumo.core.access_gate.gate.AeatAccessGate.require_live_read(), and only then returns an authenticated AeatSession. It never calls require_live_write and never performs AEAT-side mutations.

See also

AeatAccessGate

Core gate that authorizes pytest live reads and refuses all live writes.

ensure_authenticated_aeat_session()

Auth service called only after the read gate passes.

cadrumo.application.live

Public read-only live facade that routes remote acquisition helpers through this session boundary.

async active_verified_session(*, certificate_secret_backend_factory, browser_session_factory, operation='live-filed-read', target_url=None, operator_scope_ports, guarded_read_context=None)[source]

Return an authenticated session and Settings after the live-read gate.

The operation and optional target_url are forwarded to the authentication service for diagnostics and provider routing after AeatAccessGate has authorized a read-only live operation. guarded_read_context names a guarded caller, such as a test run, whose read the gate refuses unless the live-test opt-in is enabled.

Return type:

tuple[AeatSession, Settings]

Parameters: