├── .clang-format ├── .cproject ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .project ├── AUTHORS ├── ChangeLog ├── LICENSE ├── Makefile.am ├── README.md ├── SECURITY.md ├── autogen.sh ├── configure.ac ├── m4 ├── .gitignore └── ax_code_coverage.m4 ├── oauth2.conf └── src ├── .gitignore ├── mod_oauth2.c └── mod_oauth2.h /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 8 3 | UseTab: Always 4 | BreakBeforeBraces: Linux 5 | AllowShortIfStatementsOnASingleLine: false 6 | IndentCaseLabels: false 7 | AllowShortFunctionsOnASingleLine: None 8 | -------------------------------------------------------------------------------- /.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 44 | 49 | 50 | 51 | 52 | 56 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 91 | 92 | 93 | 101 | 106 | 107 | 108 | 109 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | make 137 | all 138 | true 139 | true 140 | false 141 | 142 | 143 | make 144 | 145 | check 146 | true 147 | true 148 | false 149 | 150 | 151 | make 152 | 153 | clean 154 | true 155 | true 156 | false 157 | 158 | 159 | make 160 | 161 | clang-format 162 | true 163 | true 164 | false 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-22.04 8 | 9 | steps: 10 | - uses: actions/checkout@v3 11 | 12 | - name: Dependencies 13 | run: | 14 | sudo apt-get update -y 15 | sudo apt-get install -y libssl-dev libcurl4-openssl-dev libhiredis-dev libmemcached-dev 16 | sudo apt-get install -y libjansson-dev libcjose-dev apache2-dev pkg-config 17 | cd /tmp 18 | #curl https://api.github.com/repos/OpenIDC/liboauth2/releases/latest | grep "browser_download_url.*liboauth2_.*jammy_amd64.deb" | cut -d: -f2,3 | tr -d \" | wget -qi - 19 | #curl https://api.github.com/repos/OpenIDC/liboauth2/releases/latest | grep "browser_download_url.*liboauth2-apache_.*jammy_amd64.deb" | cut -d: -f2,3 | tr -d \" | wget -qi - 20 | #curl https://api.github.com/repos/OpenIDC/liboauth2/releases/latest | grep "browser_download_url.*liboauth2-dev_.*jammy_amd64.deb" | cut -d: -f2,3 | tr -d \" | wget -qi - 21 | #sudo apt-get -y install ./*.deb 22 | git clone https://github.com/OpenIDC/liboauth2.git 23 | cd liboauth2 24 | ./autogen.sh 25 | ./configure 26 | make 27 | sudo make install 28 | - name: Configure 29 | run: | 30 | ./autogen.sh 31 | ./configure 32 | 33 | - name: Make 34 | run: make 35 | 36 | - name: Distcheck 37 | run: make distcheck DESTDIR="/tmp/mod_oauth2" 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /config.log 2 | /config.status 3 | /configure 4 | /Makefile 5 | /aclocal.m4 6 | /Makefile.in 7 | /libtool 8 | /ltmain.sh 9 | /missing 10 | /compile 11 | /config.guess 12 | /config.sub 13 | /depcomp 14 | /install-sh 15 | /.autotools 16 | /build/ 17 | /.settings/ 18 | /.libs/ 19 | /mod_oauth2.la 20 | /config.guess~ 21 | /config.sub~ 22 | /configure~ 23 | /install-sh~ 24 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | mod_oauth2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.autotools.core.genmakebuilderV2 10 | 11 | 12 | 13 | 14 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 15 | clean,full,incremental, 16 | 17 | 18 | 19 | 20 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 21 | full,incremental, 22 | 23 | 24 | 25 | 26 | 27 | org.eclipse.cdt.core.cnature 28 | org.eclipse.cdt.core.ccnature 29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 31 | org.eclipse.cdt.autotools.core.autotoolsNatureV2 32 | 33 | 34 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The primary author of mod_oauth2 is: 2 | 3 | Hans Zandbelt 4 | 5 | Thanks to the following people for contributing to mod_oauth2 by 6 | reporting bugs, providing fixes, suggesting useful features or other: 7 | 8 | Jonathan Hurd 9 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 08/22/2024 2 | - change LICENSE to Apache 2.0 3 | - depend on liboauth2 >= 2.0.0 4 | - release 4.0.0 5 | 6 | 06/05/2024 7 | - depend on liboauth2 >= 1.6.2 8 | - release 3.4.0 9 | 10 | 10/25/2023 11 | - correct documentation wrt. cache encryption passphrase; see #52; thanks @webermax 12 | - depend on liboauth2 >= 1.5.1; see https://github.com/OpenIDC/liboauth2/issues/44 13 | 14 | 03/08/2023 15 | - move repo to OpenIDC github organization 16 | 17 | 01/21/2023 18 | - clean WWW-Authenticate header in main request as well if this is a subrequest; closes #42 19 | this avoids the WWW-Authenticate header to be sent in HTTP 200 responses; thanks @ErmakovDmitriy 20 | - depend on liboauth2 1.4.5.3 21 | - release 3.3.1 22 | 23 | 12/06/2022 24 | - change Makefile install procedure 25 | - depend on liboauth2 1.4.5.2 26 | - release 3.3.0 27 | 28 | 07/27/2022 29 | - depend on liboauth2 1.4.5 with multi-treading fix for "OAuth2TokenVerify jwk " 30 | - release 3.2.3 31 | 32 | 07/01/2021 33 | - change configure.ac to find Apache flags correctly 34 | 35 | 06/07/2021 36 | - depend on liboauth2 1.4.2.1 with fixed iat slack validation defaults 37 | - set WWW-Authenticate environment variable to allow for complex Require logic; see 38 | https://github.com/zmartzone/mod_auth_openidc/discussions/572 39 | example: 40 | Header always append WWW-Authenticate %{OAUTH2_BEARER_SCOPE_ERROR}e "expr=(%{REQUEST_STATUS} == 401) && (-n reqenv('OAUTH2_BEARER_SCOPE_ERROR'))" 41 | - release 3.2.2 42 | 43 | 02/01/2021 44 | - depend on liboauth2 1.4.1 with support for RFC 8705 mTLS Client Certificate bound access tokens 45 | - release 3.2.1 46 | 47 | 12/22/2020 48 | - depend on liboauth2 1.4.0 49 | - release 3.2.0 50 | 51 | 11/13/2020 52 | - add OAuth2CryptoPassphrase 53 | 54 | 11/10/2020 55 | - allow setting a cache with OAuth2Cache 56 | 57 | 11/07/2020 58 | - change Require keyword from "claim" to "oauth2_claim" to avoid interference with mod_auth_openidc 59 | - depend on liboauth2 >= 1.4.0 with new oauth2_token_verify (dpop) interface 60 | - bump to 3.2.0-dev 61 | 62 | 09/12/2019 63 | - depend on liboauth2 1.2.0 with new request header API 64 | - bump to 3.1.0 65 | 66 | 07/04/2019 67 | - depend on liboauth2 1.1.1 with log encapsulation changes 68 | - bump to 3.0.2 69 | 70 | 05/20/2019 71 | - add Apache Require claim authorization functions 72 | - bump to 3.0.1 73 | 74 | 03/22/2019 75 | - initial import of version 3.0.0 76 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS=-I m4 2 | 3 | EXTRA_DIST = autogen.sh ChangeLog README.md LICENSE oauth2.conf 4 | 5 | AM_CPPFLAGS = -Wall -Werror 6 | AM_CPPFLAGS += -DOAUTH2_PACKAGE_NAME_VERSION=\"@PACKAGE_NAME@-@PACKAGE_VERSION@\" 7 | AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS) $(CODE_COVERAGE_CFLAGS) 8 | AM_LDFLAGS = --coverage 9 | 10 | LDADD = $(CODE_COVERAGE_LIBS) 11 | 12 | includesubdir = $(includedir)/oauth2 13 | 14 | includesub_HEADERS = \ 15 | src/mod_oauth2.h 16 | 17 | lib_LTLIBRARIES = @PACKAGE_NAME@.la 18 | 19 | @PACKAGE_NAME@_la_CFLAGS = @OAUTH2_CFLAGS@ @OAUTH2_APACHE_CFLAGS@ @APACHE_CFLAGS@ 20 | @PACKAGE_NAME@_la_LIBADD = @OAUTH2_LIBS@ @OAUTH2_APACHE_LIBS@ @APR_LIBS@ 21 | @PACKAGE_NAME@_la_SOURCES = src/@PACKAGE_NAME@.c 22 | @PACKAGE_NAME@_la_LDFLAGS = -module 23 | 24 | @CODE_COVERAGE_RULES@ 25 | 26 | clang-format: 27 | clang-format -style=file -i `find . -name *.[ch]` 28 | 29 | install: 30 | ${INSTALL} -d $(DESTDIR)$(shell @APXS@ @APXS_OPTS@ -q LIBEXECDIR) 31 | ${INSTALL} -p -m 755 .libs/@PACKAGE_NAME@.so $(DESTDIR)$(shell @APXS@ @APXS_OPTS@ -q LIBEXECDIR)/@PACKAGE_NAME@.so 32 | 33 | uninstall: 34 | rm -f $(DESTDIR)$(shell @APXS@ @APXS_OPTS@ -q LIBEXECDIR)/@PACKAGE_NAME@.so 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://github.com/OpenIDC/mod_oauth2/actions/workflows/build.yml/badge.svg)](https://github.com/OpenIDC/mod_oauth2/actions/workflows/build.yml) 2 | 3 | # mod_oauth2 4 | 5 | A module for Apache HTTP Server 2.x that makes the Apache web server operate as a OAuth 2.0 Resource Server, 6 | validating OAuth 2.0 access tokens and setting headers/environment variables based on the validation results. 7 | 8 | 9 | ## Quickstart 10 | 11 | Reference Bearer Access Token validation using RFC7662 based introspection: 12 | ```apache 13 | AuthType oauth2 14 | OAuth2TokenVerify introspect https://pingfed:9031/as/introspect.oauth2 introspect.ssl_verify=false&introspect.auth=client_secret_basic&client_id=rs0&client_secret=2Federate 15 | ``` 16 | 17 | JWT Bearer Access Token validation using a set of JWKs published on a `jwks_uri`: 18 | ```apache 19 | AuthType oauth2 20 | OAuth2TokenVerify jwks_uri https://pingfed:9031/ext/one jwks_uri.ssl_verify=false 21 | ``` 22 | 23 | RFC 8705 Mutual TLS Certificate (optionally) Bound JWT Access Token validation with a known JWK 24 | ```apache 25 | AuthType oauth2 26 | OAuth2TokenVerify jwk "{\"kty\":\"RSA\",\"kid\":\"one\",\"use\":\"sig\",\"n\":\"12SBWV_4xU8sBEC2IXcakiDe3IrrUcnIHexfyHG11Kw-EsrZvOy6PrrcqfTr1GcecyWFzQvUr61DWESrZWq96vd08_iTIWIny8pU5dlCoC7FsHU_onUQI1m4gQ3jNr00KhH878vrBVdr_T-zuOYQQOBRMEyFG-I4nb91zO1n2gcpQHeabJw3JIC9g65FCpu8DSw8uXQ1hVfGUDZAK6iwncNZ1uqN4HhRGNevFXT7KVG0cNS8S3oF4AhHafFurheVxh714R2EseTVD_FfLn2QTlCss_73YIJjzn047yKmAx5a9zuun6FKiISnMupGnHShwVoaS695rDmFvj7mvDppMQ\",\"e\":\"AQAB\" }" type=mtls&mtls.policy=optional 27 | SSLVerifyClient optional_no_ca 28 | ``` 29 | 30 | RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) validation using introspection (using liboauth > 1.5.2) 31 | ```apache 32 | OAuth2TokenVerify introspect https://pingfed:9031/as/introspect.oauth2 introspect.ssl_verify=false&introspect.auth=client_secret_basic&client_id=rs_client&client_secret=2Federate&type=dpop 33 | ``` 34 | 35 | For a detailed overview of configuration options see the `oauth2.conf` Apache configuration file in this directory. 36 | 37 | ## Features 38 | 39 | As provided by the [`liboauth2`](https://github.com/OpenIDC/liboauth2) dependency, including: 40 | - per-directory configuration over per-virtual host 41 | - flexible cache configuration per cached element type 42 | - specify multiple token verification options, tried sequentially (allow for key/algo rollover) 43 | - claims-based authorization capabilities see: https://github.com/OpenIDC/mod_oauth2/wiki#authorization 44 | - etc. 45 | 46 | 47 | ## Support 48 | 49 | #### Community Support 50 | For generic questions, see the Wiki pages with Frequently Asked Questions at: 51 | [https://github.com/OpenIDC/mod_oauth2/wiki](https://github.com/OpenIDC/mod_oauth2/wiki) 52 | Any questions/issues should go to issues tracker. 53 | 54 | #### Commercial Services 55 | For commercial Support contracts, Professional Services, Training and use-case specific support you can contact: 56 | [sales@openidc.com](mailto:sales@openidc.com) 57 | 58 | 59 | Disclaimer 60 | ---------- 61 | *This software is open sourced by OpenIDC. For commercial support 62 | you can contact [OpenIDC](https://www.openidc.com) as described above in the [Support](#support) section.* 63 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 3.3.x | :white_check_mark: | 8 | | < 3.3.0 | :x: | 9 | 10 | ## Reporting a Vulnerability 11 | 12 | Please send an e-mail to support@openidc.com with a description of: 13 | 14 | - a brief description of the vulnerability 15 | - how the vulnerability can be observed 16 | - optionally the type of vulnerability and any related OWASP category 17 | - non-destructive exploitation details 18 | 19 | ## Followup 20 | After submitting your vulnerability report, you will receive an acknowledgement reply usually within 24 working hours of your report being received. 21 | 22 | The team will triage the reported vulnerability, and respond as soon as possible to let you know whether further information is required, whether the vulnerability is in or out of scope, or is a duplicate report. Priority for bug fixes or mitigations is assessed by looking at the impact severity and exploit complexity. 23 | 24 | When the reported vulnerability is resolved, or remediation work is scheduled, the Support team will notify you, and invite you to confirm that the solution covers the vulnerability adequately. 25 | 26 | You are particularly invited to give us feedback on the disclosure handling process, the clarity and quality of the communication relationship, and of course the effectiveness of the vulnerability resolution. This feedback will be used in strict confidence to help us improve our processes for handling reports, developing services, and resolving vulnerabilities. 27 | 28 | Where a report qualifies, we will offer to include you on our thanks and acknowledgement page. We will ask you to confirm the details you want included before they are published. 29 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoreconf --force --install 3 | rm -rf autom4te.cache/ 4 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([mod_oauth2],[4.0.0],[hans.zandbelt@openidc.com]) 2 | 3 | AM_INIT_AUTOMAKE([foreign no-define subdir-objects]) 4 | AC_CONFIG_MACRO_DIRS([m4]) 5 | 6 | LT_INIT([dlopen]) 7 | AC_PROG_CC 8 | 9 | AX_CODE_COVERAGE 10 | 11 | AC_ARG_WITH([apache], AS_HELP_STRING([--with-apache], [build with Apache support [default=autodetect]]),) 12 | AC_ARG_WITH([apxs], 13 | [AS_HELP_STRING([--with-apxs=PATH/NAME],[path to the apxs binary for Apache [[apxs]]])], 14 | [AC_SUBST(APXS, $with_apxs)], 15 | [AC_PATH_PROGS(APXS, [apxs2 apxs])]) 16 | if test "x$with_apache" != "xno"; then 17 | PKG_CHECK_MODULES([APR], [apr-1, apr-util-1], [have_apache="yes"], [have_apache="no"]) 18 | 19 | AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"], 20 | [AC_MSG_NOTICE([apxs found at $APXS])], 21 | [AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])]) 22 | 23 | APACHE_CFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CPPFLAGS` -I`${APXS} -q INCLUDEDIR` ${APR_CFLAGS}" 24 | fi 25 | AM_CONDITIONAL(HAVE_APACHE, [test x"$have_apache" = "xyes"]) 26 | AC_SUBST(APR_LIBS) 27 | AC_SUBST(APACHE_CFLAGS) 28 | AC_ARG_VAR(APXS_OPTS, [additional command line options to pass to apxs]) 29 | 30 | PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 2.0.0]) 31 | AC_SUBST(OAUTH2_CFLAGS) 32 | AC_SUBST(OAUTH2_LIBS) 33 | 34 | PKG_CHECK_MODULES(OAUTH2_APACHE, [liboauth2_apache >= 2.0.0]) 35 | AC_SUBST(OAUTH2_APACHE_CFLAGS) 36 | AC_SUBST(OAUTH2_APACHE_LIBS) 37 | 38 | # Create Makefile from Makefile.in 39 | AC_CONFIG_FILES([ 40 | Makefile 41 | ]) 42 | AC_OUTPUT 43 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- 1 | /libtool.m4 2 | /ltoptions.m4 3 | /ltsugar.m4 4 | /ltversion.m4 5 | /lt~obsolete.m4 6 | -------------------------------------------------------------------------------- /m4/ax_code_coverage.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CODE_COVERAGE() 8 | # 9 | # DESCRIPTION 10 | # 11 | # Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, 12 | # CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included 13 | # in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every 14 | # build target (program or library) which should be built with code 15 | # coverage support. Also defines CODE_COVERAGE_RULES which should be 16 | # substituted in your Makefile; and $enable_code_coverage which can be 17 | # used in subsequent configure output. CODE_COVERAGE_ENABLED is defined 18 | # and substituted, and corresponds to the value of the 19 | # --enable-code-coverage option, which defaults to being disabled. 20 | # 21 | # Test also for gcov program and create GCOV variable that could be 22 | # substituted. 23 | # 24 | # Note that all optimization flags in CFLAGS must be disabled when code 25 | # coverage is enabled. 26 | # 27 | # Usage example: 28 | # 29 | # configure.ac: 30 | # 31 | # AX_CODE_COVERAGE 32 | # 33 | # Makefile.am: 34 | # 35 | # @CODE_COVERAGE_RULES@ 36 | # my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... 37 | # my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... 38 | # my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... 39 | # my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... 40 | # 41 | # This results in a "check-code-coverage" rule being added to any 42 | # Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module 43 | # has been configured with --enable-code-coverage). Running `make 44 | # check-code-coverage` in that directory will run the module's test suite 45 | # (`make check`) and build a code coverage report detailing the code which 46 | # was touched, then print the URI for the report. 47 | # 48 | # In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined 49 | # instead of CODE_COVERAGE_LIBS. They are both still defined, but use of 50 | # CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is 51 | # deprecated. They have the same value. 52 | # 53 | # This code was derived from Makefile.decl in GLib, originally licenced 54 | # under LGPLv2.1+. 55 | # 56 | # LICENSE 57 | # 58 | # Copyright (c) 2012, 2016 Philip Withnall 59 | # Copyright (c) 2012 Xan Lopez 60 | # Copyright (c) 2012 Christian Persch 61 | # Copyright (c) 2012 Paolo Borelli 62 | # Copyright (c) 2012 Dan Winship 63 | # Copyright (c) 2015 Bastien ROUCARIES 64 | # 65 | # This library is free software; you can redistribute it and/or modify it 66 | # under the terms of the GNU Lesser General Public License as published by 67 | # the Free Software Foundation; either version 2.1 of the License, or (at 68 | # your option) any later version. 69 | # 70 | # This library is distributed in the hope that it will be useful, but 71 | # WITHOUT ANY WARRANTY; without even the implied warranty of 72 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 73 | # General Public License for more details. 74 | # 75 | # You should have received a copy of the GNU Lesser General Public License 76 | # along with this program. If not, see . 77 | 78 | #serial 25 79 | 80 | AC_DEFUN([AX_CODE_COVERAGE],[ 81 | dnl Check for --enable-code-coverage 82 | AC_REQUIRE([AC_PROG_SED]) 83 | 84 | # allow to override gcov location 85 | AC_ARG_WITH([gcov], 86 | [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], 87 | [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], 88 | [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) 89 | 90 | AC_MSG_CHECKING([whether to build with code coverage support]) 91 | AC_ARG_ENABLE([code-coverage], 92 | AS_HELP_STRING([--enable-code-coverage], 93 | [Whether to enable code coverage support]),, 94 | enable_code_coverage=no) 95 | 96 | AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) 97 | AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) 98 | AC_MSG_RESULT($enable_code_coverage) 99 | 100 | AS_IF([ test "$enable_code_coverage" = "yes" ], [ 101 | # check for gcov 102 | AC_CHECK_TOOL([GCOV], 103 | [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], 104 | [:]) 105 | AS_IF([test "X$GCOV" = "X:"], 106 | [AC_MSG_ERROR([gcov is needed to do coverage])]) 107 | AC_SUBST([GCOV]) 108 | 109 | dnl Check if gcc is being used 110 | AS_IF([ test "$GCC" = "no" ], [ 111 | AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) 112 | ]) 113 | 114 | AC_CHECK_PROG([LCOV], [lcov], [lcov]) 115 | AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) 116 | 117 | AS_IF([ test -z "$LCOV" ], [ 118 | AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) 119 | ]) 120 | 121 | AS_IF([ test -z "$GENHTML" ], [ 122 | AC_MSG_ERROR([Could not find genhtml from the lcov package]) 123 | ]) 124 | 125 | dnl Build the code coverage flags 126 | dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility 127 | CODE_COVERAGE_CPPFLAGS="-DNDEBUG" 128 | CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" 129 | CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" 130 | #CODE_COVERAGE_LIBS="-lgcov" 131 | CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" 132 | 133 | AC_SUBST([CODE_COVERAGE_CPPFLAGS]) 134 | AC_SUBST([CODE_COVERAGE_CFLAGS]) 135 | AC_SUBST([CODE_COVERAGE_CXXFLAGS]) 136 | AC_SUBST([CODE_COVERAGE_LIBS]) 137 | AC_SUBST([CODE_COVERAGE_LDFLAGS]) 138 | 139 | [CODE_COVERAGE_RULES_CHECK=' 140 | -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check 141 | $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture 142 | '] 143 | [CODE_COVERAGE_RULES_CAPTURE=' 144 | $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) 145 | $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) 146 | -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp 147 | $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) 148 | @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" 149 | '] 150 | [CODE_COVERAGE_RULES_CLEAN=' 151 | clean: code-coverage-clean 152 | distclean: code-coverage-clean 153 | code-coverage-clean: 154 | -$(LCOV) --directory $(top_builddir) -z 155 | -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) 156 | -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete 157 | '] 158 | ], [ 159 | [CODE_COVERAGE_RULES_CHECK=' 160 | @echo "Need to reconfigure with --enable-code-coverage" 161 | '] 162 | CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" 163 | CODE_COVERAGE_RULES_CLEAN='' 164 | ]) 165 | 166 | [CODE_COVERAGE_RULES=' 167 | # Code coverage 168 | # 169 | # Optional: 170 | # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. 171 | # Multiple directories may be specified, separated by whitespace. 172 | # (Default: $(top_builddir)) 173 | # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated 174 | # by lcov for code coverage. (Default: 175 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) 176 | # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage 177 | # reports to be created. (Default: 178 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) 179 | # - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, 180 | # set to 0 to disable it and leave empty to stay with the default. 181 | # (Default: empty) 182 | # - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov 183 | # instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) 184 | # - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov 185 | # instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) 186 | # - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov 187 | # - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the 188 | # collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) 189 | # - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov 190 | # instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) 191 | # - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering 192 | # lcov instance. (Default: empty) 193 | # - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov 194 | # instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) 195 | # - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the 196 | # genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) 197 | # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml 198 | # instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) 199 | # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore 200 | # 201 | # The generated report will be titled using the $(PACKAGE_NAME) and 202 | # $(PACKAGE_VERSION). In order to add the current git hash to the title, 203 | # use the git-version-gen script, available online. 204 | 205 | # Optional variables 206 | CODE_COVERAGE_DIRECTORY ?= $(top_builddir) 207 | CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info 208 | CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage 209 | CODE_COVERAGE_BRANCH_COVERAGE ?= 210 | CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ 211 | --rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) 212 | CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) 213 | CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" 214 | CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) 215 | CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) 216 | CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= 217 | CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) 218 | CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ 219 | $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ 220 | --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) 221 | CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) 222 | CODE_COVERAGE_IGNORE_PATTERN ?= 223 | 224 | GITIGNOREFILES ?= 225 | GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) 226 | 227 | code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) 228 | code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) 229 | code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ 230 | $(CODE_COVERAGE_OUTPUT_FILE); 231 | code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) 232 | code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) 233 | code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ 234 | $(CODE_COVERAGE_IGNORE_PATTERN); 235 | code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) 236 | code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) 237 | code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); 238 | code_coverage_quiet = $(code_coverage_quiet_$(V)) 239 | code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) 240 | code_coverage_quiet_0 = --quiet 241 | 242 | # sanitizes the test-name: replaces with underscores: dashes and dots 243 | code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) 244 | 245 | # Use recursive makes in order to ignore errors during check 246 | check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' 247 | 248 | # Capture code coverage data 249 | code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' 250 | 251 | # Hook rule executed before code-coverage-capture, overridable by the user 252 | code-coverage-capture-hook: 253 | 254 | '"$CODE_COVERAGE_RULES_CLEAN"' 255 | 256 | A''M_DISTCHECK_CONFIGURE_FLAGS ?= 257 | A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage 258 | 259 | .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean 260 | '] 261 | 262 | AC_SUBST([CODE_COVERAGE_RULES]) 263 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) 264 | ]) 265 | -------------------------------------------------------------------------------- /oauth2.conf: -------------------------------------------------------------------------------- 1 | # (Mandatory) 2 | # 3 | # Set AuthType 4 | #AuthType oauth2 5 | 6 | 7 | 8 | # (Optional) 9 | # 10 | # Configures a symmetric encryption key for cache values. 11 | # When not defined, the passphrase will be auto-generated which means it does not survive restarts. 12 | # 13 | #OAuth2CryptoPassphrase 14 | 15 | # 16 | # (Optional) 17 | # 18 | # Configures a cache. 19 | # Note that this directive must be defined before any OAuth2TokenVerify directive that uses it. 20 | # 21 | # type shm|file|redis|memcache cache backend type for access token validation results, default is shm 22 | # options cache backend specific options in query encoded format, see Cache Options 23 | # e.g name=myname&password=mypassword&encrypt=false 24 | # 25 | #OAuth2Cache [] 26 | # 27 | # 28 | # OAuth2Cache Options: 29 | # 30 | # (default) 31 | # 32 | # generic: 33 | # 34 | # name (default) the name of the (named) cache to refer to from e.g. OAuth2TokenVerify 35 | # key_hash_algo (sha256) hash algorithm for the cache key (or "none") 36 | # encrypt true|false (true) encrypt the cache value (default is "false" for the shm cache backend) 37 | # passphrase_hash_algo (sha256) hash algorithm to apply to the passphrase before using it as an encryption key 38 | # 39 | # shm: 40 | # 41 | # max_key_size (65) maximum size of the cache key in bytes (see also: key_hash_algo) 42 | # max_val_size (8193) maximum size of a single cache value 43 | # max_entries (1000) maximum number of entries in the cache (FIFO policy, overruns will result in a warning in the log) 44 | # 45 | # file: 46 | # 47 | # dir (/tmp or C:\\Temp) cache file directory 48 | # clean_interval (60) minimum interval to loop over the cache directories looking to delete expired entries 49 | # 50 | # memcache: 51 | # 52 | # config_string (--SERVER=localhost) memcached specific server configuration string, see: https://www.systutorials.com/docs/linux/man/3-memcached/ 53 | # 54 | # redis: 55 | # 56 | # host (localhost) Redis server hostname 57 | # port (6379) Redis servver port 58 | # username () username used to authenticate to the Redis server 59 | # password () password used to authenticate to the Redis server 60 | 61 | 62 | 63 | # 64 | # Set token verification method and options. 65 | # 66 | # This primitive can be used multiple times in which case the access token will be verified in 67 | # order - according to each consecutive primitive - until it validates or reaches the end of the list. 68 | # See below for a detailed list of (fine-grained) configuration options. 69 | # 70 | #OAuth2TokenVerify [] 71 | # 72 | # Samples: 73 | # 74 | # OAuth2TokenVerify introspect https://pingfed:9031/as/introspect.oauth2 introspect.ssl_verify=false&introspect.auth=client_secret_basic&client_id=rs0&client_secret=2Federate 75 | # OAuth2TokenVerify jwks_uri https://pingfed:9031/ext/one jwks_uri.ssl_verify=false 76 | # 77 | # Types: 78 | # 79 | # (provided in query-encoded format) 80 | # 81 | # introspect RFC7662 introspection URL introspect.ssl_verify, introspect.auth, introspect.cache, introspect.expiry, introspect.token_param_name, introspect.params, type 82 | # jwks_uri JWKS URI that serves the public keys jwks_uri.ssl_verify, jwks_uri.cache, jwks_uri.expiry, type, 83 | # verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after 84 | # jwk JWK JSON representation of a symmetric kid (overrides kid in JWK), verify.iss, verify.exp, verify.iat, type, 85 | # key or a public key verify.iat.slack_before, verify.iat.slack_after 86 | # metadata RFC8414 Authorization Server Metadata metadata.ssl_verify, introspect.*, jwks_uri.* 87 | # URL that contains a JWKs URI in jwks_uri 88 | # plain symmetric key (password) in plain text kid, verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after, type 89 | # base64 base64-encoded symmetric key kid, verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after, type 90 | # base64url base64url-encoded symmetric key kid, verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after, type 91 | # hex hex-encoded symmetric key kid, verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after, type 92 | # pem PEM formatted X.509 certificate kid, verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after, type 93 | # that contains an RSA public key 94 | # pubkey PEM formatted RSA public key kid, verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after, type 95 | # eckey_uri URL on wich the Elliptic Curve key is eckey_uri.ssl_verify, eckey_uri.cache, eckey_uri.expiry, 96 | # published as a PEM (Amazon ALB specific) verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after 97 | # aws_alb ALB ARN alb_base_url, aws_alb.ssl_verify, aws_alb.auth, aws_alb.cache, aws_alb.expiry 98 | # verify.iss, verify.exp, verify.iat, verify.iat.slack_before, verify.iat.slack_after 99 | # 100 | # OAuth2TokenVerify Options: 101 | # 102 | # 103 | # 104 | # kid JWK kid value to be found in JWT header 105 | # verify.iss skip|optional|required how to validate the "iss" claim in the JWT: skip it, verify if present, require claim to be present and validate 106 | # verify.exp skip|optional|required how to validate the "exp" claim in the JWT: skip it, verify if present, require claim to be present and validate 107 | # verify.iat skip|optional|required how to validate the "iat" claim in the JWT: skip it, verify if present, require claim to be present and validate 108 | # verify.iat.slack_before acceptable clock drift in seconds for the "iat" claim: anything issued before now-number will be rejected 109 | # verify.iat.slack_after acceptable clock drift in seconds for the "iat" claim: anything issued after now+number will be rejected 110 | # type [mtls|dpop] type of proof of possession, mtls.policy=[optional|required] 111 | # verify.cache cache backend name for access token validation results, 112 | # default is "default", otherwise must refer to a named cache defined with OAuth2Cache 113 | # expiry cache expiry in seconds for access token validation results 114 | # introspect.auth endpoint authentication, see Authentication Options 115 | # introspect.token_param_name name of the parameter in which the access token is sent, if is not the default "token" 116 | # introspect.params form-encoded extra POST parameters sent to the introspectoin endpoint e.g. key1%3Done%26key2%3Dtwo 117 | # *.ssl_verify true|false verify the TLS certificate presented on the configured HTTPs URL 118 | # *.cache [introspect|jwks_uri|eckey_uri|aws_alb] cache backend name for content resolved from a URI 119 | # default is "default", otherwise must refer to a named cache defined with OAuth2Cache 120 | # *.expiry [introspect|jwks_uri|eckey_uri|aws_alb] cache expiry for content resolved from a URI 121 | # 122 | # Authentication Options: 123 | # 124 | # 125 | # 126 | # none no authentication towards the endpoint is used 127 | # client_secret_basic client_id, client_secret OIDC client secret basic authentication, URL-encoded values in HTTP Basic Authentication 128 | # client_secret_post client_id, client_secret OIDC client secret post based authentication, values in HTTP POST parameters 129 | # client_secret_jwt client_id, client_secret, aud OIDC client secret JWT, providing a symmetric key in the client_secret value 130 | # private_key_jwt client_id, jwk, aud OIDC private key JWT, providing a JWK in escaped JSON string representation 131 | # client_cert cert, key TLS Client Certificate authentication, providing paths to PEM-formatted files 132 | # basic username,password HTTP basic authentication 133 | 134 | 135 | 136 | # 137 | # (Optional) 138 | # 139 | # Configures in which format access tokens can be presented. Can be provided multiple times. 140 | # 141 | # 142 | # 143 | # environment name= retrieve from environment variable 144 | # header name=&type= retrieve from header using separator (default="bearer") 145 | # query name= retrieve from query parameter 146 | # post name= retrieve from HTTP form post parameter 147 | # cookie name= retrieve from cookie 148 | # basic retrieve from basic authentication header password value 149 | # 150 | #OAuth2AcceptTokenIn [] 151 | 152 | 153 | 154 | # (Optional) 155 | # 156 | # Configures in which format claims and informations from the token validation results are passed to the target application. 157 | # 158 | #