diff options
author | Aravinda VK <avishwan@redhat.com> | 2017-09-18 14:34:54 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2017-10-13 11:17:39 +0000 |
commit | add7116efa1f31e86f9c00c72c71872b1161370f (patch) | |
tree | 985b495eda9fd698d2eda1982c4013301bc6c4ef /glusterfs.spec.in | |
parent | 3dce15e10c263e8e071b26046568e0a171a3153d (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: 1496363
Change-Id: Ib6b6fab23fb212d7f5e9bbc9e1416a9e9813ab1b
Signed-off-by: Aravinda VK <avishwan@redhat.com>
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 8cea677bfaf..db4669a24af 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 |