Skip to content

Commit b0a0ced

Browse files
committed
add check and code coverage skeleton
bump to 2.4.18dev Signed-off-by: Hans Zandbelt <[email protected]>
1 parent de1f3e1 commit b0a0ced

24 files changed

+1091
-188
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
run: |
1212
sudo apt-get update -y
1313
sudo apt-get install -y apache2-dev libcjose-dev libssl-dev check pkg-config
14-
sudo apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libpcre2-dev
14+
sudo apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libpcre2-dev libjq-dev check
1515
- name: Configure
1616
run: |
1717
./autogen.sh
18-
./configure
18+
./configure --with-jq
1919
- name: Make
2020
run: make
2121
- name: Test

.github/workflows/coverity.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: Coverity
22

3-
on:
4-
schedule:
5-
- cron: '0 18 * * SUN'
6-
workflow_dispatch:
7-
83
#on:
9-
# push:
10-
# branches: [ master, coverity ]
11-
# pull_request:
12-
# types: [opened, synchronize, reopened]
4+
# schedule:
5+
# - cron: '0 18 * * SUN'
6+
# workflow_dispatch:
7+
8+
on: [push, pull_request]
139

1410
jobs:
1511
build:
@@ -24,7 +20,7 @@ jobs:
2420
run: |
2521
sudo apt-get update -y
2622
sudo apt-get install -y apache2-dev libcjose-dev libssl-dev check pkg-config
27-
sudo apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libpcre2-dev
23+
sudo apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libpcre2-dev libjq-dev check
2824
- name: Download Coverity Build Tool
2925
env:
3026
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
@@ -35,7 +31,7 @@ jobs:
3531
- name: Configure
3632
run: |
3733
./autogen.sh
38-
./configure
34+
./configure --with-jq
3935
- name: Make with cov-build
4036
run: |
4137
pwd

.github/workflows/sonarqube.yml.save

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
run: |
2020
sudo apt-get update -y
2121
sudo apt-get install -y apache2-dev libcjose-dev libssl-dev check pkg-config
22-
sudo apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libpcre2-dev
22+
sudo apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libpcre2-dev libjq-dev check
2323
- name: Install sonar-scanner and build-wrapper
2424
uses: SonarSource/sonarcloud-github-c-cpp@v3
2525
- name: Run build-wrapper
2626
run: |
2727
./autogen.sh
28-
./configure
28+
./configure --with-jq
2929
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make clean all
3030
- name: Run sonar-scanner
3131
env:

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/.vscode/
33
/.libs/
44
/.settings/
5-
/m4/
65
/.project
76
/.cproject
87
/.dockerignore
@@ -28,4 +27,3 @@
2827
/Makefile.in
2928
/missing
3029
/test-driver
31-
/test-suite.log

ChangeLog

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1+
07/23/2025
2+
- add check and code coverage skeleton
3+
- bump to 2.4.18dev
4+
15
07/23/2025
26
- fix regression in 2.4.17 for processing unauthenticated requests that generate HTML
37
content, e.g. `OIDCProviderAuthRequestMethod POST` and `OIDCPreservePost On`
48
when protected with `Require claim` statements rather than just `Require valid-user`.
5-
9+
10+
07/15/2025
11+
- add check and code coverage skeleton
12+
- bump to 2.4.18dev
13+
614
07/15/2025
715
- support the use of Elliptic Curve keys for private_key_jwt authentication at
816
the token- and introspection endpoints and make the signing algorithm configurable
917
for both RSA en EC keys; closes #1336; thanks @rjr162
18+
19+
07/11/2025
20+
- support use of Elliptic Curve prime256v1 keys for private_key_jwt (ES256) token endpoint
21+
and introspection endpoint authentication; closes #1336
1022
- bump to 2.4.17.2dev
1123

1224
06/25/2025

Makefile.am

Lines changed: 6 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,17 @@
11
ACLOCAL_AMFLAGS=-I m4
22

3-
noinst_LTLIBRARIES = libauth_openidc.la
4-
5-
libauth_openidc_la_SOURCES = \
6-
src/mod_auth_openidc.c \
7-
src/state.c \
8-
src/cfg/cfg.c \
9-
src/cfg/cache.c \
10-
src/cfg/provider.c \
11-
src/cfg/oauth.c \
12-
src/cfg/dir.c \
13-
src/cfg/parse.c \
14-
src/cfg/cmds.c \
15-
src/cache/file.c \
16-
src/cache/shm.c \
17-
src/cache/common.c \
18-
src/handle/authz.c \
19-
src/handle/content.c \
20-
src/handle/discovery.c \
21-
src/handle/dpop.c \
22-
src/handle/info.c \
23-
src/handle/jwks.c \
24-
src/handle/logout.c \
25-
src/handle/refresh.c \
26-
src/handle/request_uri.c \
27-
src/handle/request.c \
28-
src/handle/response.c \
29-
src/handle/revoke.c \
30-
src/handle/session_management.c \
31-
src/handle/userinfo.c \
32-
src/proto/auth.c \
33-
src/proto/discovery.c \
34-
src/proto/dpop.c \
35-
src/proto/id_token.c \
36-
src/proto/jwks.c \
37-
src/proto/jwt.c \
38-
src/proto/pkce.c \
39-
src/proto/profile.c \
40-
src/proto/proto.c \
41-
src/proto/request.c \
42-
src/proto/response.c \
43-
src/proto/state.c \
44-
src/proto/token.c \
45-
src/proto/userinfo.c \
46-
src/util/appinfo.c \
47-
src/util/base64.c \
48-
src/util/expr.c \
49-
src/util/file.c \
50-
src/util/html.c \
51-
src/util/jq.c \
52-
src/util/json.c \
53-
src/util/jwt.c \
54-
src/util/key.c \
55-
src/util/pcre_subst.c \
56-
src/util/random.c \
57-
src/util/url.c \
58-
src/util/util.c \
59-
src/metrics.c \
60-
src/oauth.c \
61-
src/http.c \
62-
src/session.c \
63-
src/metadata.c \
64-
src/jose.c
65-
66-
AM_CFLAGS = -DNAMEVER="@NAMEVER@" -I${top_srcdir}/src @APACHE_CFLAGS@ @OPENSSL_CFLAGS@ @CURL_CFLAGS@ @JANSSON_CFLAGS@ @CJOSE_CFLAGS@ @PCRE_CFLAGS@
67-
AM_CPPFLAGS = @APACHE_CPPFLAGS@
68-
AM_LDFLAGS = @APACHE_LDFLAGS@
69-
LIBADD = @APACHE_LIBS@ @OPENSSL_LIBS@ @CURL_LIBS@ @JANSSON_LIBS@ @CJOSE_LIBS@ @PCRE_LIBS@
70-
71-
if HAVE_LIBHIREDIS
72-
libauth_openidc_la_SOURCES += \
73-
src/cache/redis.c
74-
AM_CFLAGS += -DUSE_LIBHIREDIS @HIREDIS_CFLAGS@
75-
LIBADD += @HIREDIS_LIBS@
76-
endif
77-
78-
if HAVE_MEMCACHE
79-
AM_CFLAGS += -DUSE_MEMCACHE
80-
libauth_openidc_la_SOURCES += \
81-
src/cache/memcache.c
82-
endif
83-
84-
if HAVE_LIBJQ
85-
AM_CFLAGS += -DUSE_LIBJQ @JQ_CFLAGS@
86-
LIBADD += @JQ_LIBS@
87-
endif
88-
89-
if HAVE_LIBBROTLI
90-
AM_CFLAGS += -DUSE_LIBBROTLI @LIBBROTLIENC_CFLAGS@ @LIBBROTLIDEC_CFLAGS@
91-
LIBADD += @LIBBROTLIENC_LIBS@ @LIBBROTLIDEC_LIBS@
92-
endif
93-
94-
if HAVE_LIBZ
95-
AM_CFLAGS += -DUSE_ZLIB @ZLIB_CFLAGS@
96-
LIBADD += @ZLIB_LIBS@
97-
endif
98-
99-
noinst_HEADERS = \
100-
src/cfg/cfg.h \
101-
src/cfg/cfg_int.h \
102-
src/cfg/cache.h \
103-
src/cfg/provider.h \
104-
src/cfg/oauth.h \
105-
src/cfg/dir.h \
106-
src/cfg/parse.h \
107-
src/mod_auth_openidc.h \
108-
src/state.h \
109-
src/handle/handle.h \
110-
src/proto/proto.h \
111-
src/cache/cache.h \
112-
src/util/util.h \
113-
src/util/pcre_subst.h \
114-
src/oauth.h \
115-
src/metadata.h \
116-
src/session.h \
117-
src/jose.h \
118-
src/http.h \
119-
src/metrics.h \
120-
src/const.h
121-
122-
if HAVE_LIBHIREDIS
123-
noinst_HEADERS += \
124-
src/cache/redis.h
125-
endif
3+
SUBDIRS = src test
1264

