-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Cluster Configuration #1098
Comments
The core of my proposal is to make a singleton resource on the backend that contains all cluster configuration. This resource can only be updated from this section of file configuration, no other way. We need to do this for the following reason:
Teleport 2.3 Clean InstallI propose the Auth section for Teleport 2.3 look like below. type Auth struct {
// Service common configuration of a Teleport service.
Service
// ClusterName is the name of the Teleport cluster.
ClusterName string `yaml:"cluster_name,omitempty"`
// Authentication contains the authentication configuration for this cluster.
Authentication Authentication `yaml:"authentication,omitempty"`
}
type Authentication struct {
// Type can be any of the following: local, oidc, saml. If the value is "oidc"
// or "saml" a OIDCConnector or SAMLConnector connector will be used
Type string `yaml:"type"`
// SecondFactor can be any of the following: off, otp, u2f. If the value is
// "off" authentication will be password only. If the value is "otp" Google
// Authenticator and TOTP will be used. If the value is "u2f" the
// UniversalSecondFactor settings below will be used.
SecondFactor string `yaml:"second_factor,omitempty"`
// U2F contains configuration for the Universal Second Factor.
U2F *UniversalSecondFactor `yaml:"u2f,omitempty"`
}
type UniversalSecondFactor struct {
// AppID is the application ID for U2F.
AppID string `yaml:"app_id"`
// Facets is the facets for U2F.
Facets []string `yaml:"facets"`
} Teleport 2.x MigrationWe need to migrate users on Teleport 2.x to the new format, I propose we migrate the existing fields in the following manner:
|
Problem
We have two different concerns when it comes to configuration: machine configuration and cluster configuration and we have been struggling with how to solve this problem. Thus far we have been mixing and matching two different approaches to solve the problem.
teleport.yaml
configuration file. This approach is easy to understand and manage, but it is a pain to configure complex clusters with multiple Auth servers (HA).teleport.yaml
so we added this clumsy "dynamic_config" switch. Basically we treat the same thing as a resource and also as a configuration setting.Another problem with "dynamic resources" is that resources and configuration are two separate things (configuration is a singleton, resources are not).
As a result, dynamically configuring HA clusters is not easy.
Solution
The basic idea is simple. Everything in Teleport must be one of:
teleport.yaml
.tctl
.But not both at the same time.
Implementation
The above outlined problem does not affect proxies or nodes as they only have machine specific configuration. This issues only affects the Auth service section.
Fields to be removed
u2f
: Configuration for "universal 2nd factor". This field was deprecated in Teleport 2.0.Fields which will be ignored
The following fields will be ignored:
dynamic_config
,trusted_clusters
,oidc_connectors
. We will print a warning to the logs that these fields are not being ignored.High Availability (HA) Behavior
To have consistent behavior across multiple Auth Servers and make configuration simple, we will make the following changes:
Configuration is a resource on the backend called
cluster-configuration
and will contain all cluster configuration (cluster_name
,tokens
,authorities
,reverse_tunnels
, andauthentication
). Upon start we will read configuration from a file and update this resource on the backend so all the settings change atomically and all Auth Servers return a consistent answer. Thecluster-configuration
resource can only be updated from file configuration.The last Auth Server that starts will override the cluster configuration resource.
Migration
The following fields do not need to be migrated:
cluster_name
,tokens
,authorities
, andreverse_tunnels
.The
authentication
section will need to be migrated. We will need to convertClusterAuthPreference
andUniversalSecondFactorSettings
to sit withinauthentication
then push that to the backend.The text was updated successfully, but these errors were encountered: