Skip to main content

DogtagConfig

Struct DogtagConfig 

Source
pub struct DogtagConfig {
    pub ca_url: Url,
    pub kra_url: Option<Url>,
    pub agent_cert_file: String,
    pub agent_key_file: String,
    pub ca_cert_file: String,
    pub profile_id: String,
    pub timeout_secs: u64,
    pub retry_max: u32,
    pub retry_delay_ms: u64,
}
Expand description

Configuration for connecting to a Dogtag PKI instance.

Supports deserialization from TOML configuration files. The agent certificate and key are used for mTLS authentication to the Dogtag REST API, which requires an agent-level certificate for enrollment and revocation operations.

§Example TOML

[dogtag]
ca_url = "https://ca.example.com:8443"
kra_url = "https://kra.example.com:8443"
agent_cert_file = "/etc/kipuka/agent.pem"
agent_key_file = "/etc/kipuka/agent.key"
ca_cert_file = "/etc/pki/tls/certs/ca-bundle.crt"
profile_id = "caServerCert"
timeout_secs = 30
retry_max = 3
retry_delay_ms = 1000

Fields§

§ca_url: Url

Base URL of the Dogtag CA subsystem.

Typically https://<hostname>:8443 for the secure admin/agent port. The REST API endpoints are relative to this URL (e.g., /ca/rest/certs).

§kra_url: Option<Url>

Base URL of the Dogtag KRA subsystem (optional).

Required only for /serverkeygen operations that need server-side key generation and archival. Typically on the same host as the CA but may be a separate instance.

§agent_cert_file: String

Path to the PEM-encoded agent certificate file.

This certificate authenticates the client to the Dogtag REST API. Must be issued by a CA trusted by the Dogtag instance and have the appropriate agent privileges.

§agent_key_file: String

Path to the PEM-encoded agent private key file.

§ca_cert_file: String

Path to the PEM-encoded CA certificate file for TLS verification.

Used to verify the Dogtag server’s TLS certificate. This is typically the root CA certificate that issued the Dogtag instance’s server cert.

§profile_id: String

Default enrollment profile ID.

Common profiles include:

  • caServerCert — TLS server certificates
  • caUserCert — User/client certificates
  • caIPAserviceCert — FreeIPA service certificates
  • caDualCert — Dual-key (signing + encryption) certificates
§timeout_secs: u64

HTTP request timeout in seconds.

Applied to each individual HTTP request to the Dogtag REST API. Enrollment operations may take longer if the CA profile requires approval workflows.

§retry_max: u32

Maximum number of retry attempts for transient failures.

Retries are attempted for HTTP 5xx errors and connection failures. Client errors (4xx) are not retried.

§retry_delay_ms: u64

Delay between retry attempts in milliseconds.

Simple fixed-delay retry. Future versions may support exponential backoff.

Trait Implementations§

Source§

impl Clone for DogtagConfig

Source§

fn clone(&self) -> DogtagConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DogtagConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DogtagConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,