Diff of the two buildlogs: -- --- b1/build.log 2023-06-01 17:45:42.712616945 +0000 +++ b2/build.log 2023-06-01 17:53:08.189103985 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Thu Jun 1 05:29:25 -12 2023 -I: pbuilder-time-stamp: 1685640565 +I: Current time: Fri Jun 2 07:45:54 +14 2023 +I: pbuilder-time-stamp: 1685641554 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bookworm-reproducible-base.tgz] I: copying local configuration @@ -16,7 +16,7 @@ I: copying [./ruby-jwt_2.5.0.orig.tar.gz] I: copying [./ruby-jwt_2.5.0-1.debian.tar.xz] I: Extracting source -gpgv: Signature made Wed Nov 30 16:05:35 2022 -12 +gpgv: Signature made Thu Dec 1 18:05:35 2022 +14 gpgv: using EDDSA key 84CFFDC21520F88306EC29D152699AB63F9F2BC3 gpgv: Can't check signature: No public key dpkg-source: warning: cannot verify inline signature for ./ruby-jwt_2.5.0-1.dsc: no acceptable signature found @@ -27,135 +27,167 @@ dpkg-source: info: applying no-pending-tests.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/8609/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/D01_modify_environment starting +debug: Running on ff64a. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Jun 2 07:46 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='bookworm' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="15" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.15(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=6 ' + DIRSTACK=() + DISTRIBUTION=bookworm + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='8820d5a0a6d24b76954b8e5787cc1186' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='8609' - PS1='# ' - PS2='> ' + INVOCATION_ID=a2b822262f0443d2818839463539a3a1 + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=18509 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.ghJ6A7kD/pbuilderrc_rKxd --distribution bookworm --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.ghJ6A7kD/b1 --logfile b1/build.log ruby-jwt_2.5.0-1.dsc' - SUDO_GID='116' - SUDO_UID='112' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.ghJ6A7kD/pbuilderrc_peos --distribution bookworm --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.ghJ6A7kD/b2 --logfile b2/build.log --extrapackages usrmerge ruby-jwt_2.5.0-1.dsc' + SUDO_GID=114 + SUDO_UID=109 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux cbxi4b 5.10.0-23-armmp #1 SMP Debian 5.10.179-1 (2023-05-12) armv7l GNU/Linux + Linux i-capture-the-hostname 5.10.0-23-arm64 #1 SMP Debian 5.10.179-1 (2023-05-12) aarch64 GNU/Linux I: ls -l /bin total 5072 - -rwxr-xr-x 1 root root 838488 Apr 23 09:24 bash - -rwxr-xr-x 3 root root 67144 Sep 18 2022 bunzip2 - -rwxr-xr-x 3 root root 67144 Sep 18 2022 bzcat - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Sep 18 2022 bzdiff - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4893 Nov 27 2021 bzexe - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Sep 18 2022 bzgrep - -rwxr-xr-x 3 root root 67144 Sep 18 2022 bzip2 - -rwxr-xr-x 1 root root 67112 Sep 18 2022 bzip2recover - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Sep 18 2022 bzmore - -rwxr-xr-x 1 root root 67632 Sep 20 2022 cat - -rwxr-xr-x 1 root root 67676 Sep 20 2022 chgrp - -rwxr-xr-x 1 root root 67644 Sep 20 2022 chmod - -rwxr-xr-x 1 root root 67684 Sep 20 2022 chown - -rwxr-xr-x 1 root root 133532 Sep 20 2022 cp - -rwxr-xr-x 1 root root 132868 Jan 5 01:20 dash - -rwxr-xr-x 1 root root 133220 Sep 20 2022 date - -rwxr-xr-x 1 root root 67732 Sep 20 2022 dd - -rwxr-xr-x 1 root root 68104 Sep 20 2022 df - -rwxr-xr-x 1 root root 133632 Sep 20 2022 dir - -rwxr-xr-x 1 root root 59128 Mar 22 21:02 dmesg - lrwxrwxrwx 1 root root 8 Dec 19 01:33 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Dec 19 01:33 domainname -> hostname - -rwxr-xr-x 1 root root 67560 Sep 20 2022 echo - -rwxr-xr-x 1 root root 41 Jan 24 02:43 egrep - -rwxr-xr-x 1 root root 67548 Sep 20 2022 false - -rwxr-xr-x 1 root root 41 Jan 24 02:43 fgrep - -rwxr-xr-x 1 root root 55748 Mar 22 21:02 findmnt - -rwsr-xr-x 1 root root 26208 Mar 22 20:15 fusermount - -rwxr-xr-x 1 root root 128608 Jan 24 02:43 grep - -rwxr-xr-x 2 root root 2346 Apr 9 2022 gunzip - -rwxr-xr-x 1 root root 6447 Apr 9 2022 gzexe - -rwxr-xr-x 1 root root 64220 Apr 9 2022 gzip - -rwxr-xr-x 1 root root 67032 Dec 19 01:33 hostname - -rwxr-xr-x 1 root root 67720 Sep 20 2022 ln - -rwxr-xr-x 1 root root 35132 Mar 22 21:51 login - -rwxr-xr-x 1 root root 133632 Sep 20 2022 ls - -rwxr-xr-x 1 root root 136808 Mar 22 21:02 lsblk - -rwxr-xr-x 1 root root 67800 Sep 20 2022 mkdir - -rwxr-xr-x 1 root root 67764 Sep 20 2022 mknod - -rwxr-xr-x 1 root root 67596 Sep 20 2022 mktemp - -rwxr-xr-x 1 root root 38504 Mar 22 21:02 more - -rwsr-xr-x 1 root root 38496 Mar 22 21:02 mount - -rwxr-xr-x 1 root root 9824 Mar 22 21:02 mountpoint - -rwxr-xr-x 1 root root 133532 Sep 20 2022 mv - lrwxrwxrwx 1 root root 8 Dec 19 01:33 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 2 18:25 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 67608 Sep 20 2022 pwd - lrwxrwxrwx 1 root root 4 Apr 23 09:24 rbash -> bash - -rwxr-xr-x 1 root root 67600 Sep 20 2022 readlink - -rwxr-xr-x 1 root root 67672 Sep 20 2022 rm - -rwxr-xr-x 1 root root 67600 Sep 20 2022 rmdir - -rwxr-xr-x 1 root root 67400 Nov 2 2022 run-parts - -rwxr-xr-x 1 root root 133372 Jan 5 07:55 sed - lrwxrwxrwx 1 root root 4 Jan 5 01:20 sh -> dash - -rwxr-xr-x 1 root root 67584 Sep 20 2022 sleep - -rwxr-xr-x 1 root root 67644 Sep 20 2022 stty - -rwsr-xr-x 1 root root 50800 Mar 22 21:02 su - -rwxr-xr-x 1 root root 67584 Sep 20 2022 sync - -rwxr-xr-x 1 root root 336764 Apr 6 02:25 tar - -rwxr-xr-x 1 root root 67144 Nov 2 2022 tempfile - -rwxr-xr-x 1 root root 133224 Sep 20 2022 touch - -rwxr-xr-x 1 root root 67548 Sep 20 2022 true - -rwxr-xr-x 1 root root 9768 Mar 22 20:15 ulockmgr_server - -rwsr-xr-x 1 root root 22108 Mar 22 21:02 umount - -rwxr-xr-x 1 root root 67572 Sep 20 2022 uname - -rwxr-xr-x 2 root root 2346 Apr 9 2022 uncompress - -rwxr-xr-x 1 root root 133632 Sep 20 2022 vdir - -rwxr-xr-x 1 root root 42608 Mar 22 21:02 wdctl - lrwxrwxrwx 1 root root 8 Dec 19 01:33 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Apr 9 2022 zcat - -rwxr-xr-x 1 root root 1678 Apr 9 2022 zcmp - -rwxr-xr-x 1 root root 6460 Apr 9 2022 zdiff - -rwxr-xr-x 1 root root 29 Apr 9 2022 zegrep - -rwxr-xr-x 1 root root 29 Apr 9 2022 zfgrep - -rwxr-xr-x 1 root root 2081 Apr 9 2022 zforce - -rwxr-xr-x 1 root root 8103 Apr 9 2022 zgrep - -rwxr-xr-x 1 root root 2206 Apr 9 2022 zless - -rwxr-xr-x 1 root root 1842 Apr 9 2022 zmore - -rwxr-xr-x 1 root root 4577 Apr 9 2022 znew -I: user script /srv/workspace/pbuilder/8609/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 838488 Apr 24 11:24 bash + -rwxr-xr-x 3 root root 67144 Sep 19 2022 bunzip2 + -rwxr-xr-x 3 root root 67144 Sep 19 2022 bzcat + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Sep 19 2022 bzdiff + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4893 Nov 28 2021 bzexe + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Sep 19 2022 bzgrep + -rwxr-xr-x 3 root root 67144 Sep 19 2022 bzip2 + -rwxr-xr-x 1 root root 67112 Sep 19 2022 bzip2recover + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Sep 19 2022 bzmore + -rwxr-xr-x 1 root root 67632 Sep 21 2022 cat + -rwxr-xr-x 1 root root 67676 Sep 21 2022 chgrp + -rwxr-xr-x 1 root root 67644 Sep 21 2022 chmod + -rwxr-xr-x 1 root root 67684 Sep 21 2022 chown + -rwxr-xr-x 1 root root 133532 Sep 21 2022 cp + -rwxr-xr-x 1 root root 132868 Jan 6 03:20 dash + -rwxr-xr-x 1 root root 133220 Sep 21 2022 date + -rwxr-xr-x 1 root root 67732 Sep 21 2022 dd + -rwxr-xr-x 1 root root 68104 Sep 21 2022 df + -rwxr-xr-x 1 root root 133632 Sep 21 2022 dir + -rwxr-xr-x 1 root root 59128 Mar 23 23:02 dmesg + lrwxrwxrwx 1 root root 8 Dec 20 03:33 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Dec 20 03:33 domainname -> hostname + -rwxr-xr-x 1 root root 67560 Sep 21 2022 echo + -rwxr-xr-x 1 root root 41 Jan 25 04:43 egrep + -rwxr-xr-x 1 root root 67548 Sep 21 2022 false + -rwxr-xr-x 1 root root 41 Jan 25 04:43 fgrep + -rwxr-xr-x 1 root root 55748 Mar 23 23:02 findmnt + -rwsr-xr-x 1 root root 26208 Mar 23 22:15 fusermount + -rwxr-xr-x 1 root root 128608 Jan 25 04:43 grep + -rwxr-xr-x 2 root root 2346 Apr 10 2022 gunzip + -rwxr-xr-x 1 root root 6447 Apr 10 2022 gzexe + -rwxr-xr-x 1 root root 64220 Apr 10 2022 gzip + -rwxr-xr-x 1 root root 67032 Dec 20 03:33 hostname + -rwxr-xr-x 1 root root 67720 Sep 21 2022 ln + -rwxr-xr-x 1 root root 35132 Mar 23 23:51 login + -rwxr-xr-x 1 root root 133632 Sep 21 2022 ls + -rwxr-xr-x 1 root root 136808 Mar 23 23:02 lsblk + -rwxr-xr-x 1 root root 67800 Sep 21 2022 mkdir + -rwxr-xr-x 1 root root 67764 Sep 21 2022 mknod + -rwxr-xr-x 1 root root 67596 Sep 21 2022 mktemp + -rwxr-xr-x 1 root root 38504 Mar 23 23:02 more + -rwsr-xr-x 1 root root 38496 Mar 23 23:02 mount + -rwxr-xr-x 1 root root 9824 Mar 23 23:02 mountpoint + -rwxr-xr-x 1 root root 133532 Sep 21 2022 mv + lrwxrwxrwx 1 root root 8 Dec 20 03:33 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 3 20:25 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 67608 Sep 21 2022 pwd + lrwxrwxrwx 1 root root 4 Apr 24 11:24 rbash -> bash + -rwxr-xr-x 1 root root 67600 Sep 21 2022 readlink + -rwxr-xr-x 1 root root 67672 Sep 21 2022 rm + -rwxr-xr-x 1 root root 67600 Sep 21 2022 rmdir + -rwxr-xr-x 1 root root 67400 Nov 3 2022 run-parts + -rwxr-xr-x 1 root root 133372 Jan 6 09:55 sed + lrwxrwxrwx 1 root root 9 Jun 2 07:46 sh -> /bin/bash + -rwxr-xr-x 1 root root 67584 Sep 21 2022 sleep + -rwxr-xr-x 1 root root 67644 Sep 21 2022 stty + -rwsr-xr-x 1 root root 50800 Mar 23 23:02 su + -rwxr-xr-x 1 root root 67584 Sep 21 2022 sync + -rwxr-xr-x 1 root root 336764 Apr 7 04:25 tar + -rwxr-xr-x 1 root root 67144 Nov 3 2022 tempfile + -rwxr-xr-x 1 root root 133224 Sep 21 2022 touch + -rwxr-xr-x 1 root root 67548 Sep 21 2022 true + -rwxr-xr-x 1 root root 9768 Mar 23 22:15 ulockmgr_server + -rwsr-xr-x 1 root root 22108 Mar 23 23:02 umount + -rwxr-xr-x 1 root root 67572 Sep 21 2022 uname + -rwxr-xr-x 2 root root 2346 Apr 10 2022 uncompress + -rwxr-xr-x 1 root root 133632 Sep 21 2022 vdir + -rwxr-xr-x 1 root root 42608 Mar 23 23:02 wdctl + lrwxrwxrwx 1 root root 8 Dec 20 03:33 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Apr 10 2022 zcat + -rwxr-xr-x 1 root root 1678 Apr 10 2022 zcmp + -rwxr-xr-x 1 root root 6460 Apr 10 2022 zdiff + -rwxr-xr-x 1 root root 29 Apr 10 2022 zegrep + -rwxr-xr-x 1 root root 29 Apr 10 2022 zfgrep + -rwxr-xr-x 1 root root 2081 Apr 10 2022 zforce + -rwxr-xr-x 1 root root 8103 Apr 10 2022 zgrep + -rwxr-xr-x 1 root root 2206 Apr 10 2022 zless + -rwxr-xr-x 1 root root 1842 Apr 10 2022 zmore + -rwxr-xr-x 1 root root 4577 Apr 10 2022 znew +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -343,7 +375,7 @@ Get: 140 http://deb.debian.org/debian bookworm/main armhf ruby-rspec all 3.12.0c0e1m1s0-1 [5084 B] Get: 141 http://deb.debian.org/debian bookworm/main armhf ruby-simplecov-html all 0.12.3-2 [468 kB] Get: 142 http://deb.debian.org/debian bookworm/main armhf ruby-simplecov all 0.22.0-1 [45.1 kB] -Fetched 46.0 MB in 8s (5858 kB/s) +Fetched 46.0 MB in 4s (11.4 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.11-minimal:armhf. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19324 files and directories currently installed.) @@ -934,8 +966,19 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +usrmerge is already the newest version (35). +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package -I: Running cd /build/ruby-jwt-2.5.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-jwt_2.5.0-1_source.changes +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/A99_set_merged_usr starting +Re-configuring usrmerge... +removed '/etc/unsupported-skip-usrmerge-conversion' +The system has been successfully converted. +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/ruby-jwt-2.5.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-jwt_2.5.0-1_source.changes dpkg-buildpackage: info: source package ruby-jwt dpkg-buildpackage: info: source version 2.5.0-1 dpkg-buildpackage: info: source distribution unstable @@ -964,7 +1007,7 @@ dh_prep -O--buildsystem=ruby dh_auto_install --destdir=debian/ruby-jwt/ -O--buildsystem=ruby dh_ruby --install /build/ruby-jwt-2.5.0/debian/ruby-jwt -/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20230601-17940-3p3tht/gemspec +/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20230602-23470-nvis8s/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on appraisal (>= 0, development) is not recommended use a bounded requirement, such as '~> x.y' @@ -983,7 +1026,7 @@ Name: jwt Version: 2.5.0 File: jwt-2.5.0.gem -/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-jwt/usr/share/rubygems-integration/all /tmp/d20230601-17940-3p3tht/jwt-2.5.0.gem +/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-jwt/usr/share/rubygems-integration/all /tmp/d20230602-23470-nvis8s/jwt-2.5.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/ruby-jwt-2.5.0/debian/ruby-jwt/usr/share/rubygems-integration/all/gems/jwt-2.5.0/lib/jwt.rb /build/ruby-jwt-2.5.0/debian/ruby-jwt/usr/share/rubygems-integration/all/gems/jwt-2.5.0/lib/jwt/algos.rb @@ -1051,556 +1094,556 @@ All examples were filtered out; ignoring {:focus=>true} -Randomized with seed 63559 - -JWT - .decode for JWK usecase - when jwk keys are given as an array - and kid is in the set - is able to decode the token - and kid is not in the set - raises an exception - no keys are found in the set - raises an exception - token does not know the kid - raises an exception - when jwk keys are loaded from JSON with string keys - decodes the token - when JWK features are used manually - is able to decode the token - when jwk keys are loaded using a proc/lambda - decodes the token - mixing algorithms using kid header - when ES384 key is pointed to as ES512 key - fails in some way - when EC key is pointed to as HMAC secret - fails in some way - when HMAC secret is pointed to as RSA public key - fails in some way - when HMAC secret is pointed to as EC public key - fails in some way - when EC key is pointed to as RSA public key - fails in some way - when RSA key is pointed to as HMAC secret - fails in some way - when jwk keys are rotated - decodes the token - -JWT::Algos::Ecdsa - .curve_by_name - when secp256k1 is given - is expected to eq {:algorithm=>"ES256K", :digest=>"sha256"} - when unkown is given - raises an error - when secp521r1 is given - is expected to eq {:algorithm=>"ES512", :digest=>"sha512"} - when prime256v1 is given - is expected to eq {:algorithm=>"ES256", :digest=>"sha256"} - when secp256r1 is given - is expected to eq {:algorithm=>"ES256", :digest=>"sha256"} +Randomized with seed 42841 README.md code test algorithm usage - decodes with HMAC algorithm without secret key decodes with HMAC algorithm with secret key - RSASSA-PSS NONE - ECDSA - RSA EDDSA + RSA + ECDSA + RSASSA-PSS + decodes with HMAC algorithm without secret key claims - iss JWK with thumbprint as kid via type - jti - JWK with thumbprint given in the initializer - find_key + iss sub - required_claims + JWK with thumbprint given in the initializer JWK with thumbprint as kid via symbol - exp - without leeway - with leeway - iat - without leeway - with leeway + jti + required_claims + find_key custom header fields with custom field - nbf + exp with leeway without leeway aud array string + nbf + with leeway + without leeway + iat + with leeway + without leeway The JWK loader example works as expected -JWT::JWK::EC - #export - when keypair with private key is exported - returns a hash with the both parts of the key - when private key is requested - returns a hash with the both parts of the key - when keypair with public key is exported - returns a hash with the public parts of the key - when a custom "kid" is provided - exports it - .new - when a keypair with both keys given - creates an instance of the class - when a keypair with only public key is given - creates an instance of the class - .import - when crv=P-384 - when keypair is private - returns a private key - with a custom "kid" value - imports that "kid" value - when keypair is public - returns a public key - returns a hash with the public parts of the key - when crv=P-521 - when keypair is private - returns a private key - with a custom "kid" value - imports that "kid" value - when keypair is public - returns a public key - returns a hash with the public parts of the key - when crv=P-256K - when keypair is private - returns a private key - with a custom "kid" value - imports that "kid" value - when keypair is public - returns a public key - returns a hash with the public parts of the key - when crv=P-256 - when keypair is private - returns a private key - with a custom "kid" value - imports that "kid" value - when keypair is public - returns a public key - returns a hash with the public parts of the key +JWT::Algos::Ecdsa + .curve_by_name + when prime256v1 is given + is expected to eq {:algorithm=>"ES256", :digest=>"sha256"} + when secp256k1 is given + is expected to eq {:algorithm=>"ES256K", :digest=>"sha256"} + when unkown is given + raises an error + when secp521r1 is given + is expected to eq {:algorithm=>"ES512", :digest=>"sha512"} + when secp256r1 is given + is expected to eq {:algorithm=>"ES256", :digest=>"sha256"} -JWT::Verify - .verify_iat(payload, options) - must raise JWT::InvalidIatError when the iat value is not Numeric - must properly handle integer times - must ignore configured leeway - must allow a valid iat - must raise JWT::InvalidIatError when the iat value is in the future - .verify_iss(payload, options) - when iss is an Array - must allow an array with matching issuer to pass - must raise JWT::InvalidIssuerError when the payload does not include an issuer - must raise JWT::InvalidIssuerError when no matching issuers in array - when iss is a Method instance - must allow a method that returns true to pass - must raise JWT::InvalidIssuerError when the method returns false - must raise JWT::InvalidIssuerError when the payload does not include an issuer - when iss is a RegExp - must raise JWT::InvalidIssuerError when the payload does not include an issuer - must allow a regular expression matching the issuer to pass - must raise JWT::InvalidIssuerError when the regular expression does not match - when iss is a String - must raise JWT::InvalidIssuerError when the configured issuer does not match the payload issuer - must allow a matching issuer to pass - must raise JWT::InvalidIssuerError when the payload does not include an issuer - when iss is a Proc - must raise JWT::InvalidIssuerError when the proc returns false - must allow a proc that returns true to pass - must raise JWT::InvalidIssuerError when the payload does not include an issuer - .verify_expiration(payload, options) - must allow some leeway in the expiration when global leeway is configured - must allow some leeway in the expiration when exp_leeway is configured - must raise JWT::ExpiredSignature when the token has expired - must be expired if the exp claim equals the current time - when leeway is not specified - used a default leeway of 0 - .verify_not_before(payload, options) - must allow some leeway in the token age when nbf_leeway is configured - must raise JWT::ImmatureSignature when the nbf in the payload is in the future - must allow some leeway in the token age when global leeway is configured - .verify_sub(payload, options) - must raise JWT::InvalidSubError when the subjects do not match - must allow a matching sub - .verify_claims - must raise error when verify_jti option is set to true - must skip verification when verify_jti option is set to false - must skip verification when verify_iat option is set to false - must skip verification when verify_sub option is set to false - must skip verification when verify_expiration option is set to false - must raise error when verify_aud option is set to true - must raise error when verify_iss option is set to true - must skip verification when verify_iss option is set to false - must raise error when verify_sub option is set to true - must skip verification when verify_not_before option is set to false - must raise error when verify_expiration option is set to true - must raise error when verify_not_before option is set to true - must raise error when verify_iat option is set to true - must skip verification when verify_aud option is set to false - .verify_required_claims(payload, options) - must raise JWT::MissingRequiredClaim if a required claim is absent - must verify the claims if all required claims are present - .verify_aud(payload, options) - must raise JWT::InvalidAudError when the payload has an array and none match the supplied value - must allow an array with any value matching the one in the options - must allow a singular audience payload matching any value in the options array - must allow an array with any value matching any value in the options array - must raise JWT::InvalidAudError when the singular audience does not match - must allow a matching singular audience to pass - .verify_jti(payload, options) - it should not throw arguement error with 2 args - must raise JWT::InvalidJtiError when the jti is missing - should have payload as second param in proc - must raise JWT::InvalidJtiError when verify_jti proc returns false - true proc should not raise JWT::InvalidJtiError - must raise JWT::InvalidJtiError when the jti is an empty string - must allow any jti when the verfy_jti key in the options is truthy but not a proc +JWT + JWT.configure + yields the configuration + allows configuration to be changed via the block + +JWT::Configuration::JwkConfiguration + .kid_generator_type= + when valid value is passed + sets the generator matching the value + when invalid value is passed + raises ArgumentError JWT should not raise InvalidPayload exception if payload is an array - should not verify token even if the payload has claims should encode string payloads + should not verify token even if the payload has claims + alg: ES512 + should decode a valid token + wrong key should raise JWT::DecodeError + should generate a valid token + wrong key and verify = false should not raise JWT::DecodeError + alg: NONE + should generate a valid token + decoding with verification + specifying the none algorithm + when the claims are valid + should decode the token + when the claims are invalid + should fail to decode the token + without specifying the none algorithm + should fail to decode the token + decoding without verification + should decode a valid token + when none token is and decoding without key and with verification + decodes the token alg: RS512 + should generate a valid token wrong key and verify = false should not raise JWT::DecodeError wrong key should raise JWT::DecodeError - should decode a valid token using algorithm hash string key - should generate a valid token should decode a valid token - alg: HS512256 - wrong secret should raise JWT::DecodeError - wrong secret and verify = false should not raise JWT::DecodeError + should decode a valid token using algorithm hash string key + alg: PS256 + wrong key and verify = false should not raise JWT::DecodeError + wrong key should raise JWT::DecodeError should decode a valid token should generate a valid token - alg: HS512 + alg: ED25519 should generate a valid token - wrong secret should raise JWT::DecodeError - should decode a valid token - wrong secret and verify = false should not raise JWT::DecodeError - a token with invalid Base64 segments - raises JWT::DecodeError - alg: ES384 wrong key and verify = false should not raise JWT::DecodeError should decode a valid token - should generate a valid token wrong key should raise JWT::DecodeError - when token signed with nil and decoded with nil - raises JWT::DecodeError - when none token is and decoding without key and with verification - decodes the token - when token ends with a newline char - ignores the newline and decodes the token - Invalid - raises "No verification key available" error - algorithm should raise NotImplementedError - ECDSA curve_name should raise JWT::IncorrectAlgorithm - when keyfinder given with 2 arguments - decodes the token Verify - when key given as an array with multiple possible keys - should fail if only invalid keys are given - should be able to verify signature when multiple keys given as a parameter - should be able to verify signature when block returns multiple keys + algorithm + should raise JWT::IncorrectAlgorithm on mismatch prior to kid public key network call + should raise JWT::IncorrectAlgorithm on mismatch + should raise JWT::IncorrectAlgorithm when algorithms array does not contain algorithm + token is missing algorithm + should raise JWT::IncorrectAlgorithm + 2-segment token + should raise JWT::IncorrectAlgorithm + no algorithm provided + should use the default decode algorithm issuer claim if verify_iss is set to false (default option) should not raise JWT::InvalidIssuerError + when key given as an array with multiple possible keys + should be able to verify signature when block returns multiple keys + should be able to verify signature when multiple keys given as a parameter + should fail if only invalid keys are given when encoded payload is used to extract key through find_key should be able to verify signature when block returns multiple keys - should be able to verify signature when block returns multiple keys with multiple issuers should be able to find a key using a block with multiple issuers - should be able to find a key using the block passed to decode should be able to verify signature when block returns multiple keys with iss verification should be able to find a key using the block passed to decode with iss verification - algorithm - should raise JWT::IncorrectAlgorithm when algorithms array does not contain algorithm - should raise JWT::IncorrectAlgorithm on mismatch - should raise JWT::IncorrectAlgorithm on mismatch prior to kid public key network call - no algorithm provided - should use the default decode algorithm - token is missing algorithm - should raise JWT::IncorrectAlgorithm - 2-segment token - should raise JWT::IncorrectAlgorithm - alg: ED25519 - wrong key should raise JWT::DecodeError - should decode a valid token + should be able to verify signature when block returns multiple keys with multiple issuers + should be able to find a key using the block passed to decode + a token with invalid Base64 segments + raises JWT::DecodeError + alg: ES256K should generate a valid token wrong key and verify = false should not raise JWT::DecodeError - when keyfinder given with 1 argument - decodes the token - ::JWT.decode with verify_iat parameter - when iat is exactly the same as Time.now and iat is given as floored integer - considers iat valid - when iat is 1 second before Time.now - raises an error - when iat is exactly the same as Time.now and iat is given as a float - considers iat valid - alg: HS256 - wrong secret and verify = false should not raise JWT::DecodeError - wrong secret should raise JWT::DecodeError - should generate a valid token should decode a valid token - alg: EdDSA wrong key should raise JWT::DecodeError + alg: HS384 + wrong secret should raise JWT::DecodeError + wrong secret and verify = false should not raise JWT::DecodeError should generate a valid token - wrong key and verify = false should not raise JWT::DecodeError - should decode a valid token - alg: RS256 - wrong key and verify = false should not raise JWT::DecodeError should decode a valid token + a token with no segments + raises JWT::DecodeError + alg: ES256 should generate a valid token - should decode a valid token using algorithm hash string key + wrong key and verify = false should not raise JWT::DecodeError wrong key should raise JWT::DecodeError - alg: HS384 should decode a valid token - wrong secret and verify = false should not raise JWT::DecodeError - wrong secret should raise JWT::DecodeError - should generate a valid token + when keyfinder given with 1 argument + decodes the token when keyfinder given with 3 arguments decodes the token but does not pass the payload - alg: ES256K + ::JWT.decode with x5c parameter + calls X5cKeyFinder#from to verify the signature and return the payload + alg: ES384 wrong key should raise JWT::DecodeError - should decode a valid token - should generate a valid token wrong key and verify = false should not raise JWT::DecodeError - alg: ES256 should generate a valid token - wrong key and verify = false should not raise JWT::DecodeError should decode a valid token - wrong key should raise JWT::DecodeError + when hmac algorithm is used without secret key + encodes payload when none token is decoded with a key given decodes the token - a token with no segments + a token with not too many segments raises JWT::DecodeError - alg: PS256 - should decode a valid token - wrong key should raise JWT::DecodeError - wrong key and verify = false should not raise JWT::DecodeError + alg: HS512 + wrong secret and verify = false should not raise JWT::DecodeError should generate a valid token + wrong secret should raise JWT::DecodeError + should decode a valid token + algorithm case insensitivity + ignores algorithm casing during encode/decode + raises error for invalid algorithm when the alg value is given as a header parameter - does not override the actual algorithm used should generate the same token - a token with not enough segments - raises JWT::DecodeError + does not override the actual algorithm used + Invalid + algorithm should raise NotImplementedError + raises "No verification key available" error + ECDSA curve_name should raise JWT::IncorrectAlgorithm + payload validation + validates the payload with the ClaimsValidator if the payload is a hash + does not validate the payload if it is not present a token with two segments but does not require verifying raises something else than "Not enough or too many segments" - alg: ES512 + a token with not enough segments + raises JWT::DecodeError + alg: RS256 should decode a valid token + wrong key and verify = false should not raise JWT::DecodeError + should generate a valid token + wrong key should raise JWT::DecodeError + should decode a valid token using algorithm hash string key + alg: PS384 wrong key should raise JWT::DecodeError should generate a valid token wrong key and verify = false should not raise JWT::DecodeError - ::JWT.decode with x5c parameter - calls X5cKeyFinder#from to verify the signature and return the payload - when none token is decoded without verify - decodes the token - alg: PS384 + should decode a valid token + alg: EdDSA + wrong key and verify = false should not raise JWT::DecodeError should generate a valid token wrong key should raise JWT::DecodeError - wrong key and verify = false should not raise JWT::DecodeError should decode a valid token alg: RS384 - wrong key and verify = false should not raise JWT::DecodeError should generate a valid token + should decode a valid token + wrong key and verify = false should not raise JWT::DecodeError wrong key should raise JWT::DecodeError should decode a valid token using algorithm hash string key - should decode a valid token - a token with not too many segments + when keyfinder given with 2 arguments + decodes the token + when token signed with nil and decoded with nil raises JWT::DecodeError - algorithm case insensitivity - ignores algorithm casing during encode/decode - raises error for invalid algorithm - when hmac algorithm is used without secret key - encodes payload - payload validation - does not validate the payload if it is not present - validates the payload with the ClaimsValidator if the payload is a hash + alg: HS512256 + should decode a valid token + wrong secret and verify = false should not raise JWT::DecodeError + should generate a valid token + wrong secret should raise JWT::DecodeError + ::JWT.decode with verify_iat parameter + when iat is exactly the same as Time.now and iat is given as floored integer + considers iat valid + when iat is 1 second before Time.now + raises an error + when iat is exactly the same as Time.now and iat is given as a float + considers iat valid + when token ends with a newline char + ignores the newline and decodes the token alg: PS512 should generate a valid token - wrong key should raise JWT::DecodeError should decode a valid token wrong key and verify = false should not raise JWT::DecodeError - alg: NONE + wrong key should raise JWT::DecodeError + when none token is decoded without verify + decodes the token + alg: HS256 + wrong secret should raise JWT::DecodeError should generate a valid token - decoding without verification - should decode a valid token - decoding with verification - without specifying the none algorithm - should fail to decode the token - specifying the none algorithm - when the claims are invalid - should fail to decode the token - when the claims are valid - should decode the token + wrong secret and verify = false should not raise JWT::DecodeError + should decode a valid token -JWT::JWK +JWT::JWK::RSA .import - creates a ::JWT::JWK::RSA instance - parsed from JSON - creates a ::JWT::JWK::RSA instance from JSON parsed JWK - when keypair with defined kid is imported - returns the predefined kid if jwt_data contains a kid - when keytype is not supported + when private key is included in the data + creates a complete keypair + when keypair is imported with symbol keys + returns a hash with the public parts of the key + when jwk_data is given without e and/or n + raises an error + when keypair is imported with string keys from JSON + returns a hash with the public parts of the key + #export + when private key is requested + returns a hash with the public AND private parts of the key + when unsupported keypair is given raises an error + when keypair with public key is exported + returns a hash with the public parts of the key + when keypair with private key is exported + returns a hash with the public parts of the key + .kid + when kid is given as in a hash parameter + uses the given kid + when kid is given as a String parameter + uses the given kid + when configuration says to use :rfc7638_thumbprint + generates the kid based on the thumbprint .new + when a keypair with both keys given + creates an instance of the class + when a keypair with only public key is given + creates an instance of the class + +JWT::JWK::Thumbprint + #to_s + when example from RFC is given + is expected to eq "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs" when EC key is given - is expected to be a kind of JWT::JWK::EC + is expected to eq "dO52_we59sdR49HsGCpVzlDUQNvT3KxCTGakk4Un8qc" + when HMAC key is given + is expected to eq "wPf4ZF5qlzoFxsGkft4eu1iWcehgAcahZL4XPV4dT-s" + +JWT::Verify + .verify_not_before(payload, options) + must allow some leeway in the token age when nbf_leeway is configured + must allow some leeway in the token age when global leeway is configured + must raise JWT::ImmatureSignature when the nbf in the payload is in the future + .verify_iss(payload, options) + when iss is a Method instance + must raise JWT::InvalidIssuerError when the method returns false + must raise JWT::InvalidIssuerError when the payload does not include an issuer + must allow a method that returns true to pass + when iss is a Proc + must raise JWT::InvalidIssuerError when the payload does not include an issuer + must raise JWT::InvalidIssuerError when the proc returns false + must allow a proc that returns true to pass + when iss is a RegExp + must allow a regular expression matching the issuer to pass + must raise JWT::InvalidIssuerError when the regular expression does not match + must raise JWT::InvalidIssuerError when the payload does not include an issuer + when iss is a String + must raise JWT::InvalidIssuerError when the configured issuer does not match the payload issuer + must allow a matching issuer to pass + must raise JWT::InvalidIssuerError when the payload does not include an issuer + when iss is an Array + must allow an array with matching issuer to pass + must raise JWT::InvalidIssuerError when the payload does not include an issuer + must raise JWT::InvalidIssuerError when no matching issuers in array + .verify_claims + must raise error when verify_iat option is set to true + must raise error when verify_sub option is set to true + must skip verification when verify_expiration option is set to false + must skip verification when verify_iss option is set to false + must raise error when verify_aud option is set to true + must raise error when verify_jti option is set to true + must raise error when verify_expiration option is set to true + must skip verification when verify_aud option is set to false + must skip verification when verify_not_before option is set to false + must raise error when verify_not_before option is set to true + must raise error when verify_iss option is set to true + must skip verification when verify_jti option is set to false + must skip verification when verify_sub option is set to false + must skip verification when verify_iat option is set to false + .verify_aud(payload, options) + must allow an array with any value matching the one in the options + must allow a matching singular audience to pass + must raise JWT::InvalidAudError when the singular audience does not match + must allow an array with any value matching any value in the options array + must raise JWT::InvalidAudError when the payload has an array and none match the supplied value + must allow a singular audience payload matching any value in the options array + .verify_sub(payload, options) + must allow a matching sub + must raise JWT::InvalidSubError when the subjects do not match + .verify_iat(payload, options) + must raise JWT::InvalidIatError when the iat value is in the future + must ignore configured leeway + must properly handle integer times + must raise JWT::InvalidIatError when the iat value is not Numeric + must allow a valid iat + .verify_jti(payload, options) + true proc should not raise JWT::InvalidJtiError + must raise JWT::InvalidJtiError when the jti is missing + must raise JWT::InvalidJtiError when the jti is an empty string + it should not throw arguement error with 2 args + must raise JWT::InvalidJtiError when verify_jti proc returns false + must allow any jti when the verfy_jti key in the options is truthy but not a proc + should have payload as second param in proc + .verify_expiration(payload, options) + must allow some leeway in the expiration when exp_leeway is configured + must raise JWT::ExpiredSignature when the token has expired + must allow some leeway in the expiration when global leeway is configured + must be expired if the exp claim equals the current time + when leeway is not specified + used a default leeway of 0 + .verify_required_claims(payload, options) + must verify the claims if all required claims are present + must raise JWT::MissingRequiredClaim if a required claim is absent + +JWT::JWK::HMAC + #export + when key is exported with private key + returns a hash with the key + when key is exported + returns a hash with the key + .import when secret key is given - is expected to be a kind of JWT::JWK::HMAC + returns a key + with a custom "kid" value + imports that "kid" value + .new + when a secret key given + creates an instance of the class + +JWT::JWK::EC + .new + when a keypair with both keys given + creates an instance of the class + when a keypair with only public key is given + creates an instance of the class + #export + when keypair with private key is exported + returns a hash with the both parts of the key + when private key is requested + returns a hash with the both parts of the key + when keypair with public key is exported + returns a hash with the public parts of the key + when a custom "kid" is provided + exports it + .import + when crv=P-256 + when keypair is private + returns a private key + with a custom "kid" value + imports that "kid" value + when keypair is public + returns a public key + returns a hash with the public parts of the key + when crv=P-256K + when keypair is public + returns a public key + returns a hash with the public parts of the key + when keypair is private + returns a private key + with a custom "kid" value + imports that "kid" value + when crv=P-384 + when keypair is public + returns a public key + returns a hash with the public parts of the key + when keypair is private + returns a private key + with a custom "kid" value + imports that "kid" value + when crv=P-521 + when keypair is public + returns a public key + returns a hash with the public parts of the key + when keypair is private + returns a private key + with a custom "kid" value + imports that "kid" value + +JWT::JWK + .new + when EC key is given + is expected to be a kind of JWT::JWK::EC when kid is given sets the kid when RSA key is given is expected to be a kind of JWT::JWK::RSA - -JWT::X5cKeyFinder - returns the public key from a certificate that is signed by trusted roots and not revoked - CRL - expired - raises an error - not given - raises an error - signature could not be verified with the given trusted roots - raises an error - certificate - signature could not be verified with the given trusted roots - raises an error - expired - raises an error - revoked + when secret key is given + is expected to be a kind of JWT::JWK::HMAC + .import + creates a ::JWT::JWK::RSA instance + when keypair with defined kid is imported + returns the predefined kid if jwt_data contains a kid + when keytype is not supported raises an error - could not be chained to a trusted root certificate - given nil - raises a decode error - given an array - raises a verification error - ::JWT.decode - returns the encoded payload after successful certificate path verification - already parsed certificates - returns the public key from a certificate that is signed by trusted roots and not revoked - -JWT::Configuration::JwkConfiguration - .kid_generator_type= - when invalid value is passed - raises ArgumentError - when valid value is passed - sets the generator matching the value - -JWT - JWT.configure - yields the configuration - allows configuration to be changed via the block + parsed from JSON + creates a ::JWT::JWK::RSA instance from JSON parsed JWK JWT::ClaimsValidator #validate! exp claim it should behave like a NumericDate claim - when exp payload is a float + when exp payload is a Time object + raises error + when exp payload is an integer does not raise error + and key is a string + does not raise error when exp payload is a string raises error and key is a string raises error - when exp payload is a string - raises error - when exp payload is an integer + when exp payload is a float does not raise error - and key is a string - does not raise error - when exp payload is a Time object + when exp payload is a string raises error iat claim it should behave like a NumericDate claim - when iat payload is a float - does not raise error - when iat payload is an integer - does not raise error - and key is a string - does not raise error when iat payload is a string raises error and key is a string raises error - when iat payload is a string - raises error when iat payload is a Time object raises error + when iat payload is an integer + does not raise error + and key is a string + does not raise error + when iat payload is a float + does not raise error + when iat payload is a string + raises error nbf claim it should behave like a NumericDate claim + when nbf payload is a float + does not raise error + when nbf payload is a Time object + raises error when nbf payload is a string raises error when nbf payload is an integer does not raise error and key is a string does not raise error - when nbf payload is a Time object - raises error - when nbf payload is a float - does not raise error when nbf payload is a string raises error and key is a string raises error -JWT::JWK::HMAC - #export - when key is exported with private key - returns a hash with the key - when key is exported - returns a hash with the key - .new - when a secret key given - creates an instance of the class - .import - when secret key is given - returns a key - with a custom "kid" value - imports that "kid" value - -JWT::JWK::Thumbprint - #to_s - when EC key is given - is expected to eq "dO52_we59sdR49HsGCpVzlDUQNvT3KxCTGakk4Un8qc" - when example from RFC is given - is expected to eq "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs" - when HMAC key is given - is expected to eq "wPf4ZF5qlzoFxsGkft4eu1iWcehgAcahZL4XPV4dT-s" +JWT + .decode for JWK usecase + when jwk keys are loaded from JSON with string keys + decodes the token + when jwk keys are rotated + decodes the token + when jwk keys are loaded using a proc/lambda + decodes the token + when jwk keys are given as an array + token does not know the kid + raises an exception + and kid is in the set + is able to decode the token + and kid is not in the set + raises an exception + no keys are found in the set + raises an exception + mixing algorithms using kid header + when HMAC secret is pointed to as EC public key + fails in some way + when HMAC secret is pointed to as RSA public key + fails in some way + when EC key is pointed to as HMAC secret + fails in some way + when RSA key is pointed to as HMAC secret + fails in some way + when ES384 key is pointed to as ES512 key + fails in some way + when EC key is pointed to as RSA public key + fails in some way + when JWK features are used manually + is able to decode the token -JWT::JWK::RSA - .new - when a keypair with both keys given - creates an instance of the class - when a keypair with only public key is given - creates an instance of the class - .kid - when configuration says to use :rfc7638_thumbprint - generates the kid based on the thumbprint - when kid is given as a String parameter - uses the given kid - when kid is given as in a hash parameter - uses the given kid - .import - when jwk_data is given without e and/or n +JWT::X5cKeyFinder + returns the public key from a certificate that is signed by trusted roots and not revoked + ::JWT.decode + returns the encoded payload after successful certificate path verification + already parsed certificates + returns the public key from a certificate that is signed by trusted roots and not revoked + certificate + signature could not be verified with the given trusted roots raises an error - when keypair is imported with symbol keys - returns a hash with the public parts of the key - when keypair is imported with string keys from JSON - returns a hash with the public parts of the key - when private key is included in the data - creates a complete keypair - #export - when keypair with public key is exported - returns a hash with the public parts of the key - when private key is requested - returns a hash with the public AND private parts of the key - when keypair with private key is exported - returns a hash with the public parts of the key - when unsupported keypair is given + revoked + raises an error + could not be chained to a trusted root certificate + given an array + raises a verification error + given nil + raises a decode error + expired + raises an error + CRL + expired + raises an error + signature could not be verified with the given trusted roots + raises an error + not given raises an error -Finished in 7 minutes 3 seconds (files took 9.16 seconds to load) +Finished in 4 minutes 5 seconds (files took 2.51 seconds to load) 304 examples, 0 failures -Randomized with seed 63559 +Randomized with seed 42841 Coverage report generated for RSpec to /build/ruby-jwt-2.5.0/coverage. 752 / 794 LOC (94.71%) covered. @@ -1633,12 +1676,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/18509/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/8609 and its subdirectories -I: Current time: Thu Jun 1 05:45:36 -12 2023 -I: pbuilder-time-stamp: 1685641536 +I: removing directory /srv/workspace/pbuilder/18509 and its subdirectories +I: Current time: Fri Jun 2 07:52:55 +14 2023 +I: pbuilder-time-stamp: 1685641975