8
0

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:
Michał Rostecki
2019-11-07 21:11:14 +00:00
committed by Git OBS Bridge
parent f70c6a768f
commit 3636a79eff
16 changed files with 43 additions and 206 deletions

30
BUILD
View File

@@ -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",
],
)

View File

@@ -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",
)

View File

@@ -5,7 +5,7 @@
<param name="changesgenerate">enable</param>
<param name="filename">jwt_verify_lib</param>
<param name="versionformat">%cd</param>
<param name="revision">0f14d43f20381cfae0469cb2309b2e220c0f0ea3</param>
<param name="revision">2866385faa2508a11071d075f788172b3f3bd27f</param>
</service>
<service mode="disabled" name="tar_scm">
<param name="url">https://github.com/Maistra/jwt-verify-lib-openssl</param>
@@ -13,11 +13,10 @@
<param name="changesgenerate">disable</param>
<param name="filename">jwt-verify-lib-openssl</param>
<param name="versionformat">%cd</param>
<param name="revision">55dba200857b7c50d82336d38d556be5807d39b6</param>
<param name="revision">maistra-1.1</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<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>

View File

@@ -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,
)

View File

@@ -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,
)

View File

@@ -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,
)

View File

@@ -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,
)

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:142c7b9a28725102338162d3ee28c2ebd43b49dedccef7de978d01cad95b78ea
size 10252

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:470181419a0f2c86fb49d55b424fbe1e526c79666e3a49036878aa0ff06c634b
size 10256

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e019232f3db87c1d22fc47bfe176169176031e559c5952738f576ba8aa762c91
size 27136

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b9538767925a177d7e536d69f3b9f8adef76b6f1bb0e1395ad1724f1b15ca75
size 27648

View File

@@ -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

View File

@@ -19,10 +19,10 @@
%define sover 0
%define libname lib%{name}%{sover}
%define maistra_name jwt-verify-lib-openssl
%define maistra_version 20190723
%define maistra_version 20190806
Name: jwt_verify_lib
Version: 20190708
Version: 20190909
Release: 0
Summary: JSON Web Tokens verification library for C++
License: Apache-2.0
@@ -30,17 +30,13 @@ Group: Development/Libraries/C and C++
Url: https://github.com/google/%{name}
Source0: %{name}-%{version}.tar.xz
Source1: %{maistra_name}-%{maistra_version}.tar.xz
Source100: WORKSPACE
Source101: BUILD
Source200: abseil_strings.BUILD
Source201: abseil_time.BUILD
Source202: bsslwrapper.BUILD
Source203: googletest.BUILD
Source204: opensslcbs.BUILD
Source205: zlib.BUILD
BuildRequires: abseil-cpp-devel
BuildRequires: abseil-cpp-source
BuildRequires: bazel-rules-cc-source
BuildRequires: bazel-rules-java-source
BuildRequires: bazel-rules-proto-source
BuildRequires: bazel-skylib-source
BuildRequires: bazel0.19
BuildRequires: bazel-workspaces
BuildRequires: bazel0.29
BuildRequires: bssl_wrapper-devel
BuildRequires: gcc-c++
BuildRequires: gmock
@@ -79,22 +75,16 @@ This package contains development files for jwt_verify_lib.
%prep
%setup -q -D -b 1 -n %{maistra_name}-%{maistra_version}
%setup -q
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
popd
cp %{SOURCE100} .
cp %{SOURCE101} .
cp %{SOURCE200} .
cp %{SOURCE201} .
cp %{SOURCE202} .
cp %{SOURCE203} .
cp %{SOURCE204} .
cp %{SOURCE205} .
%build
# TODO(mrostecki): Create a macro in bazel package.
TARGETS=$(bazel query '//... except kind(.*test, //...)')
bazel build \
-c dbg \
--color=no \
@@ -104,10 +94,17 @@ bazel build \
--genrule_strategy=standalone \
--host_javabase=@local_jdk//:jdk \
--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 \
--strip=never \
--verbose_failures \
//...
${TARGETS}
bazel shutdown
%install

View File

@@ -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,
)

View File

@@ -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,
)