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

TLS termination and its config #32

Merged
merged 1 commit into from
Nov 5, 2023
Merged
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
10 changes: 4 additions & 6 deletions .vale/Vocab/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ Subcommand
grpcAddress
enableTicker
tickInterval
multiCore
lockOSThread
loadBalancer
roundrobin
reuseAddress
reusePort
enableTLS
certFile
keyFile
handshakeTimeout
syslog
namespace
client_connections
Expand Down
2 changes: 1 addition & 1 deletion developing-plugins/grpc-api-reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: gRPC API Reference
description: GatewayD exposes a gRPC API that can be used to interact with the GatewayD plugin system. This API can be used by the GatewayD plugins and is available in the GatewayD SDK.
Expand Down
2 changes: 1 addition & 1 deletion developing-plugins/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Developing Plugins
nav_order: 4
Expand Down
2 changes: 1 addition & 1 deletion developing-plugins/plugin-developers-guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugin Developers Guide
description: Plugin developers' guide of GatewayD
Expand Down
2 changes: 1 addition & 1 deletion developing-plugins/sdk-reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: SDK Reference
description: The GatewayD plugin SDK provides a number of interfaces, structs and methods to help you build your plugin.
Expand Down
2 changes: 1 addition & 1 deletion developing-plugins/template-projects.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Template Projects
description: Template projects can be used to quickly get started with developing plugins.
Expand Down
2 changes: 1 addition & 1 deletion getting-started/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Getting Started
nav_order: 1
Expand Down
2 changes: 1 addition & 1 deletion getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Installation
description: How to install GatewayD and its plugins on different platforms and how to build it from source.
Expand Down
2 changes: 1 addition & 1 deletion getting-started/running-gatewayd.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Running GatewayD
description: How to run GatewayD and test it with psql
Expand Down
2 changes: 1 addition & 1 deletion getting-started/welcome.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Welcome
description: Introduction to GatewayD and its key features
Expand Down
2 changes: 1 addition & 1 deletion miscellaneous/glossary.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Glossary
description: Glossary of GatewayD terms
Expand Down
2 changes: 1 addition & 1 deletion miscellaneous/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Miscellaneous
nav_order: 6
Expand Down
2 changes: 1 addition & 1 deletion miscellaneous/telemetry-and-usage-report.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Telemetry and Usage Report
description: Telemetry and usage report of GatewayD
Expand Down
2 changes: 1 addition & 1 deletion plugins/gatewayd-plugin-cache.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: gatewayd-plugin-cache
description: GatewayD plugin for caching query results in Redis.
Expand Down
2 changes: 1 addition & 1 deletion plugins/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugins
nav_order: 5
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/API.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: API
description: GatewayD exposes a gRPC API with an HTTP gateway for querying and managing the `gatewayd` process and its plugins.
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/CLI.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: CLI
description: GatewayD is a CLI application that runs on Windows, Linux-based distributions and macOS.
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/clients.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Clients
description: Client object is a client that can connect to the database servers over TCP, UDP and Unix Domain Socket.
Expand Down
6 changes: 5 additions & 1 deletion using-gatewayd/configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Configuration
description: GatewayD is fully configurable via various sources, including default values, YAML config files, environment variables, CLI flags and plugins.
Expand Down Expand Up @@ -99,6 +99,10 @@ servers:
address: 0.0.0.0:15432
enableTicker: False
tickInterval: 5s # duration
enableTLS: False
certFile: ""
keyFile: ""
handshakeTimeout: 5s # duration

api:
enabled: True
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/connection-lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Connection Lifecycle
description: Connection Lifecycle of GatewayD
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: API
description: GatewayD gRPC API configuration
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/clients.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Clients
description: GatewayD client configuration
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Global Configuration
nav_order: 2
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/loggers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Loggers
description: GatewayD logger configuration
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/metrics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Metrics
description: GatewayD metrics configuration
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/pools.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Pools
description: GatewayD pool configuration
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/global-configuration/proxies.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Proxies
description: GatewayD proxy configuration
Expand Down
24 changes: 16 additions & 8 deletions using-gatewayd/global-configuration/servers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Servers
description: GatewayD server configuration
Expand All @@ -10,16 +10,20 @@ grand_parent: Using GatewayD

# Servers

The server object runs to listen for incoming connections from database clients. The server object has the following parameters:
The server object runs to listen for incoming connections from database clients. It supports TLS termination, if enabled. The server object has the following parameters:

## Configuration parameters

