From 9d39bd926006d1b6b4850e8d07f9cc340baa9ed5 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Mon, 18 Sep 2017 14:34:54 +0530 Subject: 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 [-t ] \ [-s SECRET] With `--token` argument, Token header will be added as is. Authorization: Bearer In case of shared secret, Gluster will generate JWT token using the secret and then add it to Authorization header. Authorization: Bearer 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 (cherry picked from commit add7116efa1f31e86f9c00c72c71872b1161370f) --- glusterfs.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'glusterfs.spec.in') 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 -- cgit