Draw the actual rest of the fucking owl.
Change-Id: Ia04fb49ebbe3a5afccc57e62f6335e35b45192fe
diff --git a/bgpwtf/cccampix/frontend/frontend.py b/bgpwtf/cccampix/frontend/frontend.py
index 2a6f240..c7558a7 100644
--- a/bgpwtf/cccampix/frontend/frontend.py
+++ b/bgpwtf/cccampix/frontend/frontend.py
@@ -17,6 +17,7 @@
check_info = {
'irr': ('IRR', 'Required IRR entires are present for this AS'),
+ 'pgp': ('PGP', 'The PGP key defined in the IRR entry exists on PGP keyservers'),
}
@@ -55,7 +56,22 @@
return 'Internal server error.'
return render_template('asn.html', details=details, asn=asn, check_info=check_info)
-
+
+ @app.route('/asn/<int:asn>/config.gpg')
+ def view_asn_config(asn):
+ req = ipb.PeerSecretsRequest()
+ req.asn = asn
+
+ details = None
+ try:
+ details = verifier.stub(ipb_grpc.VerifierStub).PeerSecrets(req)
+ except grpc.RpcError as e:
+ if e.code() == grpc.StatusCode.NOT_FOUND:
+ return 'No such ASN.'
+ else:
+ return 'Internal server error.'
+
+ return details.pgp_data, 200, {'Content-Type': 'application/octet-stream'}
@app.template_filter()
def from_nano(v):
diff --git a/bgpwtf/cccampix/frontend/templates/asn.html b/bgpwtf/cccampix/frontend/templates/asn.html
index 0eb3a61..a9fdc78 100644
--- a/bgpwtf/cccampix/frontend/templates/asn.html
+++ b/bgpwtf/cccampix/frontend/templates/asn.html
@@ -102,5 +102,11 @@
{% endfor %}
</table>
</p>
+ <h2>AS{{ asn }} configuration</h2>
+ <p>
+ To get configuration data for your routers, please decode the following GPG secret:
+
+ <pre>curl https://ix-status.bgp.wtf/asn/{{ asn }}/config.gpg | gpg --decrypt</pre>
+ </p>
</body>
</html>