RPKI Engine
1.0
|
Public Member Functions | |
def | __init__ |
def | __repr__ |
def | ca_detail |
def | generate |
def | published_callback |
def | regenerate |
def | revoke |
def | self |
def | sql_delete_hook |
def | sql_fetch_hook |
def | sql_insert_hook |
def | update |
def | uri |
def | uri_from_key |
def | uri_tail |
Public Attributes | |
asn | |
gctx | |
ipv4 | |
ipv6 | |
self_id | |
Static Public Attributes | |
ca_detail_id = None | |
cert = None | |
published = None | |
roa = None | |
tuple | sql_template |
Route Origin Authorization.
Definition at line 1337 of file rpki/rpkid.py.
def rpki::rpkid::roa_obj::__init__ | ( | self, | |
gctx = None , |
|||
self_id = None , |
|||
asn = None , |
|||
ipv4 = None , |
|||
ipv6 = None |
|||
) |
Definition at line 1410 of file rpki/rpkid.py.
def rpki::rpkid::roa_obj::__repr__ | ( | self | ) |
Definition at line 1405 of file rpki/rpkid.py.
References rpki::myrpki::roa_request::asn, rpki::resource_set::resource_bag::asn, rpki::left_right::list_resources_elt::asn, asn, rpki::left_right::list_resources_elt::ipv4, rpki::left_right::list_roa_requests_elt::ipv4, ipv4, rpki::left_right::list_resources_elt::ipv6, rpki::left_right::list_roa_requests_elt::ipv6, and ipv6.
def rpki::rpkid::roa_obj::ca_detail | ( | self | ) |
Fetch ca_detail object to which this roa_obj links.
Definition at line 1365 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::ca_detail_id, rpki::rpkid::revoked_cert_obj::ca_detail_id, ca_detail_id, rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, and gctx.
Referenced by generate(), rpki::rpkid::ghostbuster_obj::generate(), regenerate(), revoke(), rpki::rpkid::ghostbuster_obj::revoke(), update(), uri(), rpki::rpkid::ghostbuster_obj::uri(), uri_from_key(), and rpki::rpkid::ghostbuster_obj::uri_from_key().
def rpki::rpkid::roa_obj::generate | ( | self, | |
publisher, | |||
fast = False |
|||
) |
Generate a ROA. At present we have no way of performing a direct lookup from a desired set of resources to a covering certificate, so we have to search. This could be quite slow if we have a lot of active ca_detail objects. Punt on the issue for now, revisit if profiling shows this as a hotspot. Once we have the right covering certificate, we generate the ROA payload, generate a new EE certificate, use the EE certificate to sign the ROA payload, publish the result, then throw away the private key for the EE cert, all per the ROA specification. This implies that generating a lot of ROAs will tend to thrash /dev/random, but there is not much we can do about that. If fast is set, we leave generating the new manifest for our caller to handle, presumably at the end of a bulk operation.
Definition at line 1462 of file rpki/rpkid.py.
References rpki::myrpki::roa_request::asn, rpki::resource_set::resource_bag::asn, rpki::left_right::list_resources_elt::asn, asn, rpki::rpkid::child_cert_obj::ca_detail(), rpki::rpkid::revoked_cert_obj::ca_detail(), ca_detail(), rpki::rpkid::child_cert_obj::ca_detail_id, rpki::rpkid::revoked_cert_obj::ca_detail_id, ca_detail_id, rpki::rpkid::child_cert_obj::cert, cert, rpki::left_right::list_resources_elt::ipv4, rpki::left_right::list_roa_requests_elt::ipv4, ipv4, rpki::left_right::list_resources_elt::ipv6, rpki::left_right::list_roa_requests_elt::ipv6, ipv6, rpki::rpkid::child_cert_obj::published, published, rpki::rpkid::child_cert_obj::published_callback(), published_callback(), roa, rpki::left_right::data_elt::self(), self(), rpki::sql::sql_persistent::sql_store(), rpki::rpkid::child_cert_obj::uri(), uri(), and uri_from_key().
Referenced by regenerate(), rpki::rpkid::ghostbuster_obj::regenerate(), revoke(), rpki::rpkid::ghostbuster_obj::revoke(), update(), and rpki::rpkid::ghostbuster_obj::update().
def rpki::rpkid::roa_obj::published_callback | ( | self, | |
pdu | |||
) |
Check publication result.
Definition at line 1529 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::published, published, and rpki::sql::sql_persistent::sql_mark_dirty().
Referenced by generate(), and rpki::rpkid::ghostbuster_obj::generate().
def rpki::rpkid::roa_obj::regenerate | ( | self, | |
publisher, | |||
fast = False |
|||
) |
Reissue ROA associated with this roa_obj.
Definition at line 1574 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::ca_detail(), rpki::rpkid::revoked_cert_obj::ca_detail(), ca_detail(), generate(), rpki::rpkid::ca_obj::revoke(), rpki::rpkid::ca_detail_obj::revoke(), rpki::rpkid::child_cert_obj::revoke(), rpki::rpkid::revoked_cert_obj::revoke(), and revoke().
Referenced by update(), and rpki::rpkid::ghostbuster_obj::update().
def rpki::rpkid::roa_obj::revoke | ( | self, | |
publisher, | |||
regenerate = False , |
|||
allow_failure = False , |
|||
fast = False |
|||
) |
Withdraw ROA associated with this roa_obj. In order to preserve make-before-break properties without duplicating code, this method also handles generating a replacement ROA when requested. If allow_failure is set, failing to withdraw the ROA will not be considered an error. If fast is set, SQL actions will be deferred, on the assumption that our caller will handle regenerating CRL and manifest and flushing the SQL cache.
Definition at line 1537 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::ca_detail(), rpki::rpkid::revoked_cert_obj::ca_detail(), ca_detail(), rpki::rpkid::child_cert_obj::ca_detail_id, rpki::rpkid::revoked_cert_obj::ca_detail_id, ca_detail_id, rpki::rpkid::child_cert_obj::cert, cert, generate(), roa, rpki::sql::sql_persistent::sql_mark_deleted(), rpki::rpkid::child_cert_obj::uri(), and uri().
Referenced by regenerate(), and rpki::rpkid::ghostbuster_obj::regenerate().
def rpki::rpkid::roa_obj::self | ( | self | ) |
Fetch self object to which this roa_obj links.
Definition at line 1358 of file rpki/rpkid.py.
References rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, gctx, rpki::left_right::data_elt::self_id, and self_id.
Referenced by rpki::left_right::repository_elt::call_pubd(), generate(), rpki::left_right::parent_elt::query_up_down(), rpki::left_right::child_elt::serve_up_down(), update(), and rpki::rpkid::ghostbuster_obj::update().
def rpki::rpkid::roa_obj::sql_delete_hook | ( | self | ) |
Extra SQL delete actions for roa_obj -- handle prefix lists.
Reimplemented from rpki::sql::sql_persistent.
Definition at line 1399 of file rpki/rpkid.py.
Referenced by rpki::sql::sql_persistent::sql_delete().
def rpki::rpkid::roa_obj::sql_fetch_hook | ( | self | ) |
Extra SQL fetch actions for roa_obj -- handle prefix lists.
Reimplemented from rpki::sql::sql_persistent.
Definition at line 1371 of file rpki/rpkid.py.
References rpki::rpkid::ca_obj::gctx, rpki::rpkid::ca_detail_obj::gctx, rpki::rpkid::child_cert_obj::gctx, rpki::rpkid::revoked_cert_obj::gctx, and gctx.
def rpki::rpkid::roa_obj::sql_insert_hook | ( | self | ) |
Extra SQL insert actions for roa_obj -- handle prefix lists.
Reimplemented from rpki::sql::sql_persistent.
Definition at line 1385 of file rpki/rpkid.py.
References rpki::left_right::list_resources_elt::ipv4, rpki::left_right::list_roa_requests_elt::ipv4, ipv4, rpki::left_right::list_resources_elt::ipv6, rpki::left_right::list_roa_requests_elt::ipv6, and ipv6.
Referenced by rpki::sql::sql_persistent::sql_store().
def rpki::rpkid::roa_obj::update | ( | self, | |
publisher, | |||
fast = False |
|||
) |
Bring this roa_obj's ROA up to date if necesssary.
Definition at line 1423 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::ca_detail(), rpki::rpkid::revoked_cert_obj::ca_detail(), ca_detail(), generate(), rpki::left_right::list_resources_elt::ipv4, rpki::left_right::list_roa_requests_elt::ipv4, ipv4, rpki::left_right::list_resources_elt::ipv6, rpki::left_right::list_roa_requests_elt::ipv6, ipv6, regenerate(), roa, rpki::left_right::data_elt::self(), and self().
def rpki::rpkid::roa_obj::uri | ( | self | ) |
Return the publication URI for this roa_obj's ROA.
Definition at line 1590 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::ca_detail(), rpki::rpkid::revoked_cert_obj::ca_detail(), ca_detail(), rpki::rpkid::child_cert_obj::uri_tail(), and uri_tail().
Referenced by rpki::rcynic::rcynic_object::__repr__(), generate(), rpki::rpkid::ghostbuster_obj::generate(), rpki::rcynic::validation_status_element::get_obj(), revoke(), rpki::rpkid::ghostbuster_obj::revoke(), rpki::publication::publication_object_elt::serve_dispatch(), rpki::publication::publication_object_elt::serve_publish(), rpki::publication::publication_object_elt::serve_withdraw(), and rpki::publication::publication_object_elt::uri_to_filename().
def rpki::rpkid::roa_obj::uri_from_key | ( | self, | |
key | |||
) |
Return publication URI for a public key.
Definition at line 1583 of file rpki/rpkid.py.
References rpki::rpkid::child_cert_obj::ca_detail(), rpki::rpkid::revoked_cert_obj::ca_detail(), and ca_detail().
Referenced by generate(), and rpki::rpkid::ghostbuster_obj::generate().
def rpki::rpkid::roa_obj::uri_tail | ( | self | ) |
Return the tail (filename portion) of the publication URI for this roa_obj's ROA.
Definition at line 1597 of file rpki/rpkid.py.
Referenced by uri(), and rpki::rpkid::ghostbuster_obj::uri().
Definition at line 1410 of file rpki/rpkid.py.
Referenced by __repr__(), and generate().
rpki::rpkid::roa_obj::ca_detail_id = None [static] |
Definition at line 1352 of file rpki/rpkid.py.
Referenced by ca_detail(), rpki::rpkid::ghostbuster_obj::ca_detail(), generate(), rpki::rpkid::ca_detail_obj::ghostbusters(), rpki::rpkid::ca_detail_obj::issue(), revoke(), rpki::rpkid::ca_detail_obj::revoked_certs(), and rpki::rpkid::ca_detail_obj::roas().
rpki::rpkid::roa_obj::cert = None [static] |
Definition at line 1353 of file rpki/rpkid.py.
Referenced by generate(), rpki::rpkid::ghostbuster_obj::generate(), revoke(), and rpki::rpkid::ghostbuster_obj::revoke().
Reimplemented from rpki::sql::sql_persistent.
Definition at line 1410 of file rpki/rpkid.py.
Referenced by rpki::left_right::data_elt::bsc(), rpki::left_right::self_elt::bscs(), ca_detail(), rpki::rpkid::ghostbuster_obj::ca_detail(), rpki::left_right::child_elt::ca_from_class_name(), rpki::left_right::repository_elt::call_pubd(), rpki::left_right::parent_elt::cas(), rpki::left_right::self_elt::children(), rpki::left_right::bsc_elt::children(), rpki::left_right::child_elt::fetch_child_certs(), rpki::left_right::self_elt::ghostbusters(), rpki::left_right::data_elt::make_reply_clone_hook(), rpki::left_right::self_elt::parents(), rpki::left_right::bsc_elt::parents(), rpki::left_right::repository_elt::parents(), rpki::left_right::child_elt::parents(), rpki::left_right::parent_elt::query_up_down(), rpki::left_right::self_elt::repositories(), rpki::left_right::bsc_elt::repositories(), rpki::left_right::parent_elt::repository(), rpki::left_right::self_elt::roas(), rpki::left_right::data_elt::self(), self(), rpki::rpkid::ghostbuster_obj::self(), rpki::left_right::list_published_objects_elt::serve_dispatch(), rpki::left_right::list_received_resources_elt::serve_dispatch(), rpki::left_right::data_elt::serve_fetch_all(), rpki::publication::client_elt::serve_fetch_all(), rpki::left_right::self_elt::serve_fetch_all(), rpki::left_right::data_elt::serve_fetch_one_maybe(), rpki::publication::config_elt::serve_fetch_one_maybe(), rpki::publication::client_elt::serve_fetch_one_maybe(), rpki::left_right::self_elt::serve_fetch_one_maybe(), rpki::left_right::data_elt::serve_pre_save_hook(), rpki::publication::config_elt::serve_set(), rpki::left_right::child_elt::serve_up_down(), rpki::sql::sql_persistent::sql_delete(), sql_fetch_hook(), rpki::sql::sql_persistent::sql_is_dirty(), rpki::sql::sql_persistent::sql_store(), rpki::left_right::self_elt::update_ghostbusters(), rpki::left_right::self_elt::update_roas(), and rpki::publication::publication_object_elt::uri_to_filename().
Definition at line 1410 of file rpki/rpkid.py.
Referenced by __repr__(), generate(), sql_insert_hook(), and update().
Definition at line 1410 of file rpki/rpkid.py.
Referenced by __repr__(), generate(), sql_insert_hook(), and update().
rpki::rpkid::roa_obj::published = None [static] |
Definition at line 1355 of file rpki/rpkid.py.
Referenced by generate(), rpki::rpkid::ghostbuster_obj::generate(), published_callback(), and rpki::rpkid::ghostbuster_obj::published_callback().
rpki::rpkid::roa_obj::roa = None [static] |
Definition at line 1354 of file rpki/rpkid.py.
Referenced by generate(), revoke(), and update().
Definition at line 1410 of file rpki/rpkid.py.
Referenced by rpki::left_right::self_elt::bscs(), rpki::left_right::child_elt::ca_from_class_name(), rpki::left_right::self_elt::children(), rpki::left_right::self_elt::cron(), rpki::left_right::self_elt::ghostbusters(), rpki::left_right::self_elt::parents(), rpki::left_right::child_elt::parents(), rpki::left_right::self_elt::repositories(), rpki::left_right::self_elt::roas(), self(), rpki::rpkid::ghostbuster_obj::self(), rpki::left_right::self_elt::serve_run_now(), rpki::left_right::self_elt::update_ghostbusters(), and rpki::left_right::self_elt::update_roas().
tuple rpki::rpkid::roa_obj::sql_template [static] |
rpki.sql.template( "roa", "roa_id", "ca_detail_id", "self_id", "asn", ("roa", rpki.x509.ROA), ("cert", rpki.x509.X509), ("published", rpki.sundial.datetime))
Definition at line 1342 of file rpki/rpkid.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().