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

Connect My Computer: Generate the config file #29010

Merged
merged 16 commits into from
Jul 25, 2023

Conversation

gzdunek
Copy link
Contributor

@gzdunek gzdunek commented Jul 12, 2023

Contributes to #27881

This PR adds generating the agent config file. To do this, we first have to create the join token for a node (this is done via CreateConnectMyComputerNodeToken). Created token is then passed (with a few other params) to createAgentConfigFile function that creates the spawns teleport configure process.

RFD section https://github.com/gravitational/teleport/blob/master/rfd/0133-connect-my-computer.md#generating-the-config-file

I didn't run token removal (although I added a gRPC handler for it). I left a TODO for myself to do this along with joining the cluster.

@gzdunek gzdunek requested a review from ravicious July 12, 2023 16:40
@gzdunek gzdunek mentioned this pull request Jul 12, 2023
8 tasks
@gzdunek
Copy link
Contributor Author

gzdunek commented Jul 13, 2023

Please do not review it yet, I misunderstood the point of SuggestedLabels - I thought they are added to the resource 🤦‍♂️
Our code uses them to generate "real labels" in join scripts.
We need to add them through --labels flag in the teleport configure.

@gzdunek gzdunek force-pushed the gzdunek/cmc-agent-config-file branch from 5140e39 to fa24094 Compare July 13, 2023 09:56
@gzdunek
Copy link
Contributor Author

gzdunek commented Jul 13, 2023

Ready for review.

Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

Didn't have much time to review this, I'll come back to it tomorrow.

lib/teleterm/daemon/daemon.go Outdated Show resolved Hide resolved
@ravicious ravicious self-requested a review July 17, 2023 13:43
@gzdunek gzdunek force-pushed the gzdunek/cmc-agent-config-file branch from fa24094 to fefda87 Compare July 18, 2023 13:16
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

I haven't tried it out in the dev version yet, but the code looks good overall.

proto/teleport/lib/teleterm/v1/service.proto Outdated Show resolved Hide resolved
@ravicious ravicious force-pushed the ravicious/cmc-roles-frontend branch from f95729c to e3f1c9f Compare July 20, 2023 10:24
Base automatically changed from ravicious/cmc-roles-frontend to ravicious/cmc-roles July 20, 2023 10:26
Base automatically changed from ravicious/cmc-roles to master July 20, 2023 12:00
@gzdunek gzdunek force-pushed the gzdunek/cmc-agent-config-file branch from fefda87 to 5587ce2 Compare July 21, 2023 12:41
# Conflicts:
#	lib/teleterm/daemon/daemon.go
@gzdunek gzdunek marked this pull request as ready for review July 21, 2023 12:44
@gzdunek gzdunek requested a review from ravicious July 21, 2023 12:44
@gzdunek gzdunek removed the request for review from ibeckermayer July 21, 2023 12:45
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

Looking good!

integration/teleterm_test.go Outdated Show resolved Hide resolved
integration/teleterm_test.go Outdated Show resolved Hide resolved
@gzdunek gzdunek added this pull request to the merge queue Jul 25, 2023
Merged via the queue into master with commit 9a8d19b Jul 25, 2023
@gzdunek gzdunek deleted the gzdunek/cmc-agent-config-file branch July 25, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants