pub struct KrillManager {
pub config: Arc<Config>,
/* private fields */
}Expand description
This is the Krill server that is doing all the orchestration for all components.
Fields§
§config: Arc<Config>Implementations§
Source§impl KrillManager
§Set up and initialization
impl KrillManager
§Set up and initialization
Sourcepub async fn build(config: Arc<Config>) -> KrillResult<Self>
pub async fn build(config: Arc<Config>) -> KrillResult<Self>
Creates a new publication server. Note that state is preserved in the data storage.
pub fn build_scheduler(&self) -> Scheduler
pub fn service_base_uri(&self) -> &Https
Source§impl KrillManager
§Access to components
impl KrillManager
§Access to components
pub fn system_actor(&self) -> &Actor
pub fn testbed_enabled(&self) -> bool
Sourcepub fn resolve_rrdp_request_path(
&self,
path: &str,
) -> KrillResult<Option<PathBuf>>
pub fn resolve_rrdp_request_path( &self, path: &str, ) -> KrillResult<Option<PathBuf>>
Converts the RRDP path portion of a HTTP request URI to a path.
The path should contain everything after the /rrdp/ portion of
the URI’s path. If the path is in principle valid, i.e., could
represent an RRDP resource generated by this RRDP sever, the method
will return a file system path representing this path. This does not
mean there will actually be a file there. The file may have been
deleted or may have never existed at all. This is necessary since
the RRDP server doesn’t track past files, only the currently valid
set of resources.
If the path is definitely not valid, returns Ok(None). This should
probably be translated into a 404 Not Found response.
Source§impl KrillManager
§Configure publishers
impl KrillManager
§Configure publishers
Sourcepub fn repo_stats(&self) -> KrillResult<RepoStats>
pub fn repo_stats(&self) -> KrillResult<RepoStats>
Returns the repository server stats
Sourcepub fn publishers(&self) -> KrillResult<Vec<PublisherHandle>>
pub fn publishers(&self) -> KrillResult<Vec<PublisherHandle>>
Returns all current publishers.
Sourcepub fn add_publisher(
&self,
req: PublisherRequest,
actor: &Actor,
) -> KrillResult<RepositoryResponse>
pub fn add_publisher( &self, req: PublisherRequest, actor: &Actor, ) -> KrillResult<RepositoryResponse>
Adds the publishers, blows up if it already existed.
Sourcepub fn remove_publisher(
&self,
publisher: PublisherHandle,
actor: &Actor,
) -> KrillEmptyResult
pub fn remove_publisher( &self, publisher: PublisherHandle, actor: &Actor, ) -> KrillEmptyResult
Removes a publisher, blows up if it didn’t exist.
Sourcepub fn delete_matching_files(
&self,
criteria: RepoFileDeleteCriteria,
) -> KrillEmptyResult
pub fn delete_matching_files( &self, criteria: RepoFileDeleteCriteria, ) -> KrillEmptyResult
Removes a publisher, blows up if it didn’t exist.
Sourcepub fn get_publisher(
&self,
publisher: PublisherHandle,
) -> KrillResult<PublisherDetails>
pub fn get_publisher( &self, publisher: PublisherHandle, ) -> KrillResult<PublisherDetails>
Returns a publisher.
pub fn rrdp_base_path(&self) -> PathBuf
Source§impl KrillManager
§Manage RFC8181 clients
impl KrillManager
§Manage RFC8181 clients
pub fn repository_response( &self, publisher: &PublisherHandle, ) -> KrillResult<RepositoryResponse>
pub fn rfc8181( &self, publisher: PublisherHandle, msg_bytes: Bytes, ) -> KrillResult<Bytes>
Source§impl KrillManager
§TA Support
impl KrillManager
§TA Support
pub fn ta_proxy_enabled(&self) -> bool
pub fn ta_proxy_init(&self) -> KrillResult<()>
pub fn ta_proxy_id(&self) -> KrillResult<IdCertInfo>
pub fn ta_proxy_publisher_request(&self) -> KrillResult<PublisherRequest>
pub fn ta_proxy_repository_update( &self, contact: RepositoryContact, actor: &Actor, ) -> KrillResult<()>
pub fn ta_proxy_repository_contact(&self) -> KrillResult<RepositoryContact>
pub fn ta_proxy_signer_add( &self, info: TrustAnchorSignerInfo, actor: &Actor, ) -> KrillResult<()>
pub fn ta_proxy_signer_update( &self, info: TrustAnchorSignerInfo, actor: &Actor, ) -> KrillResult<()>
pub fn ta_proxy_signer_make_request( &self, actor: &Actor, ) -> KrillResult<ApiTrustAnchorSignedRequest>
pub fn ta_proxy_signer_get_request( &self, ) -> KrillResult<ApiTrustAnchorSignedRequest>
pub fn ta_proxy_signer_process_response( &self, response: TrustAnchorSignedResponse, actor: &Actor, ) -> KrillResult<()>
pub fn ta_proxy_children_add( &self, child_request: AddChildRequest, actor: &Actor, ) -> KrillResult<ParentResponse>
pub fn ta_cert_details(&self) -> KrillResult<TaCertDetails>
Source§impl KrillManager
§Being a parent
impl KrillManager
§Being a parent
Sourcepub fn ca_add_child(
&self,
ca: &CaHandle,
req: AddChildRequest,
actor: &Actor,
) -> KrillResult<ParentResponse>
pub fn ca_add_child( &self, ca: &CaHandle, req: AddChildRequest, actor: &Actor, ) -> KrillResult<ParentResponse>
Adds a child to a CA and returns the ParentCaInfo that the child will need to contact this CA for resource requests.
Sourcepub async fn ca_parent_contact(
&self,
ca: &CaHandle,
child: ChildHandle,
) -> KrillResult<ParentCaContact>
pub async fn ca_parent_contact( &self, ca: &CaHandle, child: ChildHandle, ) -> KrillResult<ParentCaContact>
Shows the parent contact for a child.
Sourcepub fn ca_parent_response(
&self,
ca: &CaHandle,
child: ChildHandle,
) -> KrillResult<ParentResponse>
pub fn ca_parent_response( &self, ca: &CaHandle, child: ChildHandle, ) -> KrillResult<ParentResponse>
Shows the parent contact for a child.
Sourcepub fn ca_child_update(
&self,
ca: &CaHandle,
child: ChildHandle,
req: UpdateChildRequest,
actor: &Actor,
) -> KrillEmptyResult
pub fn ca_child_update( &self, ca: &CaHandle, child: ChildHandle, req: UpdateChildRequest, actor: &Actor, ) -> KrillEmptyResult
Update IdCert or resources of a child.
Sourcepub fn ca_child_remove(
&self,
ca: &CaHandle,
child: ChildHandle,
actor: &Actor,
) -> KrillEmptyResult
pub fn ca_child_remove( &self, ca: &CaHandle, child: ChildHandle, actor: &Actor, ) -> KrillEmptyResult
Update IdCert or resources of a child.
Sourcepub fn ca_child_show(
&self,
ca: &CaHandle,
child: &ChildHandle,
) -> KrillResult<ChildCaInfo>
pub fn ca_child_show( &self, ca: &CaHandle, child: &ChildHandle, ) -> KrillResult<ChildCaInfo>
Show details for a child under the CA.
Sourcepub fn ca_child_export(
&self,
ca: &CaHandle,
child: &ChildHandle,
) -> KrillResult<ImportChild>
pub fn ca_child_export( &self, ca: &CaHandle, child: &ChildHandle, ) -> KrillResult<ImportChild>
Export a child under the CA.
Sourcepub fn ca_child_import(
&self,
ca: &CaHandle,
child: ImportChild,
actor: &Actor,
) -> KrillResult<()>
pub fn ca_child_import( &self, ca: &CaHandle, child: ImportChild, actor: &Actor, ) -> KrillResult<()>
Import a child under the CA.
Sourcepub fn ca_stats_child_connections(
&self,
ca: &CaHandle,
) -> KrillResult<ChildrenConnectionStats>
pub fn ca_stats_child_connections( &self, ca: &CaHandle, ) -> KrillResult<ChildrenConnectionStats>
Show children stats under the CA.
Source§impl KrillManager
§Being a child
impl KrillManager
§Being a child
Sourcepub fn ca_child_req(&self, ca: &CaHandle) -> KrillResult<ChildRequest>
pub fn ca_child_req(&self, ca: &CaHandle) -> KrillResult<ChildRequest>
Returns the child request for a CA, or NONE if the CA cannot be found.
Sourcepub async fn ca_parent_add_or_update(
&self,
ca: CaHandle,
parent_req: ParentCaReq,
actor: &Actor,
) -> KrillEmptyResult
pub async fn ca_parent_add_or_update( &self, ca: CaHandle, parent_req: ParentCaReq, actor: &Actor, ) -> KrillEmptyResult
Updates a parent contact for a CA
pub async fn ca_parent_remove( &self, handle: CaHandle, parent: ParentHandle, actor: &Actor, ) -> KrillEmptyResult
Source§impl KrillManager
§Stats and status of CAS
impl KrillManager
§Stats and status of CAS
pub fn cas_stats(&self) -> KrillResult<HashMap<CaHandle, CertAuthStats>>
pub async fn cas_import(&self, structure: Structure) -> KrillResult<()>
pub fn ca_issues(&self, ca: &CaHandle) -> KrillResult<CertAuthIssues>
Source§impl KrillManager
§Synchronization operations for CAS
impl KrillManager
§Synchronization operations for CAS
Sourcepub fn republish_all(&self, force: bool) -> KrillEmptyResult
pub fn republish_all(&self, force: bool) -> KrillEmptyResult
Republish all CAs that need it.
Sourcepub fn cas_repo_sync_all(&self) -> KrillEmptyResult
pub fn cas_repo_sync_all(&self) -> KrillEmptyResult
Re-sync all CAs with their repositories
Sourcepub fn cas_repo_sync_single(&self, ca: &CaHandle) -> KrillEmptyResult
pub fn cas_repo_sync_single(&self, ca: &CaHandle) -> KrillEmptyResult
Re-sync a specific CA with its repository
Sourcepub fn cas_refresh_all(&self) -> KrillEmptyResult
pub fn cas_refresh_all(&self) -> KrillEmptyResult
Refresh all CAs: ask for updates and shrink as needed.
Sourcepub fn cas_refresh_single(&self, ca_handle: CaHandle) -> KrillEmptyResult
pub fn cas_refresh_single(&self, ca_handle: CaHandle) -> KrillEmptyResult
Refresh a specific CA with its parents
Sourcepub fn cas_schedule_suspend_all(&self) -> KrillEmptyResult
pub fn cas_schedule_suspend_all(&self) -> KrillEmptyResult
Schedule check suspend children for all CAs
Source§impl KrillManager
§Admin CAS
impl KrillManager
§Admin CAS
pub fn ca_handles(&self) -> KrillResult<impl Iterator<Item = CaHandle>>
pub fn ca_list(&self, auth: &AuthInfo) -> KrillResult<CertAuthList>
Sourcepub fn ca_info(&self, ca: &CaHandle) -> KrillResult<CertAuthInfo>
pub fn ca_info(&self, ca: &CaHandle) -> KrillResult<CertAuthInfo>
Returns the public CA info for a CA, or NONE if the CA cannot be found.
pub fn ca_status(&self, ca: &CaHandle) -> KrillResult<CaStatus>
Sourcepub async fn ca_delete(&self, ca: &CaHandle, actor: &Actor) -> KrillResult<()>
pub async fn ca_delete(&self, ca: &CaHandle, actor: &Actor) -> KrillResult<()>
Delete a CA. Let it do best effort revocation requests and withdraw all its objects first. Note that any children of this CA will be left orphaned, and they will only learn of this sad fact when they choose to call home.
Sourcepub fn ca_my_parent_contact(
&self,
ca: &CaHandle,
parent: &ParentHandle,
) -> KrillResult<ParentCaContact>
pub fn ca_my_parent_contact( &self, ca: &CaHandle, parent: &ParentHandle, ) -> KrillResult<ParentCaContact>
Returns the parent contact for a CA and parent, or NONE if either the CA or the parent cannot be found.
Sourcepub fn ca_history(
&self,
ca: &CaHandle,
crit: CommandHistoryCriteria,
) -> KrillResult<CommandHistory>
pub fn ca_history( &self, ca: &CaHandle, crit: CommandHistoryCriteria, ) -> KrillResult<CommandHistory>
Returns the history for a CA.
pub fn ca_command_details( &self, ca: &CaHandle, version: u64, ) -> KrillResult<CommandDetails>
Sourcepub fn ca_publisher_req(&self, ca: &CaHandle) -> KrillResult<PublisherRequest>
pub fn ca_publisher_req(&self, ca: &CaHandle) -> KrillResult<PublisherRequest>
Returns the publisher request for a CA, or NONE of the CA cannot be found.
pub fn ca_init(&self, init: CertAuthInit) -> KrillEmptyResult
Sourcepub fn ca_repo_details(
&self,
ca_handle: &CaHandle,
) -> KrillResult<CaRepoDetails>
pub fn ca_repo_details( &self, ca_handle: &CaHandle, ) -> KrillResult<CaRepoDetails>
Return the info about the CONFIGured repository server for a given Ca. and the actual objects published there, as reported by a list reply.
Sourcepub async fn ca_repo_update(
&self,
ca: CaHandle,
contact: RepositoryContact,
actor: &Actor,
) -> KrillEmptyResult
pub async fn ca_repo_update( &self, ca: CaHandle, contact: RepositoryContact, actor: &Actor, ) -> KrillEmptyResult
Update the repository for a CA, or return an error. (see
CertAuth::repo_update)
pub fn ca_update_id(&self, ca: CaHandle, actor: &Actor) -> KrillEmptyResult
pub fn ca_keyroll_init(&self, ca: CaHandle, actor: &Actor) -> KrillEmptyResult
pub fn ca_keyroll_activate( &self, ca: CaHandle, actor: &Actor, ) -> KrillEmptyResult
pub fn rfc6492( &self, ca: CaHandle, msg_bytes: Bytes, user_agent: Option<String>, actor: &Actor, ) -> KrillResult<Bytes>
Source§impl KrillManager
§Handle ASPA requests
impl KrillManager
§Handle ASPA requests
pub fn ca_aspas_definitions_show( &self, ca: &CaHandle, ) -> KrillResult<AspaDefinitionList>
pub fn ca_aspas_definitions_update( &self, ca: CaHandle, updates: AspaDefinitionUpdates, actor: &Actor, ) -> KrillEmptyResult
pub fn ca_aspas_update_aspa( &self, ca: CaHandle, customer: CustomerAsn, update: AspaProvidersUpdate, actor: &Actor, ) -> KrillEmptyResult
Source§impl KrillManager
§Handle BGPSec requests
impl KrillManager
§Handle BGPSec requests
pub fn ca_bgpsec_definitions_show( &self, ca: &CaHandle, ) -> KrillResult<BgpSecCsrInfoList>
pub fn ca_bgpsec_definitions_update( &self, ca: CaHandle, updates: BgpSecDefinitionUpdates, actor: &Actor, ) -> KrillResult<()>
Source§impl KrillManager
§Handle route authorization requests
impl KrillManager
§Handle route authorization requests
pub fn ca_routes_update( &self, ca: CaHandle, updates: RoaConfigurationUpdates, actor: &Actor, ) -> KrillEmptyResult
pub fn ca_routes_show( &self, handle: &CaHandle, ) -> KrillResult<Vec<ConfiguredRoa>>
pub fn ca_routes_bgp_analysis( &self, handle: &CaHandle, ) -> KrillResult<BgpAnalysisReport>
pub fn ca_routes_bgp_dry_run( &self, handle: &CaHandle, updates: RoaConfigurationUpdates, ) -> KrillResult<BgpAnalysisReport>
pub fn ca_routes_bgp_suggest( &self, handle: &CaHandle, limit: Option<ResourceSet>, ) -> KrillResult<BgpAnalysisSuggestion>
Sourcepub async fn force_renew_roas(&self) -> KrillResult<()>
pub async fn force_renew_roas(&self) -> KrillResult<()>
Re-issue ROA objects so that they will use short subjects (see issue #700)
Source§impl KrillManager
§Handle Repository Server requests
impl KrillManager
§Handle Repository Server requests
Sourcepub fn repository_init(&self, uris: PublicationServerUris) -> KrillResult<()>
pub fn repository_init(&self, uris: PublicationServerUris) -> KrillResult<()>
Create the publication server, will fail if it was already created.
Sourcepub fn repository_clear(&self) -> KrillResult<()>
pub fn repository_clear(&self) -> KrillResult<()>
Clear the publication server. Will fail if it still has publishers. Or if it does not exist
Sourcepub fn repository_session_reset(&self) -> KrillResult<()>
pub fn repository_session_reset(&self) -> KrillResult<()>
Perform an RRDP session reset. Useful after a restart of the server as we can never be certain whether the previous state was the last public state seen by validators, or.. the server was started using a back up.
Source§impl KrillManager
§Handle Resource Tagged Attestation requests
impl KrillManager
§Handle Resource Tagged Attestation requests
Sourcepub fn rta_list(&self, ca: CaHandle) -> KrillResult<RtaList>
pub fn rta_list(&self, ca: CaHandle) -> KrillResult<RtaList>
List all known RTAs
Sourcepub fn rta_show(
&self,
ca: CaHandle,
name: RtaName,
) -> KrillResult<ResourceTaggedAttestation>
pub fn rta_show( &self, ca: CaHandle, name: RtaName, ) -> KrillResult<ResourceTaggedAttestation>
Show RTA
Sourcepub async fn rta_sign(
&self,
ca: CaHandle,
name: RtaName,
request: RtaContentRequest,
actor: &Actor,
) -> KrillResult<()>
pub async fn rta_sign( &self, ca: CaHandle, name: RtaName, request: RtaContentRequest, actor: &Actor, ) -> KrillResult<()>
Sign an RTA - either a new, or a prepared RTA
Sourcepub async fn rta_multi_prep(
&self,
ca: CaHandle,
name: RtaName,
request: RtaPrepareRequest,
actor: &Actor,
) -> KrillResult<RtaPrepResponse>
pub async fn rta_multi_prep( &self, ca: CaHandle, name: RtaName, request: RtaPrepareRequest, actor: &Actor, ) -> KrillResult<RtaPrepResponse>
Prepare a multi
Sourcepub async fn rta_multi_cosign(
&self,
ca: CaHandle,
name: RtaName,
rta: ResourceTaggedAttestation,
actor: &Actor,
) -> KrillResult<()>
pub async fn rta_multi_cosign( &self, ca: CaHandle, name: RtaName, rta: ResourceTaggedAttestation, actor: &Actor, ) -> KrillResult<()>
Co-sign an existing RTA
Auto Trait Implementations§
impl !Freeze for KrillManager
impl !RefUnwindSafe for KrillManager
impl !UnwindSafe for KrillManager
impl Send for KrillManager
impl Sync for KrillManager
impl Unpin for KrillManager
impl UnsafeUnpin for KrillManager
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> 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