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

Read join tokens from file, fixes #2515. #2864

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Conversation

klizhentas
Copy link
Contributor

@klizhentas klizhentas commented Jul 16, 2019

Fixes #2515

Copy link
Contributor

@webvictim webvictim left a comment

Choose a reason for hiding this comment

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

lgtm

@klizhentas
Copy link
Contributor Author

retest this please

// from the disk if it looks like a path,
// otherwise, treat it as a value
func ReadToken(token string) (string, error) {
if !strings.HasPrefix(token, "/") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we support relative paths for the other config values? If so, might be nice to support both "/" and "./".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't support relative paths yet I think, and probably a good thing as we will avoid ambiguity here

@klizhentas klizhentas merged commit 32b84e6 into master Jul 17, 2019
@klizhentas klizhentas deleted the sasha/tokenfile branch July 17, 2019 19:51
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.

Support use of a path for auth_token in teleport.yaml
4 participants