ba46e78
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
116723e
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
116723e
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %{_sysconfdir}/httpd/conf.d}}
4a40cff
8f2cd88
# Optionally build with hiredis if --with hiredis is passed
8f2cd88
%{!?_with_hiredis: %{!?_without_hiredis: %global _without_hiredis --without-hiredis}}
8f2cd88
# It is an error if both or neither required options exist.
8f2cd88
%{?_with_hiredis: %{?_without_hiredis: %{error: both _with_hiredis and _without_hiredis}}}
8f2cd88
%{!?_with_hiredis: %{!?_without_hiredis: %{error: neither _with_hiredis nor _without_hiredis}}}
8f2cd88
4a40cff
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
4a40cff
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
4a40cff
116723e
%global httpd_pkg_cache_dir /var/cache/httpd/mod_auth_openidc
116723e
e8ecf18
Name:		mod_auth_openidc
bd27bc3
Version:	2.4.15.7
39fda41
Release:	1%{?dist}
e8ecf18
Summary:	OpenID Connect auth module for Apache HTTP Server
e8ecf18
080d0fc
License:	Apache-2.0
4087182
URL:		https://github.com/OpenIDC/mod_auth_openidc
24ddf4a
Source0:	https://github.com/OpenIDC/mod_auth_openidc/releases/download/v%{version}/mod_auth_openidc-%{version}.tar.gz
4309441
0b5e109
BuildRequires: make
Igor Gnatenko 83e0e75
BuildRequires:  gcc
e8ecf18
BuildRequires:	httpd-devel
e8ecf18
BuildRequires:	openssl-devel
e8ecf18
BuildRequires:	curl-devel
e8ecf18
BuildRequires:	jansson-devel
118e046
BuildRequires:	pcre2-devel
e8ecf18
BuildRequires:	autoconf
e8ecf18
BuildRequires:	automake
58df408
BuildRequires:	cjose-devel
58df408
BuildRequires:	jq-devel
58df408
%{?_with_hiredis:BuildRequires: hiredis-devel}
e8ecf18
Requires:	httpd-mmn = %{_httpd_mmn}
e8ecf18
e8ecf18
%description
e8ecf18
This module enables an Apache 2.x web server to operate as
e8ecf18
an OpenID Connect Relying Party and/or OAuth 2.0 Resource Server.
e8ecf18
e8ecf18
%prep
e8ecf18
%setup -q
e8ecf18
e8ecf18
%build
e8ecf18
# workaround rpm-buildroot-usage
e8ecf18
export MODULES_DIR=%{_httpd_moddir}
606914d
export APXS2_OPTS='-S LIBEXECDIR=${MODULES_DIR}'
f9aa33b
autoreconf -vfi
8f2cd88
%configure \
58df408
  --with-jq=/usr/lib64/ \
8f2cd88
  %{?_with_hiredis} \
44b9091
  %{?_without_hiredis} \
44b9091
  --with-apxs2=%{_httpd_apxs}
8f2cd88
0d28b81
%{make_build}
e8ecf18
7b73cce
# (jhrozek): temporarily disable make check to work around a FTBFS issue
24ddf4a
%check
24ddf4a
export MODULES_DIR=%{_httpd_moddir}
24ddf4a
export APXS2_OPTS='-S LIBEXECDIR=${MODULES_DIR}'
24ddf4a
%{make_build} test
606914d
e8ecf18
%install
e8ecf18
mkdir -p $RPM_BUILD_ROOT%{_httpd_moddir}
f9aa33b
make install DESTDIR=$RPM_BUILD_ROOT MODULES_DIR=$RPM_BUILD_ROOT%{_httpd_moddir}
e8ecf18
e8ecf18
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_modconfdir}
e8ecf18
echo 'LoadModule auth_openidc_module modules/mod_auth_openidc.so' > \
e8ecf18
	$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-auth_openidc.conf
