Apache 2.4 module implementing OpenID Connect Relying Party and OAuth 2.0 Resource Server functionalities.
# Debian/Ubuntu
sudo apt install libapache2-mod-auth-openidc
-
Get your release code name:
lsb_release --codename
-
Download the latest release based on your code name
-
Install the package on your OS:
sudo apt install ./libapache2-mod-auth-openidc.{OS_CODENAME}_amd64.deb
Example: see example configuration file.
Enable debugging:
LogLevel debug auth_openidc:trace8
If you want to restrict the access to a certain directory, you can require specific claim values:
AuthType openid-connect
OIDCCookie oidcstate
OIDCCookiePath "/"
Require claim [claim_name]: [claim_value]
For example, to restrict the access of the directory to the group "EPFL_Group":
AuthType openid-connect
OIDCCookie oidcstate
OIDCCookiePath "/"
Require claim groups:EPFL_Group
We recommend to use these configurations in the main server configuration file. If the server configuration file can't be accessed, the configuration can be done in .htaccess files (see Apache documentation).
The module exposes authentication information through these endpoints:
/redirect_uri?info=json
- Authentication data in JSON format/redirect_uri?info=html
- Authentication data in HTML format/redirect_uri?logout=logout_uri
- Logout endpoint
Configure which fields to expose using OIDCInfoHook
:
OIDCInfoHook iat access_token id_token userinfo session
Fields:
iat
- Token issue timestampaccess_token
- Opaque access tokenid_token
- ID token claimsuserinfo
- UserInfo endpoint claimssession
- Session metadata