aboutsummaryrefslogtreecommitdiff
path: root/doc/doc.RPKI.CA.UI.GUI
blob: d52e0a6bfcb064a194b880c87f1ca8c3fa5bbf89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
****** GUI Installation ******

These steps assume that you have already installed and configured the other CA
tools.

rpki-manage is a shell script wrapper around the django-admin command which
sets $PYTHONPATH and $DJANGO_SETTINGS_MODULE.

***** Prerequisites *****

* Django

* Django South

* Apache 2

* mod_wsgi 3

***** Upgrading from a Previous Release *****

If you had previously installed the web portal before the database migration
support was added, you will need to take some additional steps.

**** Edit settings.py ****

You will need to edit /usr/local/etc/rpki/settings.py and edit the
INSTALLED_APPS list to include 'south'.

**** Sync databases ****

  $ rpki-manage syncdb

**** Database Migration ****

If you have not previously run the new database migration step, you will need
to run this command. Note that you only need to run this command the first time
you upgrade.

  $ rpki-manage migrate app 0001 --fake

Now bring your database up to date with the current release:

  $ rpki-manage migrate app

***** New Installation *****

**** Create the initial tables ****

  $ rpki-manage syncdb

Answer "yes" when asked if you want to create superuser Enter username for
superuser Enter password

If you need to create superuser at a later time, you can run

  $ rpki-manage createsuperuser

If you need to change superuser's password

  $ rpki-manage changepassword <username>

**** Perform Database Migration ****

If there were any changes to the database schema, this command will bring your
existing database up to date with the current software.

  $ rpki-manage migrate app

***** Configure Apache *****

Now configure apache, using /usr/local/etc/rpki/apache.conf, e.g.

  $ cp apache.conf /usr/local/etc/apache22/Includes/rpki.conf

You can put it in a virtual host if you wish.

Restart apache

  $ apachectl restart

Go to the URL for your web server and enter the superuser and password in login
form.

If you've only done the above bootstrap, there will only be a single handle to
manage, so the GUI will automatically bring you to the dashboard for that
handle.

****** Installation of Route Views Support for the GUI ******

If you want ROA creation to tell the user what routes are in the global routing
table for what they are about to create,

Be sure you have curl installed. On FreeBSD it is in /usr/ports/ftp/curl

Install a script such as the following as /usr/locl/bin/do-routeviews

  #!/bin/sh
  # Fetch the full bgp dump from routeviews.org and update the web
  # portal's database
  i=oix-full-snapshot-latest.dat.bz2
  o=/tmp/$i
  curl -s -S -o $o http://archive.routeviews.org/oix-route-views/$i
  if [ $? -eq 0 ]; then
     /usr/local/sbin/rpkigui-import-routes -l error $o
  fi

and create an entry in root's crontab such as

  30  */2 *   *   *   root    /usr/local/sbin/do-routeviews

If you want the GUI's "routes" page to see ROAs when you click those buttons,
you will need to run rcynic. see the instructions for setting up rcynic.

If you are running rootd, you may want to run with only your local trust
anchor. In this case, to have the GUI be fairly responsive to changes, you may
want to run the rcynic often. In this case, you may want to look at the value
of jitter in rcynic.conf.

In addition, your rcynic script should also have

  /usr/local/sbin/rpkigui-rcynic -l error

after the rcynic run.

****** GUI Installation to Work With rootd ******

Some of the commands depend on whether your are upgrading your existing
database, or starting a new installation from scratch.

[All users] First step is you will need to install Django South. For FreeBSD
this is /usr/ports/databases/py-south.

The code is currently in the tk316 branch, so in order to play, you will need
to check it out:

  $ svn co https://subvert-rpki.hactrn.net/branches/tk316
  $ cd tk316
  $ ./configure
  $ make
  $ make install

[Upgrading users] You will need to edit /usr/local/etc/rpki/settings.py and add
'south' to the INSTALLED_APPS list. See /usr/local/etc/rpki/settings.py.new for
an example (we don't automatically overwrite settings.py).

[All users] Run syncdb:

  $ django-admin syncdb --pythonpath=/usr/local/etc/rpki --settings=settings

Verify that Django South is installed:

  $ django-admin migrate --list --pythonpath=/usr/local/etc/rpki --
  settings=settings

[Upgrading Users] Since you already have an existing db, you need to fake doing
the initial migration step:

  $ django-admin migrate app 0001 --fake --pythonpath=/usr/local/etc/rpki --
  settings=settings

[All users] Perform the database migrations new to this release:

  $ django-admin migrate app --pythonpath=/usr/local/etc/rpki --
  settings=settings

[All users] Restart apache so that the web portal picks up the newly installed
code:

  $ apachectl restart

Now head back to the gui. Click on the 'refresh' link when viewing the altCA
dashboard, and it should now pick up the resources from the root cert.

****** Using the GUI ******

****** GUI Examples ******

***** Logging in to the GUI *****

 01-login.jpg

***** The Dashboard - Let's Make a ROA *****

 02-dashboard.jpg

***** ROA List Currently Empty, So Let's Create One *****

 03-roas.jpg

***** Choose an AS and Prefix - Let MaxLen? Default *****

 04-create-roa.jpg

***** What Will the Consequences Be? - Confirm OK *****

 05-are-you-sure.jpg

***** Now We Can See ROAs - Let's Look at Routes *****

      06-roa-list.jpg

***** Real Effect on Routing Table *****

 07-route view.jpg

***** Ghostbusters etc. are Similar *****