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

Fix the new license flow #43

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Fix the new license flow #43

merged 2 commits into from
Oct 24, 2024

Conversation

zmb3
Copy link

@zmb3 zmb3 commented Oct 13, 2024

Fixes several bugs with the new license flow and allows us to successfully obtain a license. The next step will be to add hooks to save this license so that we can reuse it for the upgrade license flow on subsequent attempts.

Additionally, uses a client-provided UUID to identify itself to the RDP server for licensing purposes (we were previously using the Windows domain, which would cause all Teleport RDP clients to appear identical to the server).

@zmb3 zmb3 force-pushed the zmb3/fix-newlicense-flow branch 4 times, most recently from 8f382cf to a2274ea Compare October 16, 2024 02:25
@zmb3 zmb3 force-pushed the zmb3/enhance-license-parsing branch from b87a883 to b14690c Compare October 16, 2024 21:36
Base automatically changed from zmb3/enhance-license-parsing to master October 16, 2024 21:51
@zmb3 zmb3 force-pushed the zmb3/fix-newlicense-flow branch 3 times, most recently from de2196f to 42efb5f Compare October 16, 2024 22:40
@zmb3 zmb3 marked this pull request as ready for review October 16, 2024 22:40
Copy link

@espadolini espadolini left a comment

Choose a reason for hiding this comment

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

I don't have nearly enough context to understand the business logic parts of this, fwiw.

src/core/license.rs Outdated Show resolved Hide resolved
return Err(Error::RdpError(RdpError::new(
RdpErrorKind::InvalidData,
"SEC: Invalid Licence packet",
format!("SEC: Invalid Licence packet (flag={:x})", security_flag).as_str(),

Choose a reason for hiding this comment

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

Suggested change
format!("SEC: Invalid Licence packet (flag={:x})", security_flag).as_str(),
&format!("SEC: Invalid Licence packet (flag={security_flag:x})"),

src/core/license.rs Outdated Show resolved Hide resolved
src/core/license.rs Outdated Show resolved Hide resolved
src/core/license.rs Show resolved Hide resolved
src/core/license.rs Outdated Show resolved Hide resolved
src/core/license.rs Outdated Show resolved Hide resolved
@zmb3 zmb3 force-pushed the zmb3/fix-newlicense-flow branch from 42efb5f to 06379dd Compare October 19, 2024 14:32
Fixes several bugs with the new license flow and allows us to
successfully obtain a license.

Additionally, use a client-provided UUID to identify the client
instead of using the Windows domain (which isn't unique per-agent).
@zmb3 zmb3 force-pushed the zmb3/fix-newlicense-flow branch 3 times, most recently from bf453b1 to d5e7bd2 Compare October 24, 2024 15:11
Copy link

@espadolini espadolini left a comment

Choose a reason for hiding this comment

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

Should we be concerned with the API breakage? Or is this intended for our private fork?

src/core/license.rs Outdated Show resolved Hide resolved
src/core/license.rs Outdated Show resolved Hide resolved
@zmb3
Copy link
Author

zmb3 commented Oct 24, 2024

Should we be concerned with the API breakage? Or is this intended for our private fork?

I'm not concerned. Teleport's branch/v14 is the only consumer of this repo, and we always pin to a specific commit.

@zmb3 zmb3 force-pushed the zmb3/fix-newlicense-flow branch 2 times, most recently from 3af3971 to 5da79d0 Compare October 24, 2024 15:46
@zmb3 zmb3 force-pushed the zmb3/fix-newlicense-flow branch from 5da79d0 to 6c14d00 Compare October 24, 2024 15:50
@zmb3 zmb3 merged commit 8b4d3be into master Oct 24, 2024
2 checks passed
@zmb3 zmb3 deleted the zmb3/fix-newlicense-flow branch October 24, 2024 16:56
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.

3 participants