Skip to content

Machine ID: Add Protos for Bound Keypair Joining#53566

Merged
timothyb89 merged 16 commits intomasterfrom
timothyb89/bound-keypair-protos
May 9, 2025
Merged

Machine ID: Add Protos for Bound Keypair Joining#53566
timothyb89 merged 16 commits intomasterfrom
timothyb89/bound-keypair-protos

Conversation

@timothyb89
Copy link
Copy Markdown
Contributor

@timothyb89 timothyb89 commented Mar 28, 2025

This adds protos for the new Bound Keypair join method. Implementation will follow in additional PRs.

RFD: #52546
Closes #53378

This adds protos for the new Bound Keypair join method.
Implementation will follow in additional PRs.

RFD: #52546
Closes #53378
The operator's crdgen doesn't support `bytes`, so switch to SSH
public key encoding.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 28, 2025

Amplify deployment status

Branch Commit Job ID Status Preview Updated (UTC)
timothyb89/bound-keypair-protos 12b5e7e 13 ✅SUCCEED timothyb89-bound-keypair-protos 2025-05-09 01:58:30

@timothyb89
Copy link
Copy Markdown
Contributor Author

I'm reasonably confident this is complete, but want to avoid merging this until I have a decent start on #53373 so I can make breaking proto changes without creating linter trouble; will undraft when ready.

Comment thread api/proto/teleport/legacy/types/types.proto Outdated
This adds some minor proto tweaks following some implementation work:
- Adds an explicit rotation ceremony phase to prompt the client to
  provide a new public key before issuing the 2nd challenge.
  Previously the design didn't include any way to inform the client
  that a rotation was requested.
- Converts byte public keys to string. They are now encoded in ssh
  `authorized_keys` format.
Comment thread api/proto/teleport/legacy/client/proto/joinservice.proto Outdated
Comment thread api/proto/teleport/legacy/types/types.proto Outdated
Comment thread api/proto/teleport/legacy/client/proto/joinservice.proto Outdated
This removes `remaining_joins` from the token status per a review
recommendation, in favor of determining whether or not a join is
allowed from the `join_count` field.

This also adds the referenced `previous_instance_id` field to the
bot instance proto.

Additionally, various doc comments have been updated for clarity.
Comment thread api/proto/teleport/legacy/client/proto/joinservice.proto
Comment thread api/proto/teleport/legacy/client/proto/joinservice.proto Outdated
Comment thread api/proto/teleport/legacy/client/proto/joinservice.proto Outdated
@marcoandredinis marcoandredinis removed their request for review May 2, 2025 14:56
Copy link
Copy Markdown
Contributor Author

@timothyb89 timothyb89 left a comment

Choose a reason for hiding this comment

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

@strideynet and I had a good discussion today and came up with a plan to further simplify all the options for this new token type, and to reduce overloaded and confusing terminology. I've left individual comments for all the changes for anyone interested.

This change will mostly consist of field renames and moves, so hopefully nothing too surprising.

Comment thread api/proto/teleport/legacy/types/types.proto Outdated
Comment thread api/proto/teleport/legacy/types/types.proto Outdated
Comment thread api/proto/teleport/legacy/types/types.proto Outdated
Comment thread api/proto/teleport/legacy/types/types.proto Outdated
Comment thread api/proto/teleport/legacy/types/types.proto Outdated
@strideynet strideynet self-requested a review May 6, 2025 18:29
This refactors a number of bound keypair terms to simplify the token
and improve clarity.

We now consistently use these terms to refer to various concepts in
the join method:
- "onboarding" to refer to the first join
- "registration" to refer to the binding of a keypair to a token
- "preregistration" to refer to keys added manually with the token
- "registration secret" to refer to keys bound at the time of
  onboarding using a secret token
- "recovery" to refer to joining with no or an expired identity

Various fields were renamed to reflect these new terms and
definitions.

Additionally, the "unlimited" and "insecure" fields have been merged
into an enum-style string, with values "standard", "relaxed", and
"insecure".
@timothyb89 timothyb89 enabled auto-merge May 9, 2025 01:54
@timothyb89 timothyb89 added this pull request to the merge queue May 9, 2025
Merged via the queue into master with commit f07d304 May 9, 2025
44 checks passed
@timothyb89 timothyb89 deleted the timothyb89/bound-keypair-protos branch May 9, 2025 02:34
timothyb89 added a commit that referenced this pull request May 22, 2025
Backport of #53566 for branch/v17

