Skip to main content

Crate keystate_adapter_keycloak

Crate keystate_adapter_keycloak 

Source
Expand description

§keystate-adapter-keycloak

Keycloak database extraction adapter for Keystate — the concrete keystate_core::port::Extractor implementation that reads a Keycloak realm’s configuration state directly out of its PostgreSQL database and maps it into the canonical model defined by keystate_core.

This crate is deliberately one backend, one job: it knows Keycloak’s schema and nothing else. The canonical model, verification engine, and output ports all live in keystate-core; this crate only implements the keystate_core::port::Extractor and keystate_core::port::CompletenessVerifier ports against Keycloak’s database.

§Module map

  • db — everything that speaks PostgreSQL: the read-only connection, schema-version detection, and the database-layer error type.
  • extract — per-entity extraction: one module per canonical entity, returning native JSON faithful to Keycloak’s own field shape.
  • manifest — per-version field manifests describing what a given Keycloak version must expose.
  • export — rendering the canonical extraction into Keycloak’s importable realm-export format for the config-cli round-trip validation.

See ARCHITECTURE.md in this repository for the full design, and the companion keystate-core crate for the ports and canonical model.

Re-exports§

pub use db::KeycloakConnection;
pub use db::SUPPORTED_KEYCLOAK_VERSION;
pub use db::detect_keycloak_version;
pub use export::realm_export;
pub use extract::KeycloakExtractor;
pub use extract::merge_attributes;
pub use extract::realm_from_native;
pub use manifest::keycloak_manifest;
pub use db::Error;
pub use db::Result;

Modules§

db
Database access for the Keycloak adapter.
export
Keycloak realm-export rendering.
extract
Per-entity extraction for Keycloak.
manifest
Field manifests: what a given Keycloak version must expose.