| Name | Type | Default value | Possible values | Description |
| ------------ | ------- | ------------- | --------------- | ----------------------------------- |
| network | string | tcp | tcp, unix | The network protocol to use |
| address | string | 0.0.0.0:15432 | Valid host:port | The address to listen on |
| enableTicker | boolean | False | True, False | Whether to enable the ticker or not |
| tickInterval | string | 5s | Valid duration | The interval of the ticker |
| Name | Type | Default value | Possible values | Description |
| ---------------- | ------- | ------------- | --------------- | ----------------------------------- |
| network | string | tcp | tcp, unix | The network protocol to use |
| address | string | 0.0.0.0:15432 | Valid host:port | The address to listen on |
| enableTicker | boolean | False | True, False | Whether to enable the ticker or not |
| tickInterval | string | 5s | Valid duration | The interval of the ticker |
| enableTLS | boolean | False | True, False | Whether to enable TLS or not |
| certFile | string | | Valid path | The path to the TLS certificate |
| keyFile | string | | Valid path | The path to the TLS key |
| handshakeTimeout | string | 5s | Valid duration | The timeout for TLS handshake |

## Example configuration

Expand All @@ -30,4 +34,8 @@ servers:
address: 0.0.0.0:15432
enableTicker: False
tickInterval: 5s # duration
enableTLS: False
certFile: ""
keyFile: ""
handshakeTimeout: 5s # duration
```
2 changes: 1 addition & 1 deletion using-gatewayd/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Using GatewayD
nav_order: 2
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/observability.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Observability
description: Observability is a first-class citizen of GatewayD. It generates logs, metrics and traces to make it easier to see what is going on inside.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: General configurations
description: General configurations for plugins
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/plugins-configuration/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugins Configuration
nav_order: 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugins configuration
description: GatewayD plugins configuration
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/pools.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Pools
description: GatewayD has a generic internal pool object that is used to manage plugins and connections.
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/protocols.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Protocols
description: GatewayD is application layer protocol-agnostic. This means that GatewayD *can* practically support any protocol in the application layer, or L7.
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/proxies.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Proxies
description: Proxy object is used to create a binding between incoming connections from the database clients to the database servers.
Expand Down
6 changes: 5 additions & 1 deletion using-gatewayd/servers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Servers
description: Server is an object that listens on an address:port pair and accepts connections from database clients.
Expand Down Expand Up @@ -47,3 +47,7 @@ The server can accept an unlimited number of connections. However, the [pool](po
## Ticker

The server object has a ticker that fires every `tickInterval` seconds. The `tickInterval` value is configurable from the [`servers`](/using-gatewayd/global-configuration/servers) configuration object in the global configuration file: `gatewayd.yaml`. The ticker is used to perform periodic tasks, but it is disabled by default. Plugins can use the ticker to perform periodic tasks.

## TLS termination

The server object supports TLS termination, which means that the server object can accept TLS connections from the database clients and forward the traffic to the database server in plain text. The TLS parameters are configurable from the [`servers`](/using-gatewayd/global-configuration/servers) configuration object in the global configuration file: `gatewayd.yaml`.
2 changes: 1 addition & 1 deletion using-plugins/hook-registry.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Hook registry
description: The hook registry is a central place where all hooks are registered and executed. It is used by the plugin registry to register and execute plugin hooks.
Expand Down
2 changes: 1 addition & 1 deletion using-plugins/hooks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Hooks
description: Plugins can be used to modify the connection lifecycle. Each step in the connection lifecycle is represented by one or more plugin hook(s). Plugins can register themselves to be called when a specific hook is triggered.
Expand Down
2 changes: 1 addition & 1 deletion using-plugins/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Using Plugins
nav_order: 3
Expand Down
2 changes: 1 addition & 1 deletion using-plugins/plugin-registry.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugin registry
description: The plugin registry is a central place where all plugins are loaded, configured and executed, and also the main entry point for all plugins.
Expand Down
2 changes: 1 addition & 1 deletion using-plugins/plugin-types.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugin types
description: >
Expand Down
2 changes: 1 addition & 1 deletion using-plugins/plugins.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Plugins
description: Plugins play a very important role in GatewayD for adding support for different databases. They are the building blocks of GatewayD, and they are responsible for the majority of the functionality of GatewayD.
Expand Down
2 changes: 1 addition & 1 deletion using-plugins/proposals.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 2023-10-20 01:04:31 +0200
last_modified_date: 2023-10-31 20:00:22 +0100
layout: default
title: Proposals
description: GatewayD proposals are used to propose new ideas and features for GatewayD.
Expand Down
Loading