Skip to main content

Crate omnigraph_server

Crate omnigraph_server 

Source

Re-exports§

pub use graph_id::GraphId;
pub use identity::AuthSource;
pub use identity::GraphKey;
pub use identity::ResolvedActor;
pub use identity::Scope;
pub use identity::TenantId;
pub use registry::GraphHandle;
pub use registry::GraphRegistry;
pub use registry::InsertError;
pub use registry::RegistryLookup;
pub use registry::RegistrySnapshot;
pub use auth::AWS_SECRET_ENV;
pub use auth::EnvOrFileTokenSource;
pub use auth::TokenSource;
pub use auth::resolve_token_source;
pub use config::AliasCommand;
pub use config::AliasConfig;
pub use config::CliDefaults;
pub use config::DEFAULT_CONFIG_FILE;
pub use config::OmnigraphConfig;
pub use config::PolicySettings;
pub use config::ProjectConfig;
pub use config::QueryDefaults;
pub use config::ReadOutputFormat;
pub use config::ServerDefaults;
pub use config::TableCellLayout;
pub use config::TargetConfig;
pub use config::graph_resource_id_for_selection;
pub use config::load_config;

Modules§

api
auth
Bearer token sources.
config
graph_id
GraphId — registry-level identity for a graph in multi-graph mode (MR-668).
identity
Identity types for the multi-graph server (MR-668) + forward-compatible shapes for Cloud mode (RFC 0003) and OAuth provider (RFC 0004).
policy
queries
Stored-query registry.
registry
GraphRegistry — the multi-graph routing substrate (MR-668).
workload
Per-actor admission control for the HTTP server (MR-686 §VII.A).

Structs§

ApiDoc
ApiError
AppState
GraphStartupConfig
One graph’s startup-time configuration: id, opened URI, optional per-graph policy file path. Constructed by load_server_settings in multi mode; consumed by serve’s parallel open loop.
PolicyCompiler
PolicyConfig
PolicyDecision
PolicyEngine
PolicyRequest
What a caller wants to do, sans identity. Actor identity flows through a separate actor_id: &str parameter on PolicyEngine::authorize / PolicyChecker::check — encoding the architectural invariant that actor identity is server-authoritative and must not be supplied by the same code path that supplies the requested action. In the HTTP layer, the bearer-token middleware resolves the actor and passes it independently; clients cannot smuggle identity inside this struct.
PolicyTestConfig
ServerConfig

Enums§

GraphRouting
Runtime routing for the server. Single mode = legacy omnigraph-server <URI> invocation, one graph, flat HTTP routes. Multi mode = --config omnigraph.yaml with a non-empty graphs: map, N graphs, cluster routes (/graphs/{graph_id}/...). Mode is determined at startup by load_server_settings.
PolicyAction
PolicyExpectation
PolicyResourceKind
Which Cedar entity an action’s policies apply to. Internal to omnigraph-policy — drives the compile_policy_source template and the request-time resource UID construction.
ServerConfigMode
What load_server_settings produces after applying the four-rule mode inference matrix (MR-668 decision 2).
ServerRuntimeState
MR-723 server runtime state, classified from the three-state matrix of (bearer tokens configured) × (policy file configured) at startup.

Functions§

build_app
classify_server_runtime_state
Compute the ServerRuntimeState from the configured inputs. Pulled out as a pure function so the matrix is unit-testable without standing up the full server.
init_tracing
load_server_settings
serve
server_config_is_multi
Whether the loaded config will run the server in multi-graph mode. Useful for the test that constructs ServerConfig directly.