diff options
author | Aravinda VK <avishwan@redhat.com> | 2017-09-18 14:34:54 +0530 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2017-10-25 11:39:49 +0000 |
commit | 9d39bd926006d1b6b4850e8d07f9cc340baa9ed5 (patch) | |
tree | 9efc390ed4b44a5908018be41978c6ccb1d1166e /glusterfs.spec.in | |
parent | 5632750c91f349bb10a0a6e5cded02f5efc5b828 (diff) |
eventsapi: Add JWT signing support
New argument added to accept secret to generate JWT token. This patch
does not affect the backward compatibility.
Usage:
gluster-eventsapi webhook-add <url> [-t <TOKEN>] \
[-s SECRET]
With `--token` argument, Token header will be added as is.
Authorization: Bearer <TOKEN>
In case of shared secret, Gluster will generate JWT token using the
secret and then add it to Authorization header.
Authorization: Bearer <GENERATED_TOKEN>
Secret/Token can be updated using `webhook-mod` command.
Generated token will include the following payload,
{
"iss": "gluster",
"exp": EXPIRY_TIME,
"sub": EVENT_TYPE,
"iat": EVENT_TIME
}
Where: iss - Issuer, exp - Expiry Time, sub - Event Type
used as Subject, iat - Event Time used as Issue Time
BUG: 1501864
Change-Id: Ib6b6fab23fb212d7f5e9bbc9e1416a9e9813ab1b
Signed-off-by: Aravinda VK <avishwan@redhat.com>
(cherry picked from commit add7116efa1f31e86f9c00c72c71872b1161370f)
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r-- | glusterfs.spec.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index f68e38fffe3..8b4fa349e76 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -626,9 +626,9 @@ Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: python2 python-prettytable Requires: python2-gluster = %{version}-%{release} %if ( 0%{?rhel} ) -Requires: python-requests +Requires: python-requests python-jwt %else -Requires: python2-requests +Requires: python2-requests python2-jwt %endif %if ( 0%{?rhel} && 0%{?rhel} < 7 ) Requires: python-argparse |