Add support for storing RDP licenses from Windows Desktops#51250
Merged
probakowski merged 23 commits intomasterfrom Jan 23, 2025
Merged
Add support for storing RDP licenses from Windows Desktops#51250probakowski merged 23 commits intomasterfrom
probakowski merged 23 commits intomasterfrom
Conversation
1341a7a to
75379f9
Compare
zmb3
approved these changes
Jan 20, 2025
codingllama
reviewed
Jan 22, 2025
| item := backend.Item{ | ||
| Key: p.rdpLicenseKey(version, issuer, company, productID), | ||
| Value: license, | ||
| Expires: p.BackendStorage.Clock().Now().Add(28 * 24 * time.Hour), |
Contributor
There was a problem hiding this comment.
Any particular reason behind the 28d expiration? Maybe add a comment?
Contributor
Author
rosstimothy
reviewed
Jan 22, 2025
Contributor
|
Looks good, just waiting for a resolution on #51250 (comment). |
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
codingllama
approved these changes
Jan 23, 2025
Contributor
codingllama
left a comment
There was a problem hiding this comment.
Looks good, Przemko. Thanks for all the changes.
Please address the final comments.
rosstimothy
reviewed
Jan 23, 2025
| return nil | ||
| } | ||
|
|
||
| // RDPLicenseKey is struct for retrieving licenses from backend cache, used only internally |
Contributor
There was a problem hiding this comment.
If this type is only used internally then it probably shouldn't exist in the api module.
codingllama
reviewed
Jan 23, 2025
|
|
||
| // WriteRDPLicense writes an RDP license to local storage. | ||
| func (p *ProcessStorage) WriteRDPLicense(ctx context.Context, key *types.RDPLicenseKey, license []byte) error { | ||
| value, err := json.Marshal(rdpLicense{Data: license}) |
Contributor
There was a problem hiding this comment.
If you are still working here it's worth checking if key is nil, both in this method and the Read.
|
@probakowski See the table below for backport results.
|
This was referenced Jan 30, 2025
carloscastrojumo
pushed a commit
to carloscastrojumo/teleport
that referenced
this pull request
Feb 19, 2025
…onal#51250) * Licensing * Licensing * formatting * dependency review * review comments * review comments * review comments * review comments * test * gci * introduce RDPLicenseKey * Update lib/auth/storage/storage_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * review comments * fix test * review comments * review comments * fix tests * gci * gci --------- Co-authored-by: Alan Parra <alan.parra@goteleport.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows desktop can send license during initial exchange, the client should store it and send it again during future connections. We have this already implemented in v14 in rdp-rs, this change adds it to the newer versions using recent changes in IronRDP (Devolutions/IronRDP#634).
Storing and retrieving licenses on the Go side inspired by #47634
changelog: Add support for storing RDP licenses from Windows Desktops