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

Corrected static token handling. #1389

Merged
merged 1 commit into from
Oct 12, 2017
Merged

Corrected static token handling. #1389

merged 1 commit into from
Oct 12, 2017

Conversation

russjones
Copy link
Contributor

@russjones russjones commented Oct 11, 2017

Purpose

Change the behavior of how static tokens are handled to match what users expect.

  1. Starting Teleport with no configuration file will set static tokens to an empty list on the backend.
  2. Starting Teleport with a configuration file but nothing defined for the tokens field will set static tokens to an empty list on the backend.
  3. Starting Teleport with a configuration file with tokens: [] will set static tokens to an empty list on the backend.
  4. Starting Teleport with a configuration file with tokens: ["node,auth,proxy:foo"] will set static tokens to an node,auth,proxy:foo backend.

Implementation

  • When Teleport starts it creates default configuration with static tokens set to an empty list.
  • If the file configuration contains values for the tokens field, then service.Config is updated with the tokens in file configuration.
  • Upon every start, static tokens are pushed to the backend overwriting whatever existed in the backend.
  • When listing tokens, only list tokens if they exist otherwise don't append anything to the list of tokens.

Related Issues

Fixes #1348

@russjones russjones merged commit 9936ae2 into master Oct 12, 2017
@russjones russjones deleted the rjones/fix-st branch October 12, 2017 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants