Skip to content

One-time use tokens for AnyCable#2911

Merged
jmthomas merged 3 commits intomainfrom
maint/cable
Mar 5, 2026
Merged

One-time use tokens for AnyCable#2911
jmthomas merged 3 commits intomainfrom
maint/cable

Conversation

@ryan-pratt
Copy link
Copy Markdown
Contributor

No description provided.

@ryan-pratt ryan-pratt requested review from jmthomas and ryanmelt March 3, 2026 23:09
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 73.58491% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.41%. Comparing base (c629a3b) to head (9cefde1).
⚠️ Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
openc3/lib/openc3/utilities/authentication.rb 69.23% 8 Missing ⚠️
...mos-cmd-tlm-api/app/controllers/auth_controller.rb 25.00% 3 Missing ⚠️
openc3/lib/openc3/utilities/authorization.rb 60.00% 2 Missing ⚠️
openc3/lib/openc3/script/web_socket_api.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2911      +/-   ##
==========================================
+ Coverage   78.24%   78.41%   +0.17%     
==========================================
  Files         673      673              
  Lines       55204    55246      +42     
  Branches      728      728              
==========================================
+ Hits        43196    43323     +127     
+ Misses      11930    11845      -85     
  Partials       78       78              
Flag Coverage Δ
python 79.71% <ø> (+0.38%) ⬆️
ruby-api 79.98% <25.00%> (+0.28%) ⬆️
ruby-backend 82.16% <77.55%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@ryanmelt ryanmelt left a comment

Choose a reason for hiding this comment

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

This should affect the Ruby and Python SDKs as well.

Copy link
Copy Markdown
Member

@jmthomas jmthomas left a comment

Choose a reason for hiding this comment

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

So this change makes all cable connections first generate a one time password (token) and then upon connection deletes the token? This is better because if someone grabs the token during the cable connection it doesn't matter because it is immediately invalidated. Is that the gist?

@ryan-pratt
Copy link
Copy Markdown
Contributor Author

So this change makes all cable connections first generate a one time password (token) and then upon connection deletes the token? This is better because if someone grabs the token during the cable connection it doesn't matter because it is immediately invalidated. Is that the gist?

Correct

@jmthomas
Copy link
Copy Markdown
Member

jmthomas commented Mar 4, 2026

Makes sense to me. Not sure what @ryanmelt is asking for via the Ruby and Python APIs.

@ryanmelt
Copy link
Copy Markdown
Member

ryanmelt commented Mar 4, 2026

We use websockets in the Ruby and Python code too. Do they not use query parameters? If they don't then we're good. If they do then they need to be updated too

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 4, 2026

@ryan-pratt
Copy link
Copy Markdown
Contributor Author

Do they not use query parameters? If they don't then we're good.

They do. Just changed that, and tested using the streaming scripts in the demo plugin:
image
image

@ryan-pratt ryan-pratt requested a review from ryanmelt March 4, 2026 21:31
@jmthomas jmthomas merged commit 4cacfcd into main Mar 5, 2026
49 of 52 checks passed
@jmthomas jmthomas deleted the maint/cable branch March 5, 2026 00:34
jmthomas added a commit that referenced this pull request Mar 21, 2026
One-time use tokens for AnyCable
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