pub struct CertAuth { /* private fields */ }Expand description
The aggregate for an RPKI Certification Authority (CA).
It represents an “organizational” CA: It can have multiple parents and multiple keys under each. For each of them, it will have a resource class that represents the actual published CA.
Configurations for published objects such as ROAs or ASPA objects are kept at the level of the CA, and actual RPKI objects are then issued under the resource class that has matching resources.
Implementations§
Source§impl CertAuth
§Data presentation
impl CertAuth
§Data presentation
Sourcepub fn as_ca_info(&self) -> CertAuthInfo
pub fn as_ca_info(&self) -> CertAuthInfo
Returns the CA information for use in the API.
Sourcepub fn configured_roas(&self) -> Vec<ConfiguredRoa>
pub fn configured_roas(&self) -> Vec<ConfiguredRoa>
Returns a list of the currently configured ROAs.
Sourcepub fn configured_roas_for_configs(
&self,
roa_configurations: Vec<RoaConfiguration>,
) -> Vec<ConfiguredRoa>
pub fn configured_roas_for_configs( &self, roa_configurations: Vec<RoaConfiguration>, ) -> Vec<ConfiguredRoa>
Returns a list of ROAs matching the given ROA configurations.
Sourcepub fn child_request(&self) -> ChildRequest
pub fn child_request(&self) -> ChildRequest
Returns an RFC 8183 Child Request.
This request can be presented as XML to a parent of this CA.
Sourcepub fn publisher_request(&self) -> PublisherRequest
pub fn publisher_request(&self) -> PublisherRequest
Returns an RFC 8183 Publisher Request.
This request can be presented as XML to the repository for this CA.
Sourcepub fn id_cert(&self) -> &IdCertInfo
pub fn id_cert(&self) -> &IdCertInfo
Returns the ID certificate used by this CA.
Sourcepub fn all_resources(&self) -> ResourceSet
pub fn all_resources(&self) -> ResourceSet
Returns the complete set of all currently received resources, under
all parents, for this CertAuth
Source§impl CertAuth
§Publishing
impl CertAuth
§Publishing
Sourcepub fn repository_contact(&self) -> KrillResult<&RepositoryContact>
pub fn repository_contact(&self) -> KrillResult<&RepositoryContact>
Returns the repository contact information for this CA.
If the CA does not yet have a repository assigned, returns an error.
Source§impl CertAuth
§Child CAs of this CA.
impl CertAuth
§Child CAs of this CA.
Sourcepub fn child_export(
&self,
child_handle: &ChildHandle,
) -> KrillResult<ImportChild>
pub fn child_export( &self, child_handle: &ChildHandle, ) -> KrillResult<ImportChild>
Export a child under this CA, if possible.
Sourcepub fn verify_rfc6492(&self, cms: ProvisioningCms) -> KrillResult<Message>
pub fn verify_rfc6492(&self, cms: ProvisioningCms) -> KrillResult<Message>
Verifies a received provisioning protocol CMS message.
If the message is for a known child and validates against the ID certificate stored for that child, returns the message. Otherwise returns an error.
Sourcepub fn sign_rfc6492_response(
&self,
message: Message,
signer: &KrillSigner,
) -> KrillResult<Bytes>
pub fn sign_rfc6492_response( &self, message: Message, signer: &KrillSigner, ) -> KrillResult<Bytes>
Signs a provisioning protocol message for sending towards the child.
Sourcepub fn list(
&self,
child_handle: &ChildHandle,
issuance_timing: &IssuanceTimingConfig,
) -> KrillResult<ResourceClassListResponse>
pub fn list( &self, child_handle: &ChildHandle, issuance_timing: &IssuanceTimingConfig, ) -> KrillResult<ResourceClassListResponse>
Creates a “resource class list response” for a child CA.
This response is part of the provisioning protocol and contains all entitlements assigned to a child CA.
The method returns an error if the child CA is not authorized or unknown.
Sourcepub fn issuance_response(
&self,
child_handle: &ChildHandle,
my_rcn: &ResourceClassName,
pub_key: &PublicKey,
issuance_timing: &IssuanceTimingConfig,
) -> KrillResult<IssuanceResponse>
pub fn issuance_response( &self, child_handle: &ChildHandle, my_rcn: &ResourceClassName, pub_key: &PublicKey, issuance_timing: &IssuanceTimingConfig, ) -> KrillResult<IssuanceResponse>
Creates a “issuance response” for specific resource class of a child.
This response is part of the provisioning protocol and contains a single certificate issued to the child CA in a specific resource class.
Sourcepub fn get_child(&self, child: &ChildHandle) -> KrillResult<&ChildDetails>
pub fn get_child(&self, child: &ChildHandle) -> KrillResult<&ChildDetails>
Returns a child, or an error if the child is unknown.
Sourcepub fn children(&self) -> impl Iterator<Item = &ChildHandle>
pub fn children(&self) -> impl Iterator<Item = &ChildHandle>
Returns an iterator for the handles of all children under this CA.
Source§impl CertAuth
§Parent CAs of this CA
impl CertAuth
§Parent CAs of this CA
Sourcepub fn parents(&self) -> impl Iterator<Item = &ParentHandle>
pub fn parents(&self) -> impl Iterator<Item = &ParentHandle>
Returns an iterator over the handles of all parent CAs.
Sourcepub fn nr_parents(&self) -> usize
pub fn nr_parents(&self) -> usize
Returns the number parents of the CA.
Sourcepub fn has_parent(&self, parent: &ParentHandle) -> bool
pub fn has_parent(&self, parent: &ParentHandle) -> bool
Returns whether the given parent is a parent of this CA.
Sourcepub fn parent(&self, parent: &ParentHandle) -> KrillResult<&ParentCaContact>
pub fn parent(&self, parent: &ParentHandle) -> KrillResult<&ParentCaContact>
Gets the ParentCaContact for this ParentHandle. Returns an Err when the parent does not exist.
Sourcepub fn parent_for_rc(
&self,
rcn: &ResourceClassName,
) -> KrillResult<&ParentHandle>
pub fn parent_for_rc( &self, rcn: &ResourceClassName, ) -> KrillResult<&ParentHandle>
Returns the parent handle for the given resource class.
Returns an error if the resource class is not known to this CA.
Sourcepub fn cert_requests(
&self,
parent_handle: &ParentHandle,
) -> HashMap<ResourceClassName, Vec<IssuanceRequest>>
pub fn cert_requests( &self, parent_handle: &ParentHandle, ) -> HashMap<ResourceClassName, Vec<IssuanceRequest>>
Returns all currently open certificate requests for a parent.
Returns an empty map if the parent is not found.
Sourcepub fn has_pending_requests(&self, parent: &ParentHandle) -> bool
pub fn has_pending_requests(&self, parent: &ParentHandle) -> bool
Returns whether the CA has any pending requests for a parent
Sourcepub fn revoke_requests(
&self,
parent: &ParentHandle,
) -> HashMap<ResourceClassName, Vec<RevocationRequest>>
pub fn revoke_requests( &self, parent: &ParentHandle, ) -> HashMap<ResourceClassName, Vec<RevocationRequest>>
Returns the open revocation requests for the given parent.
Sourcepub fn revoke_under_parent(
&self,
parent: &ParentHandle,
signer: &KrillSigner,
) -> KrillResult<HashMap<ResourceClassName, Vec<RevocationRequest>>>
pub fn revoke_under_parent( &self, parent: &ParentHandle, signer: &KrillSigner, ) -> KrillResult<HashMap<ResourceClassName, Vec<RevocationRequest>>>
Returns new revocation requests for all resource class under a parent.
Source§impl CertAuth
§Publishing
impl CertAuth
§Publishing
Sourcepub fn process_update_repo(
&self,
contact: RepositoryContact,
signer: &KrillSigner,
) -> KrillResult<Vec<CertAuthEvent>>
pub fn process_update_repo( &self, contact: RepositoryContact, signer: &KrillSigner, ) -> KrillResult<Vec<CertAuthEvent>>
Processes the “update repository” command.
Currently, this only allows initially setting the repository. In the future, we will support migrating to a new repository using a key roll. See issue #480.
The command assumes that the repository can be reached. This is checked by the CA manager before issuing the command.
Source§impl CertAuth
§ROAs
impl CertAuth
§ROAs
Returns the ROA configuration resulting from applying the updates.
Does not change the current configuration. Returns the resulting configuration or the reasons why the updates cannot be applied.
Processes the “route origin authorization renew“ commands.
If force is true, all authorizations are renewed, otherwise only
those that are close to expiring.
Source§impl CertAuth
§ASPA
impl CertAuth
§ASPA
Sourcepub fn aspas_definitions_show(&self) -> AspaDefinitionList
pub fn aspas_definitions_show(&self) -> AspaDefinitionList
Returns the list of current ASPA definitions.
Source§impl CertAuth
§BGPsec router keys
impl CertAuth
§BGPsec router keys
Sourcepub fn bgpsec_definitions_show(&self) -> BgpSecCsrInfoList
pub fn bgpsec_definitions_show(&self) -> BgpSecCsrInfoList
Returns all current BGPsec router key definitions.
Source§impl CertAuth
§RTAs
impl CertAuth
§RTAs
Sourcepub fn rta_show(&self, name: &str) -> KrillResult<ResourceTaggedAttestation>
pub fn rta_show(&self, name: &str) -> KrillResult<ResourceTaggedAttestation>
Returns the RTA with the given name.
Sourcepub fn rta_prep_response(&self, name: &str) -> KrillResult<RtaPrepResponse>
pub fn rta_prep_response(&self, name: &str) -> KrillResult<RtaPrepResponse>
Returns the RTA preparation response for the given RTA.
Trait Implementations§
Source§impl Aggregate for CertAuth
impl Aggregate for CertAuth
Source§type Command = SentCommand<CertAuthCommandDetails>
type Command = SentCommand<CertAuthCommandDetails>
Source§type StorableCommandDetails = CertAuthStorableCommand
type StorableCommandDetails = CertAuthStorableCommand
Source§type Event = CertAuthEvent
type Event = CertAuthEvent
Source§type InitCommand = SentInitCommand<CertAuthInitCommandDetails>
type InitCommand = SentInitCommand<CertAuthInitCommandDetails>
Source§fn init(handle: &MyHandle, event: CertAuthInitEvent) -> Self
fn init(handle: &MyHandle, event: CertAuthInitEvent) -> Self
Source§fn process_init_command(
command: SentInitCommand<CertAuthInitCommandDetails>,
) -> Result<CertAuthInitEvent, Error>
fn process_init_command( command: SentInitCommand<CertAuthInitCommandDetails>, ) -> Result<CertAuthInitEvent, Error>
Source§fn increment_version(&mut self)
fn increment_version(&mut self)
Source§fn process_command(
&self,
command: SentCommand<CertAuthCommandDetails>,
) -> Result<Vec<CertAuthEvent>, Error>
fn process_command( &self, command: SentCommand<CertAuthCommandDetails>, ) -> Result<Vec<CertAuthEvent>, Error>
Source§fn apply(&mut self, event: CertAuthEvent)
fn apply(&mut self, event: CertAuthEvent)
Source§fn apply_command(&mut self, command: StoredCommand<Self>)
fn apply_command(&mut self, command: StoredCommand<Self>)
Source§impl<'de> Deserialize<'de> for CertAuth
impl<'de> Deserialize<'de> for CertAuth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CertAuth
Source§impl PostSaveEventListener<CertAuth> for TaskQueue
Implement post-save listening for CertAuth events.
impl PostSaveEventListener<CertAuth> for TaskQueue
Implement post-save listening for CertAuth events.
Used for best effort signaling to local child CAs that a sync with their parent is needed.
fn listen(&self, ca: &CertAuth, events: &[CertAuthEvent])
Source§impl PreSaveEventListener<CertAuth> for CaObjectsStore
React to any events on a CA that cause the set of object to change.
impl PreSaveEventListener<CertAuth> for CaObjectsStore
React to any events on a CA that cause the set of object to change.
fn listen(&self, ca: &CertAuth, events: &[CertAuthEvent]) -> KrillResult<()>
Source§impl PreSaveEventListener<CertAuth> for TaskQueue
Implement pre-save listening for CertAuth events.
impl PreSaveEventListener<CertAuth> for TaskQueue
Implement pre-save listening for CertAuth events.
fn listen(&self, ca: &CertAuth, events: &[CertAuthEvent]) -> KrillResult<()>
impl StructuralPartialEq for CertAuth
Auto Trait Implementations§
impl !Freeze for CertAuth
impl RefUnwindSafe for CertAuth
impl Send for CertAuth
impl Sync for CertAuth
impl Unpin for CertAuth
impl UnsafeUnpin for CertAuth
impl UnwindSafe for CertAuth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more