Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates configuration page #1532

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/capabilities/high-availability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import InstallMkcert from '@site/content/_install-mkcert.md';

Pomerium is designed to be run in two modes: All-In-One or Split Service. These modes are not mutually exclusive, meaning you can run one or multiple instances of Pomerium in all-in-one mode, and spin up additional instances for specific components as needed.

Each instance of Pomerium runs in all-in-one mode unless specified to run as a specific component by the `services` key. See [All-In-One vs. Split Service mode](/docs/internals/configuration#all-in-one-vs-split-service-mode) for more details.
Each instance of Pomerium runs in all-in-one mode unless specified to run as a specific component by the `services` key. See [All-in-One vs. Split Service mode](/docs/core/configuration#all-in-one-and-split-service-modes) for more details.

:::caution

Expand Down
2 changes: 1 addition & 1 deletion content/docs/capabilities/mtls-services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To provide a general explanation, in this guide you will use [mkcert](https://gi

To complete this proof-of-concept guide:

- Run Pomerium in [all-in-one mode](/docs/internals/configuration#all-in-one-vs-split-service-mode) as a system service with a configuration file in the [standard location](/docs/core/from-source#configure)
- Run Pomerium in [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes) as a system service with a configuration file in the [standard location](/docs/core/from-source#configure)
- Configure an [identity provider](/docs/identity-providers) (IdP) to communicate with your Pomerium instance
- Run all commands on the same host (You may have to move files or adjust paths and commands to match a different configuration)
- Install [`mkcert`](https://github.com/FiloSottile/mkcert) to generate self-signed certificates and a root Certificate Authority (CA) (`mkcert` will take the place of your trusted certificate tooling solution)
Expand Down
2 changes: 1 addition & 1 deletion content/docs/concepts/mutual-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This guide covers the following mutual authentication methods with Pomerium:

This section provides examples of mutual authentication methods you can implement with Pomerium.

Each example diagrams Pomerium as a single service, as it is in [all-in-one mode](/docs/internals/configuration#all-in-one-vs-split-service-mode). This is the version provided by our [binaries] and in our Docker-based [Quickstart].
Each example diagrams Pomerium as a single service, as it is in [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes). This is the version provided by our [binaries] and in our Docker-based [Quickstart].

### Basic Pomerium installation

Expand Down
59 changes: 59 additions & 0 deletions content/docs/core/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Configuration
description: This page discusses configuration settings for Pomerium Core.
keywords: [core configuration]
sidebar_label: Configuration
---

# Configuration

You can configure Pomerium using either a configuration file or [environment variables](https://en.wikipedia.org/wiki/Environment_variable). If using a configuration file, the following languages are supported:

- [YAML](https://yaml.org/)
- [JSON](https://www.json.org/json-en.html)
- [TOML](https://toml.io/en/)
ZPain8464 marked this conversation as resolved.
Show resolved Hide resolved

(Our documentation always assumes a YAML configuration file.)

You can use both environment variables and a configuration file. If a particular option is set using both an environment variable and a config file key, the environment variable will take precedence.

:::tip

Pomerium can hot-reload route configuration details, authorization policy, certificates, and other proxy settings.

:::

### Configuration syntax

Both configuration file keys and environment variables are case sensitive.

Configuration file keys are always lowercase. Environment variables are identical to configuration file keys, except they are always uppercase.

See the [Reference](/docs/reference) page for a comprehensive list of Pomerium's configuration settings.

## All-in-One and Split-Service modes

You can configure Pomerium using either All-in-One mode or Split-Service mode.

### All-in-One mode

All-in-One mode means a single Pomerium process runs all of the [four logical services](/docs/internals/architecture#component-level). You can use All-in-One mode when running Pomerium:

- As a single system service or container, or
- In a distributed environment where there are multiple processes that each handle separate [Pomerium services](/docs/internals/architecture#component-level).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what this is saying. In all-in-one mode the services are combined, not separate.


All-in-One mode is the default configuration mode, and the easiest way to configure Pomerium.

### Split-Service mode

Alternately, you can create individual configuration files (or sets of environment variables) for each Pomerium service. In Split-Service mode, each configuration file (or set of environment variables) defines which service a process will run by using the [service mode](/docs/reference/service-mode) key.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to start with a brief explanation of how split service mode differs from all-in-one mode. Probably also good to link to the Service URL Settings page here. Maybe something like this?

Suggested change
Alternately, you can create individual configuration files (or sets of environment variables) for each Pomerium service. In Split-Service mode, each configuration file (or set of environment variables) defines which service a process will run by using the [service mode](/docs/reference/service-mode) key.
Alternatively, you can run each Pomerium service as its own process. You might want to do this in order to scale each service independently, or so that you can enforce different permissions on each service.
To configure Pomerium in this mode, you will need to create individual configuration files (or sets of environment variables) for each Pomerium service. Each configuration should set the [Service Mode](/docs/reference/service-mode) option to tell Pomerium which service to run. You will also need the [Service URL Settings](/docs/reference/service-urls) to tell each Pomerium service how to communicate with the other Pomerium services.


:::tip Our recommendation

We recommend All-in-One mode to configure Pomerium for the following reasons:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word order here feels backwards to me.

Suggested change
We recommend All-in-One mode to configure Pomerium for the following reasons:
We recommend running Pomerium in all-in-one mode for the following reasons:


- **Reduce complexity**: All-in-One mode reduces the complexity of managing configuration. A single configuration file means there is one source of truth.
- **Secure communication**: Pomerium services communicate internally. Splitting up services requires securing these endpoints and configuring DNS records for each service.
- **Scaling**: All-in-One deployments scale for better performance. All URLs point at the same Pomerium service instance.

:::
2 changes: 1 addition & 1 deletion content/docs/internals/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The points below outline the Databroker’s role in the request and session life

In production deployments, it is recommended that you deploy each component [separately](/docs/reference/service-mode). This allows you to limit external attack surface, as well as scale and manage the services independently.

In test deployments, all four components may run from a [single binary and configuration](/docs/internals/configuration#all-in-one-vs-split-service-mode).
In test deployments, all four components may run from a [single binary and configuration](/docs/core/configuration#all-in-one-and-split-service-modes).

![pomerium architecture diagram](./img/architecture/pomerium-container-context-stateless-authn.svg)

Expand Down
35 changes: 0 additions & 35 deletions content/docs/internals/configuration.md

This file was deleted.

2 changes: 1 addition & 1 deletion content/docs/k8s/ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The [Pomerium Kubernetes Ingress Controller](https://github.com/pomerium/ingress

Pomerium’s Ingress Controller for Kubernetes enables you to dynamically provision routes from Ingress resources and set authorization policy on those routes with Ingress annotations. By defining routes as Ingress resources in the Kubernetes API, you can easily create and remove those routes from your Pomerium configuration.

If you've tested Pomerium using the [all-in-one binary](/docs/core), you're probably familiar with configuring routes in Pomerium's [`config.yaml`](/docs/internals/configuration) file. When using the Pomerium Ingress Controller, each route is defined as an Ingress resource in the Kubernetes API.
If you've tested Pomerium using the [all-in-one binary](/docs/core), you're probably familiar with configuring routes in Pomerium's [`config.yaml`](/docs/core/configuration) file. When using the Pomerium Ingress Controller, each route is defined as an Ingress resource in the Kubernetes API.

This document shows you how to configure an Ingress resource that’s compatible with the Pomerium Ingress Controller.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ pagination_next: null

import ReferenceTable from '../../src/components/ReferenceTable';

For details on how to set configuration settings see the [configuration internals](/docs/internals/configuration) page.
For details on how to set configuration settings see the [configuration](/docs/core/configuration) page.

<ReferenceTable />
6 changes: 3 additions & 3 deletions content/docs/reference/grpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This reference covers all of Pomerium's **gRPC Settings**:

| **Config file keys** | **Environment variables** | **Type** | **Default** |
| :-- | :-- | :-- | :-- |
| `grpc_address` | `GRPC_ADDRESS` | `string` | `:443` (`:5443` if in [all-in-one](/docs/internals/configuration#all-in-one-vs-split-service-mode) mode) |
| `grpc_address` | `GRPC_ADDRESS` | `string` | `:443` (`:5443` if in [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes)) |

### Examples {#examples-grpc-address}

Expand Down Expand Up @@ -130,7 +130,7 @@ Kubernetes does not support **gRPC Client Timeout**

## gRPC Insecure {#grpc-insecure}

**gRPC Insecure** disables transport security for gRPC communication. If running in [all-in-one](/docs/internals/configuration#all-in-one-vs-split-service-mode) mode, defaults to true as communication will run over localhost's own socket.
**gRPC Insecure** disables transport security for gRPC communication. If running in [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes), defaults to true as communication will run over localhost's own socket.

### How to configure {#how-to-configure-grpc-insecure}

Expand All @@ -139,7 +139,7 @@ Kubernetes does not support **gRPC Client Timeout**

| **Config file keys** | **Environment variables** | **Type** | **Default** |
| :-- | :-- | :-- | :-- |
| `grpc_insecure` | `GRPC_INSECURE` | `boolean` | `true` (If in [all-in-one](/docs/internals/configuration#all-in-one-vs-split-service-mode) mode) |
| `grpc_insecure` | `GRPC_INSECURE` | `boolean` | `true` (If in [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes)) |

### Examples {#examples-grpc-insecure}

Expand Down
4 changes: 2 additions & 2 deletions content/docs/reference/metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ Identity manager metrics have a `pomerium_identity_manager` prefix.

As of `v0.9`, Pomerium uses [Envoy](https://www.envoyproxy.io/) for the data plane. As such, proxy related metrics are sourced from Envoy, and use Envoy's internal [stats data model](https://www.envoyproxy.io/docs/envoy/latest/operations/stats_overview). Please see Envoy's documentation for information about specific metrics.

All metrics coming from Envoy will be labeled with `service="pomerium"` or `service="pomerium-proxy"`, depending if you're running all-in-one or distributed service mode and have `pomerium` prefix added to the standard envoy metric name.
All metrics coming from Envoy will be labeled with `service="pomerium"` or `service="pomerium-proxy"`, depending if you're running all-in-one or split-service mode and have `pomerium` prefix added to the standard envoy metric name.

See [Configuration & Settings](/docs/internals/configuration#all-in-one-vs-split-service-mode) for more information configuration environments.
See [All-in-One and Split-Service modes](/docs/core/configuration#all-in-one-and-split-service-modes) for more information about configuration environments.

## Metrics Basic Authentication {#metrics-basic-authentication}

Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/service-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import TabItem from '@theme/TabItem';

## Summary

**Service Mode** sets which service(s) to run. If testing, you may want to set to `all` and run Pomerium in [all-in-one mode](/docs/internals/configuration#all-in-one-vs-split-service-mode). In production, you'll likely want to spin up several instances of each service mode for [high availability](/docs/capabilities/high-availability).
**Service Mode** sets which service(s) to run. If testing, you may want to set to `all` and run Pomerium in [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes). In production, you'll likely want to spin up several instances of each service mode for [high availability](/docs/capabilities/high-availability).

## How to configure

Expand Down
10 changes: 5 additions & 5 deletions content/docs/reference/service-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If not set, Pomerium will use the [Hosted Authenticate Service](/docs/capabiliti

If you prefer to use your own [identity provider](/docs/identity-providers), you'll need to set an authenticate service URL, and you will need this URL when configuring your identity provider client's OAuth callback URL.

If Pomerium is running in [split-service mode](/docs/internals/configuration#all-in-one-vs-split-service-mode), each Pomerium service requires the authenticate service URL in its configuration.
If Pomerium is running in [split-service mode](/docs/core/configuration#all-in-one-and-split-service-modes), each Pomerium service requires the authenticate service URL in its configuration.

:::info

Expand Down Expand Up @@ -233,8 +233,8 @@ The **Databroker Service URL** settings points to a databroker which is responsi

| **Config file keys** | **Environment variables** | **Type** | **Default** |
| :-- | :-- | :-- | :-- |
| `databroker_service_url` | `DATABROKER_SERVICE_URL` | `URL` | `http://localhost:5443` (In [all-in-one mode](/docs/internals/configuration#all-in-one-vs-split-service-mode)) |
| `databroker_service_urls` | `DATABROKER_SERVICE_URLS` | `URL` | `http://localhost:5443` (In [all-in-one mode](/docs/internals/configuration#all-in-one-vs-split-service-mode)) |
| `databroker_service_url` | `DATABROKER_SERVICE_URL` | `URL` | `http://localhost:5443` (In [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes)) |
| `databroker_service_urls` | `DATABROKER_SERVICE_URLS` | `URL` | `http://localhost:5443` (In [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes)) |

#### Examples {#databroker-service-url-examples}

Expand Down Expand Up @@ -272,8 +272,8 @@ The **Databroker Internal Service URL** overrides [`databroker_service_url`](/do

| **Config file keys** | **Environment variables** | **Type** | **Default** |
| :-- | :-- | :-- | :-- |
| `databroker_internal_service_url` | `DATABROKER_INTERNAL_SERVICE_URL` | `URL` | `http://localhost:5443` (In all-in-one mode) |
| `databroker_internal_service_urls` | `DATABROKER_INTERNAL_SERVICE_URLS` | `URL` | `http://localhost:5443` (In all-in-one mode) |
| `databroker_internal_service_url` | `DATABROKER_INTERNAL_SERVICE_URL` | `URL` | `http://localhost:5443` (In [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes)) |
| `databroker_internal_service_urls` | `DATABROKER_INTERNAL_SERVICE_URLS` | `URL` | `http://localhost:5443` (In [all-in-one mode](/docs/core/configuration#all-in-one-and-split-service-modes)) |

#### Examples {#databroker-internal-service-url-examples}

Expand Down
9 changes: 8 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ const sidebars = {
type: 'category',
label: 'Pomerium Core',
link: {type: 'doc', id: 'docs/core'},
items: [{type: 'autogenerated', dirName: 'docs/core'}],
items: [
'docs/core/quickstart',
'docs/core/configuration',
'docs/core/changelog',
'docs/core/upgrading',
'docs/core/from-source',
'docs/core/binary',
],
},
{
type: 'category',
Expand Down
3 changes: 2 additions & 1 deletion static/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/docs/releases /docs/deploy/releases
/docs/deploy/releases /docs/community/contributing

# Configuration & Settings Reference (reference links redirect correctly)
# Configuration & Settings Reference
/docs/reference/reference /docs/reference
/docs/reference/reference.html /docs/reference
/docs/configuration/ /docs/reference
Expand All @@ -25,6 +25,7 @@
/docs/security /docs/internals/security
/docs/security.html /docs/internals/security
/docs/community/security.html /docs/internals/security
/docs/internals/configuration /docs/core/configuration

# Guide and examples links
/guide/ /docs/quick-start/
Expand Down
Loading