Skip to content

Commit

Permalink
Add section for obtaining server API tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jwsi committed May 2, 2020
1 parent 9e1093e commit b8f4e0d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions source/_static/icons/key.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/_static/website/servers/token.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions source/servers/adding-servers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Adding VPN Servers
It is possible to add servers whilst the uh-vpn-server service is running. To do so, one must update
the token store in ``/etc/uh-vpn-server``.

First, an API token for the relevant server must be obtained from the `website`_. Once this is done, it is
necessary to append this token to the token store by following the steps outlined below:
First, an API token for the relevant server must be obtained from the `website`_ by following the
instructions for `obtaining API tokens`_. Once this is done, it is necessary to append this
token to the token store by following the steps outlined below:

.. code-block:: bash
Expand Down Expand Up @@ -40,4 +41,5 @@ configuration has been downloaded and installed:
:alt: Token acceptance

.. _website: https://uh-vpn.com
.. _obtaining API tokens: ../website/servers/api-tokens.html

23 changes: 23 additions & 0 deletions source/website/servers/api-tokens.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Obtaining API Tokens
====================

To use a server defined on the `website`_ with UH VPN Server software it is necessary to obtain an
API token for the server in question. To do this one needs to click the |key_icon| icon next to the
appropriate server in the list of servers on the relevant group page. After clicking, one will
be presented with a modal as shown below:

.. image:: /_static/website/servers/token.png
:width: 400
:alt: Token Modal

One simply needs to copy the token (shown in pink) and follow the `adding servers`_ instructions
in order to link the server software with the UH VPN API.

If a token has been compromised, the "Regenerate" button can be used to create a new token for the
server in question. **This will instantly revoke the old API token**

.. |key_icon| image:: /_static/icons/key.svg
:alt: Key Icon

.. _website: https://uh-vpn.com
.. _adding servers: ../../servers/adding-servers.html
1 change: 1 addition & 0 deletions source/website/servers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ configuration.
creating
editing
deleting
api-tokens

.. _website: https://uh-vpn.com

0 comments on commit b8f4e0d

Please sign in to comment.