Skip to content

Commit

Permalink
GPG: Import documentation removed from the Getting Started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Jun 15, 2024
1 parent bd4a85b commit 7ccaeb0
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
30 changes: 30 additions & 0 deletions plugins/GPG/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@ Usage

Provides authentication based on GPG keys.

First you must associate your GPG key with your Limnoria account. The gpg
add command takes two arguments, key id and key server.

My key is 0x0C207F07B2F32B67 and it's on keyserver pool.sks-keyservers.net
so and now I add it to my bot::

<Mikaela> +gpg add 0x0C207F07B2F32B67 pool.sks-keyservers.net
<Yvzabevn> 1 key imported, 0 unchanged, 0 not imported.

Now I can get token to sign so I can identify::

<Guest45020> +gpg gettoken
<Yvzabevn> Your token is: {03640620-97ea-4fdf-b0c3-ce8fb62f2dc5}. Please sign it with your GPG key, paste it somewhere, and call the 'auth' command with the URL to the (raw) file containing the signature.

Then I follow the instructions and sign my token in terminal::

echo "{03640620-97ea-4fdf-b0c3-ce8fb62f2dc5}"|gpg --clearsign|curl -F 'sprunge=<-' http://sprunge.us

Note that I sent the output to curl with flags to directly send the
clearsigned content to sprunge.us pastebin. Curl should be installed on
most of distributions and comes with msysgit. If you remove the curl part,
you get the output to terminal and can pastebin it to any pastebin of
your choice. Sprunge.us has only plain text and is easy so I used it in
this example.

And last I give the bot link to the plain text signature::

<Guest45020> +gpg auth http://sprunge.us/DUdd
<Yvzabevn> You are now authenticated as Mikaela.

.. _commands-GPG:

Commands
Expand Down
33 changes: 32 additions & 1 deletion plugins/GPG/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,38 @@ def safe_getUrl(url):
'too much time to answer the request.'))

class GPG(callbacks.Plugin):
"""Provides authentication based on GPG keys."""
"""Provides authentication based on GPG keys.
First you must associate your GPG key with your Limnoria account. The gpg
add command takes two arguments, key id and key server.
My key is 0x0C207F07B2F32B67 and it's on keyserver pool.sks-keyservers.net
so and now I add it to my bot::
<Mikaela> +gpg add 0x0C207F07B2F32B67 pool.sks-keyservers.net
<Yvzabevn> 1 key imported, 0 unchanged, 0 not imported.
Now I can get token to sign so I can identify::
<Guest45020> +gpg gettoken
<Yvzabevn> Your token is: {03640620-97ea-4fdf-b0c3-ce8fb62f2dc5}. Please sign it with your GPG key, paste it somewhere, and call the 'auth' command with the URL to the (raw) file containing the signature.
Then I follow the instructions and sign my token in terminal::
echo "{03640620-97ea-4fdf-b0c3-ce8fb62f2dc5}"|gpg --clearsign|curl -F 'sprunge=<-' http://sprunge.us
Note that I sent the output to curl with flags to directly send the
clearsigned content to sprunge.us pastebin. Curl should be installed on
most of distributions and comes with msysgit. If you remove the curl part,
you get the output to terminal and can pastebin it to any pastebin of
your choice. Sprunge.us has only plain text and is easy so I used it in
this example.
And last I give the bot link to the plain text signature::
<Guest45020> +gpg auth http://sprunge.us/DUdd
<Yvzabevn> You are now authenticated as Mikaela.
"""
class key(callbacks.Commands):
@check_gpg_available
def add(self, irc, msg, args, user, keyid, keyserver):
Expand Down

0 comments on commit 7ccaeb0

Please sign in to comment.