e8ecf18
116723e
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_confdir}
116723e
install -m 644 auth_openidc.conf $RPM_BUILD_ROOT%{_httpd_confdir}
116723e
# Adjust httpd cache location in install config file
116723e
sed -i 's!/var/cache/apache2/!/var/cache/httpd/!' $RPM_BUILD_ROOT%{_httpd_confdir}/auth_openidc.conf
116723e
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}
116723e
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/metadata
116723e
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/cache
116723e
116723e
e8ecf18
%files
4a40cff
%if 0%{?rhel} && 0%{?rhel} < 7
4a40cff
%doc LICENSE.txt
4a40cff
%else
e8ecf18
%license LICENSE.txt
4a40cff
%endif
e8ecf18
%doc ChangeLog
116723e
%doc AUTHORS
116723e
%doc README.md
e8ecf18
%{_httpd_moddir}/mod_auth_openidc.so
e8ecf18
%config(noreplace) %{_httpd_modconfdir}/10-auth_openidc.conf
116723e
%config(noreplace) %{_httpd_confdir}/auth_openidc.conf
116723e
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}
116723e
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/metadata
116723e
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/cache
e8ecf18
e8ecf18
%changelog
bd27bc3
* Fri Mar 15 2024 Tomas Halman <thalman@redhat.com> - 2.4.15.7-1
bd27bc3
  Rebase to version 2.4.15.7
bd27bc3
- Resolves: rhbz#2272582 - mod_auth_openidc-2.4.15.7 is available
bd27bc3
a0126b7
* Fri Mar 15 2024 Tomas Halman <thalman@redhat.com> - 2.4.15.6-1
a0126b7
  Rebase to version 2.4.15.6
a0126b7
- Resolves: rhbz#2269234 - mod_auth_openidc-2.4.15.4 is available
a0126b7
ba64417
* Thu Feb 22 2024 Tomas Halman <thalman@redhat.com> - 2.4.15.3-1
ba64417
  Rebase to version 2.4.15.3
ba64417
- Resolves: rhbz#2262055 - mod_auth_openidc-2.4.15.3 is available
ba64417
39fda41
* Thu Jan 25 2024 Tomas Halman <thalman@redhat.com> - 2.4.15-1
39fda41
  Rebase to version 2.4.15
39fda41
- Resolves: rhbz#2244098 - mod_auth_openidc-2.4.15 is available
39fda41
afd73c9
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.14.3-3
afd73c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
afd73c9
6f3369f
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.14.3-2
6f3369f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
6f3369f
24ddf4a
* Thu Oct 5 2023 Tomas Halman <thalman@redhat.com> - 2.4.14.3-1
24ddf4a
  Rebase to 2.4.14.3 version
24ddf4a
- Resolves: rhbz#2204524 - mod_auth_openidc-2.4.14.3 is available
24ddf4a
28b6996
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.13.2-2
28b6996
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
28b6996
3231df7
* Wed Apr 5 2023 Tomas Halman <thalman@redhat.com> - 2.4.13.2-1
3231df7
  Rebase to 2.4.13.2 version
3231df7
- Resolves: rhbz#2184157 - mod_auth_openidc-2.4.13.2 is available
3231df7
4087182
* Tue Mar 21 2023 Tomas Halman <thalman@redhat.com> - 2.4.13.1-1
4087182
  Rebase to 2.4.13.1 version
3231df7
- Resolves: rhbz#2177413 - mod_auth_openidc-2.4.13.1 is available
4087182
080d0fc
* Tue Mar 7 2023 Tomas Halman <thalman@redhat.com> - 2.4.12.3-2
080d0fc
  migrated to SPDX license
080d0fc
080d0fc
* Tue Feb 28 2023 Tomas Halman <thalman@redhat.com> - 2.4.12.3-1
080d0fc
  Rebase to 2.4.12.3 version
e53f554
- Resolves: rhbz#2164064 - mod_auth_openidc-2.4.12.3 is available
e53f554
0fa92b4
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.12.2-2
0fa92b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
0fa92b4
bb737e4
* Fri Dec 16 2022 Tomas Halman <thalman@redhat.com> - 2.4.12.2-1
bb737e4
  Rebase to 2.4.12.2 version
bb737e4
- Resolves: rhbz#2153658 - CVE-2022-23527 mod_auth_openidc: Open Redirect in
bb737e4
  oidc_validate_redirect_url() using tab character
bb737e4
118e046
* Thu Sep 22 2022 Tomas Halman <thalman@redhat.com> - 2.4.11.2-3
118e046
- Resolves: rhbz#2128328 - Port pcre dependency to pcre2
118e046
e08a253
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.11.2-2
e08a253
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
e08a253
3dd74ac
* Thu Jun 23 2022 Tomas Halman <thalman@redhat.com> - 2.4.11.2-1
3dd74ac
- Resolves: rhbz#2082376 - New version 2.4.11.2 available
3dd74ac
882aacf
* Mon Apr 11 2022 Tomas Halman <thalman@redhat.com> - 2.4.11.1-1
882aacf
- Resolves: rhbz#1996926 - New version 2.4.11.1 available
882aacf
0892d59
* Thu Mar 31 2022 Tomas Halman <thalman@redhat.com> - 2.4.9.4-1
0892d59
- Resolves: rhbz#2001647 - CVE-2021-39191 mod_auth_openidc: open redirect
0892d59
                           by supplying a crafted URL in the target_link_uri
