RPKI Engine
1.0
|
Public Member Functions | |
def | bscs |
def | children |
def | client_poll |
def | cron |
def | ghostbusters |
def | parents |
def | regenerate_crls_and_manifests |
def | repositories |
def | roas |
def | serve_fetch_all |
def | serve_fetch_handle |
def | serve_fetch_one_maybe |
def | serve_post_save_hook |
def | serve_publish_world_now |
def | serve_reissue |
def | serve_rekey |
def | serve_revoke |
def | serve_revoke_forgotten |
def | serve_run_now |
def | update_children |
def | update_ghostbusters |
def | update_roas |
Static Public Attributes | |
tuple | attributes = ("action", "tag", "self_handle", "crl_interval", "regen_margin") |
XML attributes for this element. | |
tuple | booleans = ("rekey", "reissue", "revoke", "run_now", "publish_world_now", "revoke_forgotten") |
Boolean attributes (value "yes" or "no") for this element. | |
bpki_cert = None | |
bpki_glue = None | |
crl_interval = None | |
string | element_name = "self" |
tuple | elements = ("bpki_cert", "bpki_glue") |
XML elements contained by this element. | |
tuple | handles = () |
regen_margin = None | |
tuple | sql_template |
use_hsm = False |
<self/> element.
Definition at line 130 of file left_right.py.
def rpki::left_right::self_elt::bscs | ( | self | ) |
Fetch all BSC objects that link to this self object.
Definition at line 152 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
def rpki::left_right::self_elt::children | ( | self | ) |
Fetch all child objects that link to this self object.
Definition at line 173 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by update_children().
def rpki::left_right::self_elt::client_poll | ( | self, | |
callback | |||
) |
Run the regular client poll cycle with each of this self's parents in turn.
Definition at line 346 of file left_right.py.
References parents().
Referenced by cron().
def rpki::left_right::self_elt::cron | ( | self, | |
cb | |||
) |
Periodic tasks.
Definition at line 313 of file left_right.py.
References client_poll(), regenerate_crls_and_manifests(), rpki::left_right::data_elt::self_handle, rpki::left_right::report_error_elt::self_handle, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, rpki::rpkid::ghostbuster_obj::self_id, update_children(), update_ghostbusters(), and update_roas().
Referenced by rpki::rpkid::main::cronjob_handler(), and serve_run_now().
def rpki::left_right::self_elt::ghostbusters | ( | self | ) |
Fetch all Ghostbuster record objects that link to this self object.
Definition at line 187 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by rpki::rpkid::ca_detail_obj::delete(), rpki::rpkid::ca_detail_obj::reissue(), and update_ghostbusters().
def rpki::left_right::self_elt::parents | ( | self | ) |
Fetch all parent objects that link to this self object.
Definition at line 166 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by client_poll(), regenerate_crls_and_manifests(), serve_publish_world_now(), serve_reissue(), serve_rekey(), serve_revoke(), serve_revoke_forgotten(), and update_ghostbusters().
def rpki::left_right::self_elt::regenerate_crls_and_manifests | ( | self, | |
cb | |||
) |
Generate new CRLs and manifests as necessary for all of this self's CAs. Extracting nextUpdate from a manifest is hard at the moment due to implementation silliness, so for now we generate a new manifest whenever we generate a new CRL This method also cleans up tombstones left behind by revoked ca_detail objects, since we're walking through the relevant portions of the database anyway.
Definition at line 484 of file left_right.py.
References parents(), regen_margin, rpki::left_right::data_elt::self_handle, and rpki::left_right::report_error_elt::self_handle.
Referenced by cron().
def rpki::left_right::self_elt::repositories | ( | self | ) |
Fetch all repository objects that link to this self object.
Definition at line 159 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
def rpki::left_right::self_elt::roas | ( | self | ) |
Fetch all ROA objects that link to this self object.
Definition at line 180 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by rpki::rpkid::ca_detail_obj::delete(), rpki::rpkid::ca_detail_obj::reissue(), and update_roas().
def rpki::left_right::self_elt::serve_fetch_all | ( | self | ) |
Find the self objects upon which a list action should operate. This is different from the list action for all other objects, where list only works within a given self_id context.
Reimplemented from rpki::left_right::data_elt.
Definition at line 305 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, and rpki::sql::sql_persistent::sql_fetch_all().
Referenced by rpki::xml_utils::data_elt::serve_list().
def rpki::left_right::self_elt::serve_fetch_handle | ( | cls, | |
gctx, | |||
self_id, | |||
self_handle | |||
) |
Find a self object based on its self_handle.
Reimplemented from rpki::left_right::data_elt.
Definition at line 299 of file left_right.py.
Referenced by serve_fetch_one_maybe().
def rpki::left_right::self_elt::serve_fetch_one_maybe | ( | self | ) |
Find the self object upon which a get, set, or destroy action should operate, or which would conflict with a create method.
Reimplemented from rpki::left_right::data_elt.
Definition at line 291 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, rpki::left_right::data_elt::self_handle, rpki::left_right::report_error_elt::self_handle, rpki::left_right::data_elt::serve_fetch_handle(), and serve_fetch_handle().
Referenced by rpki::xml_utils::data_elt::serve_create().
def rpki::left_right::self_elt::serve_post_save_hook | ( | self, | |
q_pdu, | |||
r_pdu, | |||
cb, | |||
eb | |||
) |
Extra server actions for self_elt.
Reimplemented from rpki::xml_utils::data_elt.
Definition at line 193 of file left_right.py.
References serve_publish_world_now(), serve_reissue(), serve_rekey(), serve_revoke(), serve_revoke_forgotten(), and serve_run_now().
Referenced by rpki::xml_utils::data_elt::serve_create().
def rpki::left_right::self_elt::serve_publish_world_now | ( | self, | |
cb, | |||
eb | |||
) |
Handle a left-right publish_world_now action for this self. The publication stuff needs refactoring, right now publication is interleaved with local operations in a way that forces far too many bounces through the task system for any complex update. The whole thing ought to be rewritten to queue up outgoing publication PDUs and only send them when we're all done or when we need to force publication at a particular point in a multi-phase operation. Once that reorganization has been done, this method should be rewritten to reuse the low-level publish() methods that each object will have...but we're not there yet. So, for now, we just do this via brute force. Think of it as a trial version to see whether we've identified everything that needs to be republished for this operation.
Definition at line 251 of file left_right.py.
References parents().
Referenced by serve_post_save_hook().
def rpki::left_right::self_elt::serve_reissue | ( | self, | |
cb, | |||
eb | |||
) |
Handle a left-right reissue action for this self.
Definition at line 233 of file left_right.py.
References parents().
Referenced by serve_post_save_hook(), rpki::left_right::parent_elt::serve_post_save_hook(), and rpki::left_right::child_elt::serve_post_save_hook().
def rpki::left_right::self_elt::serve_rekey | ( | self, | |
cb, | |||
eb | |||
) |
Handle a left-right rekey action for this self.
Definition at line 215 of file left_right.py.
References parents().
Referenced by serve_post_save_hook(), and rpki::left_right::parent_elt::serve_post_save_hook().
def rpki::left_right::self_elt::serve_revoke | ( | self, | |
cb, | |||
eb | |||
) |
Handle a left-right revoke action for this self.
Definition at line 224 of file left_right.py.
References parents().
Referenced by serve_post_save_hook(), and rpki::left_right::parent_elt::serve_post_save_hook().
def rpki::left_right::self_elt::serve_revoke_forgotten | ( | self, | |
cb, | |||
eb | |||
) |
Handle a left-right revoke_forgotten action for this self.
Definition at line 242 of file left_right.py.
References parents().
Referenced by serve_post_save_hook(), and rpki::left_right::parent_elt::serve_post_save_hook().
def rpki::left_right::self_elt::serve_run_now | ( | self, | |
cb, | |||
eb | |||
) |
Handle a left-right run_now action for this self.
Definition at line 284 of file left_right.py.
References cron(), rpki::left_right::data_elt::self_handle, rpki::left_right::report_error_elt::self_handle, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by serve_post_save_hook().
def rpki::left_right::self_elt::update_children | ( | self, | |
cb | |||
) |
Check for updated IRDB data for all of this self's children and issue new certs as necessary. Must handle changes both in resources and in expiration date.
Definition at line 405 of file left_right.py.
References children(), regen_margin, rpki::left_right::data_elt::self_handle, and rpki::left_right::report_error_elt::self_handle.
Referenced by cron().
def rpki::left_right::self_elt::update_ghostbusters | ( | self, | |
cb | |||
) |
Generate or update Ghostbuster records for this self. This is heavily based on .update_roas(), and probably both of them need refactoring.
Definition at line 528 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, ghostbusters(), parents(), rpki::left_right::data_elt::self_handle, rpki::left_right::report_error_elt::self_handle, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by cron().
def rpki::left_right::self_elt::update_roas | ( | self, | |
cb | |||
) |
Generate or update ROAs for this self.
Definition at line 618 of file left_right.py.
References rpki::sql::sql_persistent::gctx, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, rpki::rpkid::roa_obj::gctx, rpki::rpkid::ghostbuster_obj::gctx, roas(), rpki::left_right::data_elt::self_handle, rpki::left_right::report_error_elt::self_handle, rpki::left_right::data_elt::self_id, rpki::rpkid::roa_obj::self_id, and rpki::rpkid::ghostbuster_obj::self_id.
Referenced by cron().
tuple rpki::left_right::self_elt::attributes = ("action", "tag", "self_handle", "crl_interval", "regen_margin") [static] |
XML attributes for this element.
Reimplemented from rpki::xml_utils::base_elt.
Definition at line 136 of file left_right.py.
Referenced by irbe_cli::cmd_elt_mixin::client_getopt(), rpki::xml_utils::base_elt::make_elt(), and rpki::xml_utils::base_elt::read_attrs().
tuple rpki::left_right::self_elt::booleans = ("rekey", "reissue", "revoke", "run_now", "publish_world_now", "revoke_forgotten") [static] |
Boolean attributes (value "yes" or "no") for this element.
Reimplemented from rpki::xml_utils::base_elt.
Definition at line 138 of file left_right.py.
Referenced by irbe_cli::cmd_elt_mixin::client_getopt(), rpki::xml_utils::base_elt::make_elt(), and rpki::xml_utils::base_elt::read_attrs().
rpki::left_right::self_elt::bpki_cert = None [static] |
Definition at line 148 of file left_right.py.
Referenced by rpki::left_right::repository_elt::call_pubd(), and rpki::left_right::child_elt::serve_up_down().
rpki::left_right::self_elt::bpki_glue = None [static] |
Definition at line 149 of file left_right.py.
Referenced by rpki::left_right::repository_elt::call_pubd(), and rpki::left_right::child_elt::serve_up_down().
rpki::left_right::self_elt::crl_interval = None [static] |
Definition at line 146 of file left_right.py.
string rpki::left_right::self_elt::element_name = "self" [static] |
Definition at line 135 of file left_right.py.
Referenced by rpki::xml_utils::base_elt::endElement(), rpki::publication::publication_object_elt::endElement(), rpki::xml_utils::data_elt::endElement(), rpki::xml_utils::base_elt::make_elt(), rpki::xml_utils::data_elt::make_reply(), rpki::xml_utils::data_elt::serve_create(), rpki::left_right::data_elt::serve_fetch_all(), rpki::left_right::data_elt::serve_fetch_one_maybe(), and rpki::xml_utils::base_elt::startElement().
tuple rpki::left_right::self_elt::elements = ("bpki_cert", "bpki_glue") [static] |
XML elements contained by this element.
Reimplemented from rpki::xml_utils::base_elt.
Definition at line 137 of file left_right.py.
Referenced by irbe_cli::cmd_elt_mixin::client_getopt(), rpki::xml_utils::data_elt::endElement(), rpki::xml_utils::base_elt::startElement(), and rpki::xml_utils::data_elt::toXML().
tuple rpki::left_right::self_elt::handles = () [static] |
Reimplemented from rpki::left_right::data_elt.
Definition at line 143 of file left_right.py.
rpki::left_right::self_elt::regen_margin = None [static] |
Definition at line 147 of file left_right.py.
Referenced by regenerate_crls_and_manifests(), and update_children().
tuple rpki::left_right::self_elt::sql_template [static] |
rpki.sql.template("self", "self_id", "self_handle", "use_hsm", "crl_interval", "regen_margin", ("bpki_cert", rpki.x509.X509), ("bpki_glue", rpki.x509.X509))
Definition at line 140 of file left_right.py.
Referenced by rpki::xml_utils::data_elt::serve_create(), rpki::sql::sql_persistent::sql_decode(), rpki::sql::sql_persistent::sql_delete(), rpki::sql::sql_persistent::sql_encode(), and rpki::sql::sql_persistent::sql_store().
rpki::left_right::self_elt::use_hsm = False [static] |
Definition at line 145 of file left_right.py.