Skip to main content

KrillManager

Struct KrillManager 

Source
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

Source

pub async fn build(config: Arc<Config>) -> KrillResult<Self>

Creates a new publication server. Note that state is preserved in the data storage.

Source

pub fn build_scheduler(&self) -> Scheduler

Source

pub fn service_base_uri(&self) -> &Https

Source§

impl KrillManager

§Access to components

Source

pub fn system_actor(&self) -> &Actor

Source

pub fn testbed_enabled(&self) -> bool

Source

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

Source

pub fn repo_stats(&self) -> KrillResult<RepoStats>

Returns the repository server stats

Source

pub fn publishers(&self) -> KrillResult<Vec<PublisherHandle>>

Returns all current publishers.

Source

pub fn add_publisher( &self, req: PublisherRequest, actor: &Actor, ) -> KrillResult<RepositoryResponse>

Adds the publishers, blows up if it already existed.

Source

pub fn remove_publisher( &self, publisher: PublisherHandle, actor: &Actor, ) -> KrillEmptyResult

Removes a publisher, blows up if it didn’t exist.

Source

pub fn delete_matching_files( &self, criteria: RepoFileDeleteCriteria, ) -> KrillEmptyResult

Removes a publisher, blows up if it didn’t exist.

Source

pub fn get_publisher( &self, publisher: PublisherHandle, ) -> KrillResult<PublisherDetails>

Returns a publisher.

Source

pub fn rrdp_base_path(&self) -> PathBuf

Source§

impl KrillManager

§Manage RFC8181 clients

Source

pub fn repository_response( &self, publisher: &PublisherHandle, ) -> KrillResult<RepositoryResponse>

Source

pub fn rfc8181( &self, publisher: PublisherHandle, msg_bytes: Bytes, ) -> KrillResult<Bytes>

Source§

impl KrillManager

§TA Support

Source§

impl KrillManager

§Being a parent

Source

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.

Source

pub async fn ca_parent_contact( &self, ca: &CaHandle, child: ChildHandle, ) -> KrillResult<ParentCaContact>

Shows the parent contact for a child.

Source

pub fn ca_parent_response( &self, ca: &CaHandle, child: ChildHandle, ) -> KrillResult<ParentResponse>

Shows the parent contact for a child.

Source

pub fn ca_child_update( &self, ca: &CaHandle, child: ChildHandle, req: UpdateChildRequest, actor: &Actor, ) -> KrillEmptyResult

Update IdCert or resources of a child.

Source

pub fn ca_child_remove( &self, ca: &CaHandle, child: ChildHandle, actor: &Actor, ) -> KrillEmptyResult

Update IdCert or resources of a child.

Source

pub fn ca_child_show( &self, ca: &CaHandle, child: &ChildHandle, ) -> KrillResult<ChildCaInfo>

Show details for a child under the CA.

Source

pub fn ca_child_export( &self, ca: &CaHandle, child: &ChildHandle, ) -> KrillResult<ImportChild>

Export a child under the CA.

Source

pub fn ca_child_import( &self, ca: &CaHandle, child: ImportChild, actor: &Actor, ) -> KrillResult<()>

Import a child under the CA.

Source

pub fn ca_stats_child_connections( &self, ca: &CaHandle, ) -> KrillResult<ChildrenConnectionStats>

Show children stats under the CA.

Source§

impl KrillManager

§Being a child

Source

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.

Source

pub async fn ca_parent_add_or_update( &self, ca: CaHandle, parent_req: ParentCaReq, actor: &Actor, ) -> KrillEmptyResult

Updates a parent contact for a CA

Source

pub async fn ca_parent_remove( &self, handle: CaHandle, parent: ParentHandle, actor: &Actor, ) -> KrillEmptyResult

Source§

impl KrillManager

§Stats and status of CAS

Source§

impl KrillManager

§Synchronization operations for CAS

Source

pub fn republish_all(&self, force: bool) -> KrillEmptyResult

Republish all CAs that need it.

Source

pub fn cas_repo_sync_all(&self) -> KrillEmptyResult

