forked from pool/jwt_verify_lib
Accepting request 746420 from home:mrostecki:branches:devel:kubic
- Update to version 20190909: * bazel: Update protobuf to 3.9.1 * Fixed code formatting * Exposing struct_utils for accessing custom JWT fields * Implement RS384/RS512 token verification * Add tests for RS384 and RS512 tokens * Harden JwkRSA verification code * Reduce fuzz truncate case * Fix verify_time_test * one more uint64 * one more uint64_t OBS-URL: https://build.opensuse.org/request/show/746420 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jwt_verify_lib?expand=0&rev=11
This commit is contained in:
committed by
Git OBS Bridge
parent
f70c6a768f
commit
3636a79eff
30
BUILD
30
BUILD
@@ -1,30 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
package(default_visibility = ["//visibility:public"])
|
|
||||||
|
|
||||||
exports_files(["LICENSE"])
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "jwt_verify_lib",
|
|
||||||
srcs = [
|
|
||||||
"src/check_audience.cc",
|
|
||||||
"src/jwks.cc",
|
|
||||||
"src/jwt.cc",
|
|
||||||
"src/status.cc",
|
|
||||||
"src/struct_utils.h",
|
|
||||||
"src/verify.cc",
|
|
||||||
],
|
|
||||||
hdrs = [
|
|
||||||
"jwt_verify_lib/check_audience.h",
|
|
||||||
"jwt_verify_lib/jwks.h",
|
|
||||||
"jwt_verify_lib/jwt.h",
|
|
||||||
"jwt_verify_lib/status.h",
|
|
||||||
"jwt_verify_lib/verify.h",
|
|
||||||
],
|
|
||||||
deps = [
|
|
||||||
"@abseil_strings//:abseil_strings",
|
|
||||||
"@abseil_time//:abseil_time",
|
|
||||||
"@openssl//:openssl-lib",
|
|
||||||
"//external:protobuf",
|
|
||||||
],
|
|
||||||
)
|
|
55
WORKSPACE
55
WORKSPACE
@@ -1,55 +0,0 @@
|
|||||||
local_repository(
|
|
||||||
name = "com_google_protobuf",
|
|
||||||
path = "/usr/src/protobuf",
|
|
||||||
)
|
|
||||||
bind(
|
|
||||||
name = "protobuf",
|
|
||||||
actual = "@com_google_protobuf//:protobuf",
|
|
||||||
)
|
|
||||||
|
|
||||||
local_repository(
|
|
||||||
name = "bazel_skylib",
|
|
||||||
path = "/usr/src/bazel-skylib",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "openssl",
|
|
||||||
path = "/usr/lib64/",
|
|
||||||
build_file = "openssl.BUILD",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "abseil_strings",
|
|
||||||
path = "/usr/lib64/",
|
|
||||||
build_file = "abseil_strings.BUILD",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "abseil_time",
|
|
||||||
path = "/usr/lib64/",
|
|
||||||
build_file = "abseil_time.BUILD",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "bssl_wrapper_lib",
|
|
||||||
path = "/usr/lib64/",
|
|
||||||
build_file = "bsslwrapper.BUILD",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "googletest",
|
|
||||||
path = "/usr/lib64/",
|
|
||||||
build_file = "googletest.BUILD",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "opensslcbs",
|
|
||||||
path = "/usr/lib64/",
|
|
||||||
build_file = "opensslcbs.BUILD",
|
|
||||||
)
|
|
||||||
|
|
||||||
new_local_repository(
|
|
||||||
name = "zlib",
|
|
||||||
path = "/usr/lib64",
|
|
||||||
build_file = "zlib.BUILD",
|
|
||||||
)
|
|
5
_service
5
_service
@@ -5,7 +5,7 @@
|
|||||||
<param name="changesgenerate">enable</param>
|
<param name="changesgenerate">enable</param>
|
||||||
<param name="filename">jwt_verify_lib</param>
|
<param name="filename">jwt_verify_lib</param>
|
||||||
<param name="versionformat">%cd</param>
|
<param name="versionformat">%cd</param>
|
||||||
<param name="revision">0f14d43f20381cfae0469cb2309b2e220c0f0ea3</param>
|
<param name="revision">2866385faa2508a11071d075f788172b3f3bd27f</param>
|
||||||
</service>
|
</service>
|
||||||
<service mode="disabled" name="tar_scm">
|
<service mode="disabled" name="tar_scm">
|
||||||
<param name="url">https://github.com/Maistra/jwt-verify-lib-openssl</param>
|
<param name="url">https://github.com/Maistra/jwt-verify-lib-openssl</param>
|
||||||
@@ -13,11 +13,10 @@
|
|||||||
<param name="changesgenerate">disable</param>
|
<param name="changesgenerate">disable</param>
|
||||||
<param name="filename">jwt-verify-lib-openssl</param>
|
<param name="filename">jwt-verify-lib-openssl</param>
|
||||||
<param name="versionformat">%cd</param>
|
<param name="versionformat">%cd</param>
|
||||||
<param name="revision">55dba200857b7c50d82336d38d556be5807d39b6</param>
|
<param name="revision">maistra-1.1</param>
|
||||||
</service>
|
</service>
|
||||||
<service mode="disabled" name="recompress">
|
<service mode="disabled" name="recompress">
|
||||||
<param name="file">*.tar</param>
|
<param name="file">*.tar</param>
|
||||||
<param name="compression">xz</param>
|
<param name="compression">xz</param>
|
||||||
</service>
|
</service>
|
||||||
<service mode="disabled" name="set_version"/>
|
|
||||||
</services>
|
</services>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">https://github.com/google/jwt_verify_lib</param>
|
<param name="url">https://github.com/google/jwt_verify_lib</param>
|
||||||
<param name="changesrevision">c2a793f4c5c019199dbd7902a48fee07c252664b</param></service></servicedata>
|
<param name="changesrevision">5552dbc736a25da7e264b260d5ba3cedc33a71f8</param></service></servicedata>
|
@@ -1,16 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "abseil_strings",
|
|
||||||
hdrs = glob(["thirdparty_build/include/absl/**/*.h"]),
|
|
||||||
copts = ["-I/usr/include/absl"],
|
|
||||||
linkopts = [
|
|
||||||
"-labsl_base_libbase",
|
|
||||||
"-labsl_base_libthrow_delegate",
|
|
||||||
"-labsl_strings_libinternal",
|
|
||||||
"-labsl_strings_libstr_format_internal",
|
|
||||||
"-labsl_strings_libstrings",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
linkstatic=False,
|
|
||||||
)
|
|
@@ -1,18 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "abseil_time",
|
|
||||||
hdrs = glob(["thirdparty_build/include/absl/**/*.h"]),
|
|
||||||
copts = ["-I/usr/include/absl"],
|
|
||||||
linkopts = [
|
|
||||||
"-labsl_base_libbase",
|
|
||||||
"-labsl_base_libspinlock_wait",
|
|
||||||
"-labsl_numeric_libint128",
|
|
||||||
"-labsl_time_internal_cctz_libcivil_time",
|
|
||||||
"-labsl_time_internal_cctz_libtime_zone",
|
|
||||||
"-labsl_time_libtest_util",
|
|
||||||
"-labsl_time_libtime",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
linkstatic=False,
|
|
||||||
)
|
|
@@ -1,12 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "bssl_wrapper_lib",
|
|
||||||
hdrs = glob(["thirdparty_build/include/bssl_wrapper/**/*.h"]),
|
|
||||||
copts = ["-I/usr/include/bssl_wrapper"],
|
|
||||||
linkopts = [
|
|
||||||
"-lbssl_wrapper_lib",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
linkstatic=False,
|
|
||||||
)
|
|
@@ -1,18 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "googletest",
|
|
||||||
hdrs = glob([
|
|
||||||
"thirdparty_build/include/gmock/**/*.h",
|
|
||||||
"thirdparty_build/include/gtest/**/*.h",
|
|
||||||
]),
|
|
||||||
copts = ["-I/usr/include/gtest"],
|
|
||||||
linkopts = [
|
|
||||||
"-lgmock",
|
|
||||||
"-lgmock_main",
|
|
||||||
"-lgtest",
|
|
||||||
"-lgtest_main",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
linkstatic=False,
|
|
||||||
)
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:142c7b9a28725102338162d3ee28c2ebd43b49dedccef7de978d01cad95b78ea
|
|
||||||
size 10252
|
|
3
jwt-verify-lib-openssl-20190806.tar.xz
Normal file
3
jwt-verify-lib-openssl-20190806.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:470181419a0f2c86fb49d55b424fbe1e526c79666e3a49036878aa0ff06c634b
|
||||||
|
size 10256
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e019232f3db87c1d22fc47bfe176169176031e559c5952738f576ba8aa762c91
|
|
||||||
size 27136
|
|
3
jwt_verify_lib-20190909.tar.xz
Normal file
3
jwt_verify_lib-20190909.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3b9538767925a177d7e536d69f3b9f8adef76b6f1bb0e1395ad1724f1b15ca75
|
||||||
|
size 27648
|
@@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 20 13:06:47 UTC 2019 - mrostecki@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 20190909:
|
||||||
|
* bazel: Update protobuf to 3.9.1
|
||||||
|
* Fixed code formatting
|
||||||
|
* Exposing struct_utils for accessing custom JWT fields
|
||||||
|
* Implement RS384/RS512 token verification
|
||||||
|
* Add tests for RS384 and RS512 tokens
|
||||||
|
* Harden JwkRSA verification code
|
||||||
|
* Reduce fuzz truncate case
|
||||||
|
* Fix verify_time_test
|
||||||
|
* one more uint64
|
||||||
|
* one more uint64_t
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 01 11:20:17 UTC 2019 - mrostecki@opensuse.org
|
Thu Aug 01 11:20:17 UTC 2019 - mrostecki@opensuse.org
|
||||||
|
|
||||||
|
@@ -19,10 +19,10 @@
|
|||||||
%define sover 0
|
%define sover 0
|
||||||
%define libname lib%{name}%{sover}
|
%define libname lib%{name}%{sover}
|
||||||
%define maistra_name jwt-verify-lib-openssl
|
%define maistra_name jwt-verify-lib-openssl
|
||||||
%define maistra_version 20190723
|
%define maistra_version 20190806
|
||||||
|
|
||||||
Name: jwt_verify_lib
|
Name: jwt_verify_lib
|
||||||
Version: 20190708
|
Version: 20190909
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: JSON Web Tokens verification library for C++
|
Summary: JSON Web Tokens verification library for C++
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@@ -30,17 +30,13 @@ Group: Development/Libraries/C and C++
|
|||||||
Url: https://github.com/google/%{name}
|
Url: https://github.com/google/%{name}
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
Source1: %{maistra_name}-%{maistra_version}.tar.xz
|
Source1: %{maistra_name}-%{maistra_version}.tar.xz
|
||||||
Source100: WORKSPACE
|
BuildRequires: abseil-cpp-source
|
||||||
Source101: BUILD
|
BuildRequires: bazel-rules-cc-source
|
||||||
Source200: abseil_strings.BUILD
|
BuildRequires: bazel-rules-java-source
|
||||||
Source201: abseil_time.BUILD
|
BuildRequires: bazel-rules-proto-source
|
||||||
Source202: bsslwrapper.BUILD
|
|
||||||
Source203: googletest.BUILD
|
|
||||||
Source204: opensslcbs.BUILD
|
|
||||||
Source205: zlib.BUILD
|
|
||||||
BuildRequires: abseil-cpp-devel
|
|
||||||
BuildRequires: bazel-skylib-source
|
BuildRequires: bazel-skylib-source
|
||||||
BuildRequires: bazel0.19
|
BuildRequires: bazel-workspaces
|
||||||
|
BuildRequires: bazel0.29
|
||||||
BuildRequires: bssl_wrapper-devel
|
BuildRequires: bssl_wrapper-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gmock
|
BuildRequires: gmock
|
||||||
@@ -79,22 +75,16 @@ This package contains development files for jwt_verify_lib.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -D -b 1 -n %{maistra_name}-%{maistra_version}
|
%setup -q -D -b 1 -n %{maistra_name}-%{maistra_version}
|
||||||
|
|
||||||
%setup -q
|
%setup -q
|
||||||
pushd ../%{maistra_name}-%{maistra_version}
|
pushd ../%{maistra_name}-%{maistra_version}
|
||||||
|
sed -i "s|\"src/struct_utils.h\"|\"jwt_verify_lib/struct_utils.h\"|g" src/jwks.cc
|
||||||
|
sed -i "s|\"src/struct_utils.h\"|\"jwt_verify_lib/struct_utils.h\"|g" src/jwt.cc
|
||||||
./openssl.sh ../%{name}-%{version} SSL
|
./openssl.sh ../%{name}-%{version} SSL
|
||||||
popd
|
popd
|
||||||
cp %{SOURCE100} .
|
|
||||||
cp %{SOURCE101} .
|
|
||||||
cp %{SOURCE200} .
|
|
||||||
cp %{SOURCE201} .
|
|
||||||
cp %{SOURCE202} .
|
|
||||||
cp %{SOURCE203} .
|
|
||||||
cp %{SOURCE204} .
|
|
||||||
cp %{SOURCE205} .
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# TODO(mrostecki): Create a macro in bazel package.
|
# TODO(mrostecki): Create a macro in bazel package.
|
||||||
|
TARGETS=$(bazel query '//... except kind(.*test, //...)')
|
||||||
bazel build \
|
bazel build \
|
||||||
-c dbg \
|
-c dbg \
|
||||||
--color=no \
|
--color=no \
|
||||||
@@ -104,10 +94,17 @@ bazel build \
|
|||||||
--genrule_strategy=standalone \
|
--genrule_strategy=standalone \
|
||||||
--host_javabase=@local_jdk//:jdk \
|
--host_javabase=@local_jdk//:jdk \
|
||||||
--linkopt="-Wl,-soname,libjwt_verify_lib.so.%{sover}" \
|
--linkopt="-Wl,-soname,libjwt_verify_lib.so.%{sover}" \
|
||||||
|
--override_repository="bazel_skylib=/usr/src/bazel-skylib" \
|
||||||
|
--override_repository="com_google_absl=/usr/src/abseil-cpp" \
|
||||||
|
--override_repository="com_google_protobuf=/usr/src/protobuf" \
|
||||||
|
--override_repository="googletest_git=%{_datadir}/bazel-workspaces/googletest" \
|
||||||
|
--override_repository="rules_cc=/usr/src/bazel-rules-cc" \
|
||||||
|
--override_repository="rules_java=/usr/src/bazel-rules-java" \
|
||||||
|
--override_repository="rules_proto=/usr/src/bazel-rules-proto" \
|
||||||
--spawn_strategy=standalone \
|
--spawn_strategy=standalone \
|
||||||
--strip=never \
|
--strip=never \
|
||||||
--verbose_failures \
|
--verbose_failures \
|
||||||
//...
|
${TARGETS}
|
||||||
bazel shutdown
|
bazel shutdown
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "bssl_wrapper_lib",
|
|
||||||
hdrs = glob(["thirdparty_build/include/opensslcbs/**/*.h"]),
|
|
||||||
copts = ["-I/usr/include/opensslcbs"],
|
|
||||||
linkopts = [
|
|
||||||
"-lopenssl_cbs_lib",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
linkstatic=False,
|
|
||||||
)
|
|
13
zlib.BUILD
13
zlib.BUILD
@@ -1,13 +0,0 @@
|
|||||||
licenses(["notice"]) # Apache 2
|
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "zlib",
|
|
||||||
hdrs = glob([
|
|
||||||
"thirdparty_build/include/zconf.h",
|
|
||||||
"thirdparty_build/include/zlib.h",
|
|
||||||
]),
|
|
||||||
copts = [],
|
|
||||||
linkopts = ["-lz"],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
linkstatic=False,
|
|
||||||
)
|
|
Reference in New Issue
Block a user