0892d59
                           parameter
0892d59
a4c7d36
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.9.1-3
a4c7d36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
a4c7d36
dfdef53
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2.4.9.1-2
dfdef53
- Rebuilt with OpenSSL 3.0.0
dfdef53
2601165
* Wed Aug 18 2021 Jakub Hrozek <jhrozek@redhat.com> - 2.4.9.1-1
2601165
- New upstream release
2601165
- Resolves: rhbz#1993566 - mod_auth_openidc-2.4.9.1 is available
2601165
0faec83
* Fri Jul 30 2021 Jakub Hrozek <jhrozek@redhat.com> - 2.4.9-1
0faec83
- Resolves: rhbz#1985153 - mod_auth_openidc-2.4.9 is available
0faec83
- Resolves: rhbz#1986103 - CVE-2021-32786 mod_auth_openidc: open redirect
0faec83
                           in oidc_validate_redirect_url()
0faec83
- Resolves: rhbz#1986396 - CVE-2021-32791 mod_auth_openidc: hardcoded
0faec83
                           static IV and AAD with a reused key in AES GCM
0faec83
                           encryption
0faec83
- Resolves: rhbz#1986398 - CVE-2021-32792 mod_auth_openidc: XSS when using
0faec83
                           OIDCPreservePost On
0faec83
f649006
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.8.4-2
f649006
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f649006
d9a5b32
* Wed Jun  2 2021 Jakub Hrozek <jhrozek@redhat.com> - 2.4.8.3-1
d9a5b32
- New upstream release
d9a5b32
- Resolves: rhbz#1966756 - mod_auth_openidc-2.4.8.3 is available
d9a5b32
91012a1
* Mon May 10 2021 Jakub Hrozek <jhrozek@redhat.com> - 2.4.8.2-1
91012a1
- New upstream release
91012a1
- Resolves: rhbz#1958466 - mod_auth_openidc-2.4.8.2 is available
91012a1
91012a1
* Thu May  6 2021 Jakub Hrozek <jhrozek@redhat.com> - 2.4.7.2-1
967ce02
- New upstream release
967ce02
- Resolves: rhbz#1900913 - mod_auth_openidc-2.4.7.2 is available
967ce02
fdc3d43
* Fri Apr 30 2021 Tomas Halman <thalman@redhat.com> - 2.4.4.1-3
fdc3d43
- Remove unnecessary LTO patch
fdc3d43
7b73cce
* Fri Feb 26 2021 Jakub Hrozek <jhrozek@redhat.com> - 2.4.4.1-1
7b73cce
- Temporarily disable check to get around a FTBFS issue (#1923374)
7b73cce
048d853
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4.1-2
048d853
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
048d853
5f2d016
* Fri Sep  4 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.4.4.1-1
5f2d016
- New upstream version 2.4.4.1
5f2d016
9c3383f
* Tue Sep  1 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.4.4-1
9c3383f
- New upstream version 2.4.4
9c3383f
44b9091
* Thu Aug 27 2020 Joe Orton <jorton@redhat.com> - 2.4.3-5
44b9091
- update to use correct apxs via _httpd_apxs macro
44b9091
c322ab1
* Thu Aug 27 2020 Joe Orton <jorton@redhat.com> - 2.4.3-4
c322ab1
- work around LTO build failure
c322ab1
c26febf
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-3
c26febf
- Second attempt - Rebuilt for
c26febf
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c26febf
6a5f203
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
6a5f203
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6a5f203
d53cc08
* Tue Jul 14 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.4.3
d53cc08
- New upstream version 2.4.3
d53cc08
53a2ed4
* Sun May 10 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.4.2.1-1
53a2ed4
- New upstream version 2.4.2.1
53a2ed4
- Resolves: rhbz#1805104 - CVE-2019-20479 mod_auth_openidc: open redirect
53a2ed4
                           issue exists in URLs with slash and backslash
53a2ed4
                           [fedora-all]
53a2ed4
- Resolves: rhbz#1816883 - mod_auth_openidc-2.4.2.1 is available
53a2ed4
0d28b81
* Thu Feb 13 2020 Tom Stellard <tstellar@redhat.com> - 2.4.1-2
0d28b81
- Use make_build macro instead of just make
0d28b81
- https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make
0d28b81
7a678fa
* Mon Feb  3 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.4.1-1
7a678fa
- New upstream version 2.4.1
7a678fa
edda6ed
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0.4-2
edda6ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
edda6ed
275c072
* Thu Nov 21 2019 Jakub Hrozek <jhrozek@redhat.com> - 2.4.0.4-1
275c072
- New upstream version 2.4.0.4
275c072
9401a5f
* Fri Oct  4 2019 Jakub Hrozek <jhrozek@redhat.com> - 2.4.0.3-1
3f459f3
- New upstream version 2.4.0.3
3f459f3
0594cbb
* Fri Aug 23 2019 Jakub Hrozek <jhrozek@redhat.com> - 2.4.0
0594cbb
- New upstream version 2.4.0
0594cbb
- Resolves: rhbz#1374884 - mod_auth_openidc-2.4.0 is available
0594cbb
754fae2
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.7-5
754fae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
754fae2
95f4796
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.7-4
95f4796
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
95f4796
f8783c3
* Thu Aug 16 2018  <jdennis@redhat.com> - 2.3.7-3
f8783c3
- update test-segfault.patch to match upstream
f8783c3
c2434ec
* Tue Aug 14 2018  <jdennis@redhat.com> - 2.3.7-2
c2434ec
- Resolves: rhbz# 1614977 - fix unit test segfault,
c2434ec
  the problem was not limited exclusively to s390x, but s390x provoked it.
c2434ec
867fe43
* Wed Aug  1 2018  <jdennis@redhat.com> - 2.3.7-1
867fe43
- upgrade to upstream 2.3.7
867fe43
a321bca
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.5-2
a321bca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a321bca
58df408
* Wed May 23 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 2.3.5-1
58df408
- Rebase to 2.3.5
58df408
af18e93
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.10.1-7
af18e93
- Escape macros in %%changelog
af18e93
5dda8e7
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-6
5dda8e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5dda8e7
c168a41
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-5
c168a41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c168a41
18f9a0f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-4
18f9a0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
18f9a0f
4309441
* Sat Feb 18 2017 John Dennis <jdennis@redhat.com> - 1.8.10.1-3
4309441
- Resolves: #1423956 fails to build with openssl 1.1.x
4309441
  Also rolls up all fixes to jose library before the change over to cjose
4309441
2f44085
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-2
2f44085
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2f44085
b97cff7
* Tue Jul 12 2016 John Dennis <jdennis@redhat.com> - 1.8.10.1-1
b97cff7
- Upgrade to new upstream
b97cff7
  See /usr/share/doc/mod_auth_openidc/ChangeLog for details
b97cff7
a324853
* Tue Mar 29 2016 John Dennis <jdennis@redhat.com> - 1.8.8-4
af18e93
- Add %%check to run test
a324853
a324853
* Wed Mar 23 2016 John Dennis <jdennis@redhat.com> - 1.8.8-3
a324853
- Make building with redis support optional (defaults to without)
a324853
b59c6f3
* Mon Mar 21 2016 John Dennis <jdennis@redhat.com> - 1.8.8-2
b59c6f3
- Add missing unpackaged files/directories
b59c6f3
b59c6f3
  Add to doc: README.md, DISCLAIMER, AUTHORS
b59c6f3
  Add to httpd/conf.d: auth_openidc.conf
b59c6f3
  Add to /var/cache: /var/cache/httpd/mod_auth_openidc/cache
b59c6f3
                     /var/cache/httpd/mod_auth_openidc/metadata
b59c6f3
ccf3035
* Thu Mar 10 2016 Jan Pazdziora <jpazdziora@redhat.com> 1.8.8-1
ccf3035
- Update to 1.8.8 (#1316528)
ccf3035
0db7a61
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.7-2
0db7a61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0db7a61
ab63949
* Sat Jan 09 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.8.7-1
ab63949
- Update to 1.8.7 (#1297080)
ab63949
e8ecf18
* Sat Nov 07 2015 Jan Pazdziora <jpazdziora@redhat.com> 1.8.6-1
e8ecf18
- Initial packaging for Fedora 23.