-
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
Fixes to make 'teleport configure' output tidier #3429
Conversation
This is shamelessly inspired by #3427 |
I can still see this being a little confusing for new users. I would suggest we update the sample YAML to provide key hints for what needs to be updated.
We should also add in |
I've updated the header - here's what the output of #
# Sample Teleport configuration file
# Creates a single proxy, auth and node server.
#
# Things to update:
# 1. ca_pin: Obtain the CA pin hash for joining more nodes by running 'tctl status'
# on the auth server once Teleport is running.
# 2. cluster-join-token: Update to a more secure static token. For more details,
# see https://gravitational.com/teleport/docs/admin-guide/#adding-nodes-to-the-cluster
# 3. license-if-using-teleport-enterprise.pem: If you are an Enterprise customer,
# obtain this from https://dashboard.gravitational.com/web/
#
teleport:
nodename: antaeus
data_dir: /var/lib/teleport
auth_token: cluster-join-token
auth_servers:
- 127.0.0.1:3025
log:
output: stderr
severity: INFO
ca_pin: sha256:ca-pin-hash-goes-here
auth_service:
enabled: "yes"
listen_addr: 0.0.0.0:3025
tokens:
- proxy,node:cluster-join-token
license_file: /path/to/license-if-using-teleport-enterprise.pem
ssh_service:
enabled: "yes"
labels:
db_role: master
db_type: postgres
commands:
- name: hostname
command: [/usr/bin/hostname]
period: 1m0s
- name: arch
command: [/usr/bin/uname, -p]
period: 1h0m0s
proxy_service:
enabled: "yes"
listen_addr: 0.0.0.0:3023
web_listen_addr: 0.0.0.0:3080
tunnel_listen_addr: 0.0.0.0:3024 What do you think we should be setting |
re: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're making changes to teleport configure
, lets stop outputting an insecure cluster join token. We probably never should have been doing that in the first place. I suggest we either generate a strong random value, or omit this entirely.
+1 for Forrests comment. @russjones Do you have thoughts on creating a strong random value? Could we leverage our current token creation setup? |
@benarent This generates a sample |
Yeah, I thinks thats a good way to start vs hard coding tokens. |
d2b2e3d
to
7078893
Compare
Made some changes to generate and use a random token automatically. New output of #
# Sample Teleport configuration file
# Creates a single proxy, auth and node server.
#
# Things to update:
# 1. ca_pin: Obtain the CA pin hash for joining more nodes by running 'tctl status'
# on the auth server once Teleport is running.
# 2. license-if-using-teleport-enterprise.pem: If you are an Enterprise customer,
# obtain this from https://dashboard.gravitational.com/web/
#
teleport:
nodename: antaeus
data_dir: /var/lib/teleport
auth_token: 701204ffbef23d04b92457d55ff21a94780e7ccf89296b7e
auth_servers:
- 127.0.0.1:3025
log:
output: stderr
severity: INFO
ca_pin: sha256:ca-pin-hash-goes-here
auth_service:
enabled: "yes"
listen_addr: 0.0.0.0:3025
tokens:
- proxy,node:701204ffbef23d04b92457d55ff21a94780e7ccf89296b7e
license_file: /path/to/license-if-using-teleport-enterprise.pem
ssh_service:
enabled: "yes"
labels:
db_role: master
db_type: postgres
commands:
- name: hostname
command: [/usr/bin/hostname]
period: 1m0s
- name: arch
command: [/usr/bin/uname, -p]
period: 1h0m0s
proxy_service:
enabled: "yes"
listen_addr: 0.0.0.0:3023
web_listen_addr: 0.0.0.0:3080
tunnel_listen_addr: 0.0.0.0:3024 |
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like test ConfigTestSuite.TestSampleConfig
is failing.
Feedback addressed, please re-review. |
Looking for feedback on this one. We have a few problems with the output of
teleport configure
which I've tried to address here.Current output of
teleport configure
:Problems:
connection_limits
is a setting not many people will need to change and it complicates the outputauth_servers
is trying to connect to a global0.0.0.0
address rather than where the auth server is actually running (which is probablylocalhost
or127.0.0.1
for anyone just starting out)ca_pin
is blank and it isn't very obvious that it will need changingsession_recording
is blank here, it should just be left on the default (node
) in most casespid_file
isn't going to need to be changed in most casesclient_idle_timeout
anddisconnect_expired_cert
should be set on a role level rather than globallykeep_alive_count_max
is set to sensible defaults and will only need changing in niche casesOverall, our sample config file has more lines than it needs, making it unnecessarily complicated for end-users setting up Teleport for the first time to understand.
We've also had feedback in the past that the config file as outputted by
teleport configure
doesn't start without first needing changes, confusing people.New output with this patch:
This config file starts 'out-of-the-box' with Teleport OSS and will provide a working Teleport cluster. For Enterprise, it will generate an error that it can't find the license file - hopefully the obvious message in the file itself will let people know that they need to provide the path to their Teleport license.
Fixes #2891