Expand description
kasl-server client: the team server this agent reports to.
Unlike the other clients here, this one has no session to manage. The server authenticates an agent by a long-lived bearer token that an administrator issues once (ADR 0004 in kasl-server), so there is nothing to log into and nothing to cache - the token goes in the OS keyring and every request carries it.
let config = KaslServerConfig {
url: "https://kasl.example.com".to_string(),
ca_certificate: None,
};
let server = KaslServer::new(&config)?;
let health = server.health().await?;
println!("kasl-server {}", health.version);Structs§
- Agent
Identity - The identity behind a token, as
GET /api/v1/agent/whoamireports it. - Health
- What
GET /healthreports. - Kasl
Server - A client bound to one kasl-server instance.
Constants§
- AGENT_
TOKEN_ PROMPT - Prompt shown when the agent token is missing from the keyring.
- AGENT_
TOKEN_ SECRET - Keyring credential holding the agent token.
Functions§
- normalize_
url - Trims a user-typed URL into the form the client stores.