Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zitadel/example-apache2
Minimum ZITADEL integration with Apache2
https://github.com/zitadel/example-apache2
apache2 authentication oidc pkce zitadel
Last synced: 3 days ago
JSON representation
Minimum ZITADEL integration with Apache2
- Host: GitHub
- URL: https://github.com/zitadel/example-apache2
- Owner: zitadel
- Created: 2023-08-17T12:13:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-15T17:01:52.000Z (over 1 year ago)
- Last Synced: 2024-11-30T02:11:23.018Z (2 months ago)
- Topics: apache2, authentication, oidc, pkce, zitadel
- Language: Dockerfile
- Homepage:
- Size: 827 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZITADEL OpenID Authentication Apache
For now, this is just a basic example. Needs some more love and review.
## Configure
### Setup PKCE client in ZITADEL
- Go to your organization and setup a new application with the type PKCE
- When created go to the "Redirect Settings" and *enable Development Mode*
- Add the Redirect Uri `http://localhost:8080/secure/callback`
- Add the Post Logout Uri `http://localhost:8080/index.html`
![Configuration](/img/configuration.png)
![Redirect Settings](/img/redirect_settings.png)You can find the url to your discovery endpoint under "URLs":
![Discovery Endpoint](/img/urls.png)### Configure Apache2
1. Rename `example.auth_openidc-httpd.conf` to `auth_openidc-httpd.conf`
2. Update the values in `auth_openidc-httpd.conf` with values from ZITADEL.auth_openidc-httpd.conf
```jsx
OIDCProviderMetadataURL https://.zitadel.cloud/.well-known/openid-configuration
OIDCClientID
# OIDCRedirectURI is a vanity URL that must point to a path protected by this module but must NOT point to any content
OIDCRedirectURI
OIDCCryptoPassphrase
```## How to run
```bash
docker build -t my-apache2 .
docker run -dit --name my-running-app -p 8080:80 my-apache2
``````Open your [browser](http://localhost:8080) and click on the link to the secure route.
## References
- https://github.com/OpenIDC/mod_auth_openidc/wiki#16-what-does-a-minimal-apache-configuration-file-look-like
- https://github.com/OpenIDC/mod_auth_openidc/blob/master/auth_openidc.conf