1275
EXTRA_DIST = \
1286
README.md \
1297
ChangeLog \
1308
INSTALL \
1319
AUTHORS \
13210
LICENSE.txt \
133-
auth_openidc.conf \
134-
test/ecpriv.key \
135-
test/eccert.pem \
136-
test/private.pem \
137-
test/public.pem \
138-
test/certificate.pem \
139-
test/open-redirect-payload-list.txt
140-
141-
noinst_DATA = mod_auth_openidc.la
142-
143-
mod_auth_openidc.la: libauth_openidc.la
144-
${APXS} -c -o $@ libauth_openidc.la ${AM_CFLAGS} ${LIBADD}
145-
146-
install-exec-local:
147-
${INSTALL} -d $(DESTDIR)@APACHE_MODULEDIR@
148-
${INSTALL} -p -m 755 .libs/mod_auth_openidc.so $(DESTDIR)@APACHE_MODULEDIR@/mod_auth_openidc.so
149-
150-
uninstall-local:
151-
rm -f $(DESTDIR)@APACHE_MODULEDIR@/mod_auth_openidc.so mod_auth_openidc.la
152-
153-
clean-local:
154-
rm -f mod_auth_openidc.la
155-
156-
LDADD = libauth_openidc.la ${LIBADD}
157-
158-
noinst_PROGRAMS = test/test-cmd
159-
test_test_cmd_SOURCES = test/test-cmd.c test/stub.c
160-
test_test_cmd_CFLAGS = ${AM_CFLAGS} -fPIC
161-
162-
TESTS = test/test
163-
164-
check_PROGRAMS = test/test
165-
test_test_SOURCES = test/test.c test/stub.c
166-
test_test_CFLAGS = ${AM_CFLAGS} -fPIC
11+
auth_openidc.conf
16712

16813
clang-format:
169-
clang-format -style=file -i $$(find . -name *.[ch] -maxdepth 3)
14+
clang-format -style=file -i $$(find . -maxdepth 3 -name *.[ch])
15+
16+
check-code-coverage: check
17+
${MAKE} -C test $@

configure.ac

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([mod_auth_openidc],[2.4.17.2dev],[[email protected]])
1+
AC_INIT([mod_auth_openidc],[2.4.18dev],[[email protected]])
22

33
AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())
44

@@ -12,6 +12,8 @@ AM_PROG_CC_C_O
1212
AM_PROG_AR
1313
LT_INIT([dlopen])
1414

15+
AX_CODE_COVERAGE
16+
1517
# Checks for apxs.
1618
AC_ARG_WITH([apxs],
1719
[AS_HELP_STRING([--with-apxs=PATH/NAME],[path to the apxs binary for Apache [apxs]])],
@@ -186,6 +188,21 @@ AM_CONDITIONAL(HAVE_LIBJQ, [test x"$HAVE_LIBJQ" = "x1"])
186188
AC_SUBST(JQ_CFLAGS)
187189
AC_SUBST(JQ_LIBS)
188190

191+
# check
192+
PKG_CHECK_MODULES([CHECK],
193+
[check >= 0.9.4],
194+
[have_check="yes"],
195+
[AC_MSG_WARN([Check not found; cannot run unit tests!]);
196+
[have_check="no"]
197+
])
198+
AM_CONDITIONAL(HAVE_CHECK, [test x"$have_check" = "xyes"])
199+
AC_SUBST(CHECK_CFLAGS)
200+
AC_SUBST(CHECK_LIBS)
201+
189202
# Create Makefile from Makefile.in
190-
AC_CONFIG_FILES([Makefile])
203+
AC_CONFIG_FILES([
204+
Makefile
205+
src/Makefile
206+
test/Makefile
207+
])
191208
AC_OUTPUT

m4/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/libtool.m4
2+
/ltoptions.m4
3+
/ltsugar.m4
4+
/ltversion.m4
5+
/lt~obsolete.m4

0 commit comments

Comments
 (0)