mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-30 01:17:21 +02:00
authenticate: use gRPC for service endpoints (#39)
* authenticate: set cookie secure as default. * authenticate: remove single flight provider. * authenticate/providers: Rename “ProviderData” to “IdentityProvider” * authenticate/providers: Fixed an issue where scopes were not being overwritten * proxy/authenticate : http client code removed. * proxy: standardized session variable names between services. * docs: change basic docker-config to be an “all-in-one” example with no nginx load. * docs: nginx balanced docker compose example with intra-ingress settings. * license: attribution for adaptation of goji’s middleware pattern.
This commit is contained in:
parent
9ca3ff4fa2
commit
c886b924e7
54 changed files with 2184 additions and 1463 deletions
|
@ -34,18 +34,29 @@ Uses the [latest pomerium build](https://hub.docker.com/r/pomerium/pomerium) fro
|
|||
|
||||
- Minimal container-based configuration.
|
||||
- Docker and Docker-Compose based.
|
||||
- Uses pre-configured built-in nginx load balancer
|
||||
- Runs separate containers for each service
|
||||
- Comes with a pre-configured instance of on-prem Gitlab-CE
|
||||
- Runs a single container for all pomerium services
|
||||
- Routes default to on-prem [helloworld], [httpbin] containers.
|
||||
|
||||
Customize for your identity provider run `docker-compose up -f basic.docker-compose.yml`
|
||||
|
||||
#### basic.docker-compose.yml
|
||||
|
||||
<<< @/docs/docs/examples/basic.docker-compose.yml
|
||||
<<< @/docs/docs/examples/docker/basic.docker-compose.yml
|
||||
|
||||
### Gitlab On-premise
|
||||
### NGINX micro-services
|
||||
|
||||
- Docker and Docker-Compose based.
|
||||
- Uses pre-configured built-in nginx load balancer
|
||||
- Runs separate containers for each service
|
||||
- Routes default to on-prem [helloworld], [httpbin], and [gitlab] containers.
|
||||
|
||||
Customize for your identity provider run `docker-compose up -f gitlab.docker-compose.yml`
|
||||
|
||||
#### nginx.docker-compose.yml
|
||||
|
||||
<<< @/docs/docs/examples/docker/nginx.docker-compose.yml
|
||||
|
||||
### Gitlab On-Prem
|
||||
|
||||
- Docker and Docker-Compose based.
|
||||
- Uses pre-configured built-in nginx load balancer
|
||||
|
@ -57,7 +68,7 @@ Customize for your identity provider run `docker-compose up -f gitlab.docker-com
|
|||
|
||||
#### gitlab.docker-compose.yml
|
||||
|
||||
<<< @/docs/docs/examples/gitlab.docker-compose.yml
|
||||
<<< @/docs/docs/examples/docker/gitlab.docker-compose.yml
|
||||
|
||||
## Kubernetes
|
||||
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
# Example Pomerium configuration.
|
||||
#
|
||||
# NOTE! Change IDP_* settings to match your identity provider settings!
|
||||
# NOTE! Generate new SHARED_SECRET and COOKIE_SECRET keys!
|
||||
# NOTE! Replace `corp.beyondperimeter.com` with whatever your domain is
|
||||
# NOTE! Make sure certificate files (cert.pem/privkey.pem) are in the same directory as this file
|
||||
# NOTE! Wrap URLs in quotes to avoid parse errors
|
||||
version: "3"
|
||||
services:
|
||||
# NGINX routes to pomerium's services depending on the request.
|
||||
nginx-proxy:
|
||||
image: jwilder/nginx-proxy:latest
|
||||
ports:
|
||||
- "443:443"
|
||||
volumes:
|
||||
# NOTE!!! : nginx must be supplied with your wildcard certificates. And it expects
|
||||
# it in the format of whatever your wildcard domain name is in.
|
||||
# see : https://github.com/jwilder/nginx-proxy#wildcard-certificates
|
||||
# So, if your subdomain is corp.beyondperimeter.com, you'd have the following :
|
||||
- ./cert.pem:/etc/nginx/certs/corp.beyondperimeter.com.crt:ro
|
||||
- ./privkey.pem:/etc/nginx/certs/corp.beyondperimeter.com.key:ro
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
|
||||
pomerium-authenticate:
|
||||
image: pomerium/pomerium:latest # or `build: .` to build from source
|
||||
environment:
|
||||
- SERVICES=authenticate
|
||||
# auth settings
|
||||
- REDIRECT_URL=https://sso-auth.corp.beyondperimeter.com/oauth2/callback
|
||||
# Identity Provider Settings (Must be changed!)
|
||||
- IDP_PROVIDER="google"
|
||||
- IDP_PROVIDER_URL="https://accounts.google.com"
|
||||
- IDP_CLIENT_ID=851877082059-bfgkpj09noog7as3gpc3t7r6n9sjbgs6.apps.googleusercontent.com
|
||||
- IDP_CLIENT_SECRET=P34wwijKRNP3skP5ag5I12kz
|
||||
- SCOPE="openid email"
|
||||
- PROXY_ROOT_DOMAIN=beyondperimeter.com
|
||||
- ALLOWED_DOMAINS=*
|
||||
# shared service settings
|
||||
# Generate 256 bit random keys e.g. `head -c32 /dev/urandom | base64`
|
||||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
|
||||
# if passing certs as files
|
||||
# - CERTIFICATE_KEY=corp.beyondperimeter.com.crt
|
||||
# - CERTIFICATE_KEY_FILE=corp.beyondperimeter.com.key
|
||||
# Or, you can pass certifcates as bas64 encoded values. e.g. `base64 -i cert.pem`
|
||||
# - CERTIFICATE=
|
||||
# - CERTIFICATE_KEY=
|
||||
|
||||
# nginx settings
|
||||
- VIRTUAL_PROTO=https
|
||||
- VIRTUAL_HOST=sso-auth.corp.beyondperimeter.com
|
||||
- VIRTUAL_PORT=443
|
||||
volumes: # volumes is optional; used if passing certificates as files
|
||||
- ./cert.pem:/pomerium/cert.pem:ro
|
||||
- ./privkey.pem:/pomerium/privkey.pem:ro
|
||||
expose:
|
||||
- 443
|
||||
|
||||
pomerium-proxy:
|
||||
image: pomerium/pomerium:latest # or `build: .` to build from source
|
||||
environment:
|
||||
- SERVICES=proxy
|
||||
# proxy settings
|
||||
- AUTHENTICATE_SERVICE_URL=https://sso-auth.corp.beyondperimeter.com
|
||||
- ROUTES=https://httpbin.corp.beyondperimeter.com=http://httpbin,https://hello.corp.beyondperimeter.com=http://hello-world/
|
||||
# Generate 256 bit random keys e.g. `head -c32 /dev/urandom | base64`
|
||||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
# If set, a JWT based signature is appended to each request header `x-pomerium-jwt-assertion`
|
||||
# - SIGNING_KEY=LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSU0zbXBaSVdYQ1g5eUVneFU2czU3Q2J0YlVOREJTQ0VBdFFGNWZVV0hwY1FvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFaFBRditMQUNQVk5tQlRLMHhTVHpicEVQa1JyazFlVXQxQk9hMzJTRWZVUHpOaTRJV2VaLwpLS0lUdDJxMUlxcFYyS01TYlZEeXI5aWp2L1hoOThpeUV3PT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
|
||||
|
||||
# if passing certs as files
|
||||
# - CERTIFICATE_KEY=corp.beyondperimeter.com.crt
|
||||
# - CERTIFICATE_KEY_FILE=corp.beyondperimeter.com.key
|
||||
# Or, you can pass certifcates as bas64 encoded values. e.g. `base64 -i cert.pem`
|
||||
# - CERTIFICATE=
|
||||
# - CERTIFICATE_KEY=
|
||||
|
||||
# nginx settings
|
||||
- VIRTUAL_PROTO=https
|
||||
- VIRTUAL_HOST=*.corp.beyondperimeter.com
|
||||
- VIRTUAL_PORT=443
|
||||
volumes: # volumes is optional; used if passing certificates as files
|
||||
- ./cert.pem:/pomerium/cert.pem:ro
|
||||
- ./privkey.pem:/pomerium/privkey.pem:ro
|
||||
expose:
|
||||
- 443
|
||||
|
||||
# https://httpbin.corp.beyondperimeter.com
|
||||
httpbin:
|
||||
image: kennethreitz/httpbin:latest
|
||||
expose:
|
||||
- 80
|
||||
# Simple hello world
|
||||
# https://hello.corp.beyondperimeter.com
|
||||
hello-world:
|
||||
image: tutum/hello-world:latest
|
||||
expose:
|
||||
- 80
|
54
docs/docs/examples/docker/basic.docker-compose.yml
Normal file
54
docs/docs/examples/docker/basic.docker-compose.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
# Example Pomerium configuration.
|
||||
#
|
||||
# NOTE! Change IDP_* settings to match your identity provider settings!
|
||||
# NOTE! Generate new SHARED_SECRET and COOKIE_SECRET keys!
|
||||
# NOTE! Replace `corp.beyondperimeter.com` with whatever your domain is
|
||||
# NOTE! Make sure certificate files (cert.pem/privkey.pem) are in the same directory as this file
|
||||
# NOTE! Wrap URLs in quotes to avoid parse errors
|
||||
version: "3"
|
||||
services:
|
||||
pomerium-all:
|
||||
image: pomerium/pomerium:latest # or `build: .` to build from source
|
||||
environment:
|
||||
- SERVICES=all
|
||||
# auth settings
|
||||
- REDIRECT_URL=https://auth.corp.beyondperimeter.com/oauth2/callback
|
||||
# Identity Provider Settings (Must be changed!)
|
||||
- IDP_PROVIDER=google
|
||||
- IDP_PROVIDER_URL=https://accounts.google.com
|
||||
- IDP_CLIENT_ID=REPLACE_ME.apps.googleusercontent.com
|
||||
- IDP_CLIENT_SECRET=REPLACE_ME
|
||||
# - SCOPE="openid email"
|
||||
- PROXY_ROOT_DOMAIN=beyondperimeter.com
|
||||
- ALLOWED_DOMAINS=*
|
||||
# shared service settings
|
||||
# Generate 256 bit random keys e.g. `head -c32 /dev/urandom | base64`
|
||||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
# proxy settings
|
||||
- AUTHENTICATE_SERVICE_URL=https://auth.corp.beyondperimeter.com
|
||||
- ROUTES=https://httpbin.corp.beyondperimeter.com=http://httpbin,https://helloworld.corp.beyondperimeter.com=http://helloworld:8080/
|
||||
# - SIGNING_KEY=LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSU0zbXBaSVdYQ1g5eUVneFU2czU3Q2J0YlVOREJTQ0VBdFFGNWZVV0hwY1FvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFaFBRditMQUNQVk5tQlRLMHhTVHpicEVQa1JyazFlVXQxQk9hMzJTRWZVUHpOaTRJV2VaLwpLS0lUdDJxMUlxcFYyS01TYlZEeXI5aWp2L1hoOThpeUV3PT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
|
||||
# if passing certs as files
|
||||
# - CERTIFICATE_KEY=corp.beyondperimeter.com.crt
|
||||
# - CERTIFICATE_KEY_FILE=corp.beyondperimeter.com.key
|
||||
# Or, you can pass certifcates as bas64 encoded values. e.g. `base64 -i cert.pem`
|
||||
# - CERTIFICATE=
|
||||
# - CERTIFICATE_KEY=
|
||||
volumes: # volumes is optional; used if passing certificates as files
|
||||
- ./cert.pem:/pomerium/cert.pem:ro
|
||||
- ./privkey.pem:/pomerium/privkey.pem:ro
|
||||
ports:
|
||||
- 443:443
|
||||
|
||||
# https://httpbin.corp.beyondperimeter.com
|
||||
httpbin:
|
||||
image: kennethreitz/httpbin:latest
|
||||
expose:
|
||||
- 80
|
||||
|
||||
# https://helloworld.corp.beyondperimeter.com
|
||||
helloworld:
|
||||
image: gcr.io/google-samples/hello-app:1.0
|
||||
expose:
|
||||
- 8080
|
|
@ -2,7 +2,7 @@ version: "3"
|
|||
|
||||
services:
|
||||
nginx:
|
||||
image: jwilder/nginx-proxy:latest
|
||||
image: pomerium/nginx-proxy:latest
|
||||
ports:
|
||||
- "443:443"
|
||||
volumes:
|
||||
|
@ -17,18 +17,17 @@ services:
|
|||
pomerium-authenticate:
|
||||
build: .
|
||||
restart: always
|
||||
depends_on:
|
||||
- "gitlab"
|
||||
environment:
|
||||
- POMERIUM_DEBUG=true
|
||||
- SERVICES=authenticate
|
||||
# auth settings
|
||||
- REDIRECT_URL=https://sso-auth.corp.beyondperimeter.com/oauth2/callback
|
||||
- IDP_PROVIDER="gitlab"
|
||||
- IDP_PROVIDER_URL=https://gitlab.corp.beyondperimeter.com
|
||||
- IDP_CLIENT_ID=022dbbd09402441dc7af1924b679bc5e6f5bf0d7a555e55b38c51e2e4e6cee76
|
||||
- IDP_CLIENT_SECRET=fb7598c520c346915ee369eee57688938fe4f31329a308c4669074da562714b2
|
||||
- PROXY_ROOT_DOMAIN=beyondperimeter.com
|
||||
- REDIRECT_URL=https://auth.corp.beyondperimeter.com/oauth2/callback
|
||||
# Identity Provider Settings (Must be changed!)
|
||||
- IDP_PROVIDER=google
|
||||
- IDP_PROVIDER_URL=https://accounts.google.com
|
||||
- IDP_CLIENT_ID=REPLACEME
|
||||
- IDP_CLIENT_SECRET=REPLACE_ME
|
||||
- PROXY_ROOT_DOMAIN=corp.beyondperimeter.com
|
||||
- ALLOWED_DOMAINS=*
|
||||
- SKIP_PROVIDER_BUTTON=false
|
||||
# shared service settings
|
||||
|
@ -36,14 +35,13 @@ services:
|
|||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
- VIRTUAL_PROTO=https
|
||||
- VIRTUAL_HOST=sso-auth.corp.beyondperimeter.com
|
||||
- VIRTUAL_HOST=auth.corp.beyondperimeter.com
|
||||
- VIRTUAL_PORT=443
|
||||
volumes: # volumes is optional; used if passing certificates as files
|
||||
- ./cert.pem:/pomerium/cert.pem:ro
|
||||
- ./privkey.pem:/pomerium/privkey.pem:ro
|
||||
expose:
|
||||
- 443
|
||||
|
||||
pomerium-proxy:
|
||||
build: .
|
||||
restart: always
|
||||
|
@ -51,12 +49,17 @@ services:
|
|||
- POMERIUM_DEBUG=true
|
||||
- SERVICES=proxy
|
||||
# proxy settings
|
||||
- AUTHENTICATE_SERVICE_URL=https://sso-auth.corp.beyondperimeter.com
|
||||
- ROUTES=https://httpbin.corp.beyondperimeter.com=http://httpbin,https://hello.corp.beyondperimeter.com=http://hello-world/
|
||||
- AUTHENTICATE_SERVICE_URL=https://auth.corp.beyondperimeter.com
|
||||
# IMPORTANT! If you are running pomerium behind another ingress (loadbalancer/firewall/etc)
|
||||
# you must tell pomerium proxy how to communicate using an internal hostname for RPC
|
||||
- AUTHENTICATE_INTERNAL_URL=pomerium-authenticate:443
|
||||
# When communicating internally, rPC is going to get a name conflict expecting an external
|
||||
# facing certificate name (i.e. authenticate-service.local vs *.corp.example.com).
|
||||
- OVERIDE_CERTIFICATE_NAME=*.corp.beyondperimeter.com
|
||||
- ROUTES=https://gitlab.corp.beyondperimeter.com=https://gitlab
|
||||
# Generate 256 bit random keys e.g. `head -c32 /dev/urandom | base64`
|
||||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
- SIGNING_KEY=LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSU0zbXBaSVdYQ1g5eUVneFU2czU3Q2J0YlVOREJTQ0VBdFFGNWZVV0hwY1FvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFaFBRditMQUNQVk5tQlRLMHhTVHpicEVQa1JyazFlVXQxQk9hMzJTRWZVUHpOaTRJV2VaLwpLS0lUdDJxMUlxcFYyS01TYlZEeXI5aWp2L1hoOThpeUV3PT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
|
||||
# nginx settings
|
||||
- VIRTUAL_PROTO=https
|
||||
- VIRTUAL_HOST=*.corp.beyondperimeter.com
|
83
docs/docs/examples/docker/nginx.docker-compose.yml
Normal file
83
docs/docs/examples/docker/nginx.docker-compose.yml
Normal file
|
@ -0,0 +1,83 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: pomerium/nginx-proxy:latest
|
||||
ports:
|
||||
- "443:443"
|
||||
volumes:
|
||||
# NOTE!!! : nginx must be supplied with your wildcard certificates. And it expects
|
||||
# it in the format of whatever your wildcard domain name is in.
|
||||
# see : https://github.com/jwilder/nginx-proxy#wildcard-certificates
|
||||
# So, if your subdomain is corp.beyondperimeter.com, you'd have the following :
|
||||
- ./cert.pem:/etc/nginx/certs/corp.beyondperimeter.com.crt:ro
|
||||
- ./privkey.pem:/etc/nginx/certs/corp.beyondperimeter.com.key:ro
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
|
||||
pomerium-authenticate:
|
||||
build: .
|
||||
restart: always
|
||||
environment:
|
||||
- POMERIUM_DEBUG=true
|
||||
- SERVICES=authenticate
|
||||
# auth settings
|
||||
- REDIRECT_URL=https://auth.corp.beyondperimeter.com/oauth2/callback
|
||||
# Identity Provider Settings (Must be changed!)
|
||||
- IDP_PROVIDER=google
|
||||
- IDP_PROVIDER_URL=https://accounts.google.com
|
||||
- IDP_CLIENT_ID=REPLACEME
|
||||
- IDP_CLIENT_SECRET=REPLACE_ME
|
||||
- PROXY_ROOT_DOMAIN=corp.beyondperimeter.com
|
||||
- ALLOWED_DOMAINS=*
|
||||
- SKIP_PROVIDER_BUTTON=false
|
||||
# shared service settings
|
||||
# Generate 256 bit random keys e.g. `head -c32 /dev/urandom | base64`
|
||||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
- VIRTUAL_PROTO=https
|
||||
- VIRTUAL_HOST=auth.corp.beyondperimeter.com
|
||||
- VIRTUAL_PORT=443
|
||||
volumes: # volumes is optional; used if passing certificates as files
|
||||
- ./cert.pem:/pomerium/cert.pem:ro
|
||||
- ./privkey.pem:/pomerium/privkey.pem:ro
|
||||
expose:
|
||||
- 443
|
||||
pomerium-proxy:
|
||||
build: .
|
||||
restart: always
|
||||
|
||||
environment:
|
||||
- POMERIUM_DEBUG=true
|
||||
- SERVICES=proxy
|
||||
# proxy settings
|
||||
- AUTHENTICATE_SERVICE_URL=https://auth.corp.beyondperimeter.com
|
||||
# IMPORTANT! If you are running pomerium behind another ingress (loadbalancer/firewall/etc)
|
||||
# you must tell pomerium proxy how to communicate using an internal hostname for RPC
|
||||
- AUTHENTICATE_INTERNAL_URL=pomerium-authenticate:443
|
||||
# When communicating internally, rPC is going to get a name conflict expecting an external
|
||||
# facing certificate name (i.e. authenticate-service.local vs *.corp.example.com).
|
||||
- OVERIDE_CERTIFICATE_NAME=*.corp.beyondperimeter.com
|
||||
- ROUTES=https://httpbin.corp.beyondperimeter.com=http://httpbin,https://hello.corp.beyondperimeter.com=http://hello:8080/
|
||||
# Generate 256 bit random keys e.g. `head -c32 /dev/urandom | base64`
|
||||
- SHARED_SECRET=aDducXQzK2tPY3R4TmdqTGhaYS80eGYxcTUvWWJDb2M=
|
||||
- COOKIE_SECRET=V2JBZk0zWGtsL29UcFUvWjVDWWQ2UHExNXJ0b2VhcDI=
|
||||
# nginx settings
|
||||
- VIRTUAL_PROTO=https
|
||||
- VIRTUAL_HOST=*.corp.beyondperimeter.com
|
||||
- VIRTUAL_PORT=443
|
||||
volumes: # volumes is optional; used if passing certificates as files
|
||||
- ./cert.pem:/pomerium/cert.pem:ro
|
||||
- ./privkey.pem:/pomerium/privkey.pem:ro
|
||||
expose:
|
||||
- 443
|
||||
|
||||
# https://httpbin.corp.beyondperimeter.com
|
||||
httpbin:
|
||||
image: kennethreitz/httpbin:latest
|
||||
expose:
|
||||
- 80
|
||||
# https://hello.corp.beyondperimeter.com
|
||||
hello:
|
||||
image: gcr.io/google-samples/hello-app:1.0
|
||||
expose:
|
||||
- 8080
|
|
@ -16,7 +16,7 @@ spec:
|
|||
app: pomerium-authenticate
|
||||
spec:
|
||||
containers:
|
||||
- image: pomerium/pomerium:latest
|
||||
- image: pomerium/pomerium:grpctest
|
||||
name: pomerium-authenticate
|
||||
ports:
|
||||
- containerPort: 443
|
||||
|
@ -26,7 +26,7 @@ spec:
|
|||
- name: SERVICES
|
||||
value: authenticate
|
||||
- name: REDIRECT_URL
|
||||
value: https://sso-auth.corp.beyondperimeter.com/oauth2/callback
|
||||
value: https://auth.corp.beyondperimeter.com/oauth2/callback
|
||||
- name: IDP_PROVIDER
|
||||
value: google
|
||||
- name: IDP_PROVIDER_URL
|
||||
|
@ -62,12 +62,6 @@ spec:
|
|||
secretKeyRef:
|
||||
name: certificate-key
|
||||
key: certificate-key
|
||||
- name: VIRTUAL_PROTO
|
||||
value: https
|
||||
- name: VIRTUAL_HOST
|
||||
value: sso-auth.corp.beyondperimeter.com
|
||||
- name: VIRTUAL_PORT
|
||||
value: "443"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
|
|
34
docs/docs/examples/kubernetes/ingress.nginx.yml
Normal file
34
docs/docs/examples/kubernetes/ingress.nginx.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: pomerium-http
|
||||
namespace: pomerium
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
||||
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
|
||||
# nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
||||
|
||||
spec:
|
||||
tls:
|
||||
- secretName: pomerium-tls
|
||||
hosts:
|
||||
- "*.corp.beyondperimeter.com"
|
||||
- "auth.corp.beyondperimeter.com"
|
||||
rules:
|
||||
- host: "*.corp.beyondperimeter.com"
|
||||
http:
|
||||
paths:
|
||||
- paths:
|
||||
backend:
|
||||
serviceName: pomerium-proxy-service
|
||||
servicePort: https
|
||||
|
||||
- host: "auth.corp.beyondperimeter.com"
|
||||
http:
|
||||
paths:
|
||||
- paths:
|
||||
backend:
|
||||
serviceName: pomerium-authenticate-service
|
||||
servicePort: https
|
|
@ -12,28 +12,20 @@ spec:
|
|||
- secretName: pomerium-tls
|
||||
hosts:
|
||||
- "*.corp.beyondperimeter.com"
|
||||
- "sso-auth.corp.beyondperimeter.com"
|
||||
- "auth.corp.beyondperimeter.com"
|
||||
rules:
|
||||
- host: "*.corp.beyondperimeter.com"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
- paths:
|
||||
backend:
|
||||
serviceName: pomerium-proxy-service
|
||||
servicePort: 443
|
||||
- path: /*
|
||||
backend:
|
||||
serviceName: pomerium-proxy-service
|
||||
servicePort: 443
|
||||
servicePort: https
|
||||
|
||||
- host: "sso-auth.corp.beyondperimeter.com"
|
||||
- host: "auth.corp.beyondperimeter.com"
|
||||
http:
|
||||
paths:
|
||||
- path: /*
|
||||
- paths:
|
||||
backend:
|
||||
serviceName: pomerium-authenticate-service
|
||||
servicePort: 443
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: pomerium-authenticate-service
|
||||
servicePort: 443
|
||||
servicePort: https
|
||||
|
|
|
@ -16,7 +16,7 @@ spec:
|
|||
app: pomerium-proxy
|
||||
spec:
|
||||
containers:
|
||||
- image: pomerium/pomerium:latest
|
||||
- image: pomerium/pomerium:grpctest
|
||||
name: pomerium-proxy
|
||||
ports:
|
||||
- containerPort: 443
|
||||
|
@ -24,11 +24,15 @@ spec:
|
|||
protocol: TCP
|
||||
env:
|
||||
- name: ROUTES
|
||||
value: https://httpbin.corp.beyondperimeter.com=https://httpbin.org
|
||||
value: https://httpbin.corp.beyondperimeter.com=https://httpbin.org,https://hi.corp.beyondperimeter.com=http://hello-app.pomerium.svc.cluster.local:8080
|
||||
- name: SERVICES
|
||||
value: proxy
|
||||
- name: AUTHENTICATE_SERVICE_URL
|
||||
value: https://sso-auth.corp.beyondperimeter.com
|
||||
value: https://auth.corp.beyondperimeter.com
|
||||
- name: AUTHENTICATE_INTERNAL_URL
|
||||
value: "pomerium-authenticate-service.pomerium.svc.cluster.local:443"
|
||||
- name: OVERIDE_CERTIFICATE_NAME
|
||||
value: "*.corp.beyondperimeter.com"
|
||||
- name: SHARED_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
@ -54,12 +58,6 @@ spec:
|
|||
secretKeyRef:
|
||||
name: certificate-key
|
||||
key: certificate-key
|
||||
- name: VIRTUAL_PROTO
|
||||
value: https
|
||||
- name: VIRTUAL_HOST
|
||||
value: "*.corp.beyondperimeter.com"
|
||||
- name: VIRTUAL_PORT
|
||||
value: "443"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
|
|
|
@ -10,9 +10,9 @@ description: >-
|
|||
|
||||
This article describes how to configure pomerium to use a third-party identity service for single-sign-on.
|
||||
|
||||
There are a few configuration steps required for identity provider integration. Most providers support [OpenID Connect] which provides a standardized interface for authentication. In this guide we'll cover how to do the following for each identity provider:
|
||||
There are a few configuration steps required for identity provider integration. Most providers support [OpenID Connect] which provides a standardized interface for IdentityProvider. In this guide we'll cover how to do the following for each identity provider:
|
||||
|
||||
1. Establish a **Redirect URL** with the identity provider which is called after authentication.
|
||||
1. Establish a **Redirect URL** with the identity provider which is called after IdentityProvider.
|
||||
2. Generate a **Client ID** and **Client Secret**.
|
||||
3. Configure pomerium to use the **Client ID** and **Client Secret** keys.
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ Run [./scripts/kubernetes_gke.sh] which will:
|
|||
1. Provision a new cluster
|
||||
2. Create authenticate and proxy [deployments](https://cloud.google.com/kubernetes-engine/docs/concepts/deployment).
|
||||
3. Provision and apply authenticate and proxy [services](https://cloud.google.com/kubernetes-engine/docs/concepts/service).
|
||||
4. Configure an ingress to do serve TLS between client and load balancer
|
||||
4. Configure an ingress load balancer.
|
||||
|
||||
```bash
|
||||
sh ./scripts/kubernetes_gke.sh
|
||||
|
|
|
@ -20,7 +20,7 @@ Place your domain's wild-card TLS certificate next to the compose file. If you d
|
|||
|
||||
## Run
|
||||
|
||||
Docker-compose will automatically download the latest pomerium release as well as two example containers and an nginx load balancer all in one step.
|
||||
Docker-compose will automatically download the latest pomerium release as well as two example containers.
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue