-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated reverse-proxy-configuration-pomerium.adoc
- Loading branch information
1 parent
930674c
commit 14213dc
Showing
1 changed file
with
80 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -307,88 +307,88 @@ Ensure that you have Pomerium installed and configured according to the [Pomeriu | |
|
||
### Configuration Steps | ||
|
||
1. **Update Pomerium Configuration:** | ||
|
||
Add and update the following to your Pomerium configuration to enable Unix domain sockets: | ||
|
||
```yaml title=config.yaml | ||
authenticate_service_url: https://authenticate.localhost.pomerium.io/oauth2/callback | ||
|
||
idp_provider: REPLACE_ME | ||
idp_provider_url: REPLACE_ME | ||
idp_client_id: REPLACE_ME | ||
idp_client_secret: REPLACE_ME | ||
|
||
signing_key: REPLACE_ME | ||
|
||
routes: | ||
- from: https://verify.localhost.pomerium.io | ||
to: http://verify:8000 | ||
pass_identity_headers: true | ||
allow_websockets: true | ||
policy: | ||
- allow: | ||
and: | ||
- email: | ||
is: [email protected] | ||
- from: https://jenkins.localhost.pomerium.io | ||
to: http://jenkins:8080 | ||
host_rewrite_header: true | ||
pass_identity_headers: true | ||
policy: | ||
- allow: | ||
and: | ||
- domain: | ||
is: example.com | ||
- user: | ||
is: username | ||
``` | ||
|
||
2. **Configure Jenkins:** | ||
|
||
Ensure that Jenkins is configured to listen on the Unix domain socket. Update your Jenkins configuration as follows: | ||
|
||
```yaml title=docker-compose.yaml | ||
## 1. Update Pomerium Configuration : | ||
|
||
Add and update the following to your Pomerium configuration to enable Unix domain sockets: | ||
|
||
```yaml | ||
authenticate_service_url: https://authenticate.localhost.pomerium.io/oauth2/callback | ||
|
||
idp_provider: REPLACE_ME | ||
idp_provider_url: REPLACE_ME | ||
idp_client_id: REPLACE_ME | ||
idp_client_secret: REPLACE_ME | ||
|
||
signing_key: REPLACE_ME | ||
|
||
routes: | ||
- from: https://verify.localhost.pomerium.io | ||
to: http://verify:8000 | ||
pass_identity_headers: true | ||
allow_websockets: true | ||
policy: | ||
- allow: | ||
and: | ||
- email: | ||
is: [email protected] | ||
- from: https://jenkins.localhost.pomerium.io | ||
to: http://jenkins:8080 | ||
host_rewrite_header: true | ||
pass_identity_headers: true | ||
policy: | ||
- allow: | ||
and: | ||
- domain: | ||
is: example.com | ||
- user: | ||
is: username | ||
``` | ||
|
||
## 2. Configure Jenkins : | ||
|
||
Ensure that Jenkins is configured to listen on the Unix domain socket. Update your Jenkins configuration as follows: | ||
|
||
```yaml | ||
networks: | ||
main: {} | ||
services: | ||
pomerium: | ||
image: pomerium/pomerium:latest | ||
volumes: | ||
- ./config.yaml:/pomerium/config.yaml:ro | ||
- /var/run/jenkins.sock:/var/run/jenkins.sock | ||
ports: | ||
- 443:443 | ||
networks: | ||
main: | ||
aliases: | ||
- authenticate.localhost.pomerium.io | ||
|
||
verify: | ||
networks: | ||
main: {} | ||
services: | ||
pomerium: | ||
image: pomerium/pomerium:latest | ||
volumes: | ||
- ./config.yaml:/pomerium/config.yaml:ro | ||
- /var/run/jenkins.sock:/var/run/jenkins.sock | ||
ports: | ||
- 443:443 | ||
networks: | ||
main: | ||
aliases: | ||
- authenticate.localhost.pomerium.io | ||
|
||
verify: | ||
networks: | ||
main: {} | ||
image: pomerium/verify:latest | ||
expose: | ||
- 8000 | ||
|
||
jenkins: | ||
networks: | ||
main: {} | ||
image: jenkins/jenkins:lts-jdk11 | ||
privileged: true | ||
user: root | ||
environment: | ||
JAVA_OPTS: "-Djenkins.httpListenAddress=unix:/var/run/jenkins/jenkins.socket" | ||
JENKINS_UNIX_DOMAIN_PATH: "/var/run/jenkins/jenkins.socket" | ||
volumes: | ||
- ./home/jenkins_compose/jenkins_configuration:/var/jenkins_home | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /var/run/jenkins:/var/run/jenkins | ||
``` | ||
|
||
3. **Restart Services:** | ||
|
||
Restart both Jenkins and Pomerium to apply the new configuration. | ||
image: pomerium/verify:latest | ||
expose: | ||
- 8000 | ||
|
||
jenkins: | ||
networks: | ||
main: {} | ||
image: jenkins/jenkins:lts-jdk11 | ||
privileged: true | ||
user: root | ||
environment: | ||
JAVA_OPTS: "-Djenkins.httpListenAddress=unix:/var/run/jenkins/jenkins.socket" | ||
JENKINS_UNIX_DOMAIN_PATH: "/var/run/jenkins/jenkins.socket" | ||
volumes: | ||
- ./home/jenkins_compose/jenkins_configuration:/var/jenkins_home | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /var/run/jenkins:/var/run/jenkins | ||
``` | ||
|
||
## 3. Restart Services : | ||
|
||
Restart both Jenkins and Pomerium to apply the new configuration. | ||
|
||
### Verification | ||
|
||
|