---

Machine ID: Add Protos for Bound Keypair Joining

This adds protos for the new Bound Keypair join method.
Implementation will follow in additional PRs.

RFD: #52546
Closes #53378

* Switch to SSH public key encoding for operator compatibility

The operator's crdgen doesn't support `bytes`, so switch to SSH
public key encoding.

* Add generated terraform provider files

* Add insecure flag

* Small proto tweaks

This adds some minor proto tweaks following some implementation work:
- Adds an explicit rotation ceremony phase to prompt the client to
  provide a new public key before issuing the 2nd challenge.
  Previously the design didn't include any way to inform the client
  that a rotation was requested.
- Converts byte public keys to string. They are now encoded in ssh
  `authorized_keys` format.

* Update generated files

* Fix docstring typo

* Address review comments

* Remove remaining_joins, add previous_instance_id, and update docs

This removes `remaining_joins` from the token status per a review
recommendation, in favor of determining whether or not a join is
allowed from the `join_count` field.

This also adds the referenced `previous_instance_id` field to the
bot instance proto.

Additionally, various doc comments have been updated for clarity.

* Remove `new_public_key` field in favor of server-driven rotation

* Make initial_join_secret optional; fix field index after field removal

* Revert optional field marker

protoc-gen-gogo doesn't support optional fields, so reverting this
change.

* Field naming refactor

This refactors a number of bound keypair terms to simplify the token
and improve clarity.

We now consistently use these terms to refer to various concepts in
the join method:
- "onboarding" to refer to the first join
- "registration" to refer to the binding of a keypair to a token
- "preregistration" to refer to keys added manually with the token
- "registration secret" to refer to keys bound at the time of
  onboarding using a secret token
- "recovery" to refer to joining with no or an expired identity

Various fields were renamed to reflect these new terms and
definitions.

Additionally, the "unlimited" and "insecure" fields have been merged
into an enum-style string, with values "standard", "relaxed", and
"insecure".

* Fix doc comment typo
github-merge-queue bot pushed a commit that referenced this pull request May 22, 2025
Backport of #53566 for branch/v17

---

Machine ID: Add Protos for Bound Keypair Joining

This adds protos for the new Bound Keypair join method.
Implementation will follow in additional PRs.

RFD: #52546
Closes #53378

* Switch to SSH public key encoding for operator compatibility

The operator's crdgen doesn't support `bytes`, so switch to SSH
public key encoding.

* Add generated terraform provider files

* Add insecure flag

* Small proto tweaks

This adds some minor proto tweaks following some implementation work:
- Adds an explicit rotation ceremony phase to prompt the client to
  provide a new public key before issuing the 2nd challenge.
  Previously the design didn't include any way to inform the client
  that a rotation was requested.
- Converts byte public keys to string. They are now encoded in ssh
  `authorized_keys` format.

* Update generated files

* Fix docstring typo

* Address review comments

* Remove remaining_joins, add previous_instance_id, and update docs

This removes `remaining_joins` from the token status per a review
recommendation, in favor of determining whether or not a join is
allowed from the `join_count` field.

This also adds the referenced `previous_instance_id` field to the
bot instance proto.

Additionally, various doc comments have been updated for clarity.

* Remove `new_public_key` field in favor of server-driven rotation

* Make initial_join_secret optional; fix field index after field removal

* Revert optional field marker

protoc-gen-gogo doesn't support optional fields, so reverting this
change.

* Field naming refactor

This refactors a number of bound keypair terms to simplify the token
and improve clarity.

We now consistently use these terms to refer to various concepts in
the join method:
- "onboarding" to refer to the first join
- "registration" to refer to the binding of a keypair to a token
- "preregistration" to refer to keys added manually with the token
- "registration secret" to refer to keys bound at the time of
  onboarding using a secret token
- "recovery" to refer to joining with no or an expired identity

Various fields were renamed to reflect these new terms and
definitions.

Additionally, the "unlimited" and "insecure" fields have been merged
into an enum-style string, with values "standard", "relaxed", and
"insecure".

* Fix doc comment typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation helm no-changelog Indicates that a PR does not require a changelog entry size/lg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Machine ID: Bound Keypair Joining: Initial proto changes

5 participants