Skip to content

Instantly share code, notes, and snippets.

@mhahl
Created July 30, 2020 01:34
Show Gist options
  • Save mhahl/25fde4f517044df47b8c17cd846646e8 to your computer and use it in GitHub Desktop.
Save mhahl/25fde4f517044df47b8c17cd846646e8 to your computer and use it in GitHub Desktop.
Reverse proxy with Keycloak OIDC Auth
<VirtualHost *:*>
OIDCProviderMetadataURL https://my-keycloak.local/auth/realms/MYREALM/.well-known/openid-configuration
OIDCClientID myClientId
OIDCClientSecret 3398b570-f896-43e0-9f9a-e040da9be4ea
OIDCRedirectURI http://backend.local/
OIDCCryptoPassphrase e4ac654ba9b61686c2dc854a1128a323
ProxyPreserveHost On
<Location />
AuthType openid-connect
Require valid-user
ProxyPass http://0.0.0.0:8080/
ProxyPassReverse http://0.0.0.0:8080/
</Location>
ServerName localhost
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment