1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! An async client for Kibana security operations and Fleet management.
//!
//! The layout follows the official Elasticsearch Rust client: a [`Transport`]
//! owns the connection, credentials and limits; [`Kibana`] groups the API into
//! namespaces; every endpoint is a builder that is configured and then `send`s.
//!
//! ```no_run
//! use security_client_rs::{Kibana, http::{Credentials, Transport, TransportBuilder, Url}};
//! use security_client_rs::security::{QueryRule, Severity};
//!
//! # async fn run() -> security_client_rs::Result<()> {
//! let transport = TransportBuilder::new(Url::parse("https://kibana.example:5601").unwrap())
//! .auth(Credentials::EncodedApiKey("base64-key".into()))
//! .build()?;
//! let client = Kibana::new(transport).space("soc")?;
//!
//! let page = client.security().find_rules().per_page(100).send().await?.json().await?;
//! println!("{} rules", page.total);
//!
//! let rule = QueryRule::new("Failed logins", "Repeated failures", "event.outcome: failure")
//! .severity(Severity::High);
//! let created = client.security().create_rule(&rule).send().await?.json().await?;
//! assert!(!created.enabled);
//! # Ok(())
//! # }
//! ```
//!
//! Space-scoped routes use the client's selected space ([`Kibana::space`]);
//! space administration, roles and status are always global. Requests are
//! never retried and redirects are never followed. Non-success statuses become
//! [`Error::Api`]. Routes without a named builder are available through
//! [`Kibana::request`].
//!
//! Module documentation covers the workflows: [`security`] for rule selectors
//! and imports, [`exceptions`] and [`cases`] for edits with concurrency tokens,
//! [`fleet`] for integration formats and asynchronous actions, and [`pagination`]
//! and [`poll`] for bounded traversal and waiting.
pub use ;
pub use ;
pub use Transport;
pub use Request;