Re-sync all CAs with their repositories

Source

pub fn cas_repo_sync_single(&self, ca: &CaHandle) -> KrillEmptyResult

Re-sync a specific CA with its repository

Source

pub fn cas_refresh_all(&self) -> KrillEmptyResult

Refresh all CAs: ask for updates and shrink as needed.

Source

pub fn cas_refresh_single(&self, ca_handle: CaHandle) -> KrillEmptyResult

Refresh a specific CA with its parents

Source

pub fn cas_schedule_suspend_all(&self) -> KrillEmptyResult

Schedule check suspend children for all CAs

Source§

impl KrillManager

§Admin CAS

Source

pub fn ca_handles(&self) -> KrillResult<impl Iterator<Item = CaHandle>>

Source

pub fn ca_list(&self, auth: &AuthInfo) -> KrillResult<CertAuthList>

Source

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.

Source

pub fn ca_status(&self, ca: &CaHandle) -> KrillResult<CaStatus>

Source

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.

Source

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.

Source

pub fn ca_history( &self, ca: &CaHandle, crit: CommandHistoryCriteria, ) -> KrillResult<CommandHistory>

Returns the history for a CA.

Source

pub fn ca_command_details( &self, ca: &CaHandle, version: u64, ) -> KrillResult<CommandDetails>

Source

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.

Source

pub fn ca_init(&self, init: CertAuthInit) -> KrillEmptyResult

Source

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.

Source

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)

Source

pub fn ca_update_id(&self, ca: CaHandle, actor: &Actor) -> KrillEmptyResult

Source

pub fn ca_keyroll_init(&self, ca: CaHandle, actor: &Actor) -> KrillEmptyResult

Source

pub fn ca_keyroll_activate( &self, ca: CaHandle, actor: &Actor, ) -> KrillEmptyResult

Source

pub fn rfc6492( &self, ca: CaHandle, msg_bytes: Bytes, user_agent: Option<String>, actor: &Actor, ) -> KrillResult<Bytes>

Source§

impl KrillManager

§Handle ASPA requests

Source§

impl KrillManager

§Handle BGPSec requests

Source§

impl KrillManager

§Handle route authorization requests

Source

pub fn ca_routes_update( &self, ca: CaHandle, updates: RoaConfigurationUpdates, actor: &Actor, ) -> KrillEmptyResult

Source

pub fn ca_routes_show( &self, handle: &CaHandle, ) -> KrillResult<Vec<ConfiguredRoa>>

Source

pub fn ca_routes_bgp_analysis( &self, handle: &CaHandle, ) -> KrillResult<BgpAnalysisReport>

Source

pub fn ca_routes_bgp_dry_run( &self, handle: &CaHandle, updates: RoaConfigurationUpdates, ) -> KrillResult<BgpAnalysisReport>

Source

pub fn ca_routes_bgp_suggest( &self, handle: &CaHandle, limit: Option<ResourceSet>, ) -> KrillResult<BgpAnalysisSuggestion>

Source

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

Source

pub fn repository_init(&self, uris: PublicationServerUris) -> KrillResult<()>

Create the publication server, will fail if it was already created.

Source

pub fn repository_clear(&self) -> KrillResult<()>

Clear the publication server. Will fail if it still has publishers. Or if it does not exist

Source

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

Source

pub fn rta_list(&self, ca: CaHandle) -> KrillResult<RtaList>

List all known RTAs

Source

pub fn rta_show( &self, ca: CaHandle, name: RtaName, ) -> KrillResult<ResourceTaggedAttestation>

Show RTA

Source

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

Source

pub async fn rta_multi_prep( &self, ca: CaHandle, name: RtaName, request: RtaPrepareRequest, actor: &Actor, ) -> KrillResult<RtaPrepResponse>

Prepare a multi

Source

pub async fn rta_multi_cosign( &self, ca: CaHandle, name: RtaName, rta: ResourceTaggedAttestation, actor: &Actor, ) -> KrillResult<()>

Co-sign an existing RTA

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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