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

Add support for httpNodeAuth settings on devices #5068

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

knolleary
Copy link
Member

@knolleary knolleary commented Jan 30, 2025

Part of #5014

Note: do not merge until Device Agent 3.1 has been published

Description

Adds the HTTP Node security settings to the Device settings page.

This reuses the Instance template page for node security.

Includes a banner warning if the Device Agent version is unknown, or too old to support the settings. However, I did chose to allow the settings to be saved in those cases. (Note banner at top, which is repeated above the Save button, just to be sure).

image

To support FF Auth on devices, we now generate an AuthClient whenever the device calls home to get its settings. That happens whenever the device is notified the settings have been changed. The auth client details are only needed when establishing a login session - changing the client details doesn't invalidate existing sessions.

I did have to update oauth.js which assumed the AuthClient owner was an Instance - but it can now be a device.

Will link to the companion Device Agent PR once it is available.


  • Add some tests

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.45%. Comparing base (4528ec2) to head (64de97b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
forge/routes/auth/oauth.js 72.72% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5068      +/-   ##
==========================================
+ Coverage   78.40%   78.45%   +0.04%     
==========================================
  Files         329      329              
  Lines       15501    15546      +45     
  Branches     3582     3598      +16     
==========================================
+ Hits        12154    12197      +43     
- Misses       3347     3349       +2     
Flag Coverage Δ
backend 78.45% <88.67%> (+0.04%) ⬆️

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.

Copy link
Contributor

@hardillb hardillb left a comment

Choose a reason for hiding this comment

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

Tested and read through. Looks good.

Not merging as is dependent on 3.1 device agent. (reviewing next)

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.

2 participants