Skip to content

feat(backend): add a way to proof instance id without sharing id / making id available - #13030

Open
matmair wants to merge 4 commits into
inventree:masterfrom
matmair:add-federation-proof
Open

matmair wants to merge 4 commits into
inventree:masterfrom
matmair:add-federation-proof

Conversation

@matmair

@matmair matmair commented Oct 16, 2026

Copy link
Copy Markdown
Member

Getting back on the federation train again; While I have nothing ready to share I have found an issue: reliably identifying if the calling party is actually who they say, especially with forwarding proxies in play.

This PR adds a way to compute a nonce to proof in a replayable but somewhat time limited fashion. The same nonce for the same instance id changes every month this way. The used crypto id HKDF for instance shuffeling and then HMAC for proof calculations; both are widely used in things like ipsec so I am pretty confident that should be safe enough.

As every federation participant needs the root API responses anyway for compatibility checks I have added it as an optional query parameter to that response.

@matmair matmair added this to the 1.6.0 milestone Oct 16, 2026
@matmair matmair self-assigned this Oct 16, 2026
@matmair matmair added the api Relates to the API label Oct 16, 2026
@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit fc2fc38
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6ad4c0234f1436fe0ff82549
😎 Deploy Preview https://deploy-preview-13030--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🔴 down 2 from production)
Accessibility: 82 (no change from production)
Best Practices: 92 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@matmair matmair changed the title feat(backend): add a way to proof instance identification without publicly sharing id feat(backend): add a way to proof instance id without sharing id / making id available Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.32%. Comparing base (8d496ae) to head (fc2fc38).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13030      +/-   ##
==========================================
+ Coverage   87.26%   87.32%   +0.06%     
==========================================
  Files        1522     1522              
  Lines      105636   105507     -129     
  Branches    11890    11814      -76     
==========================================
- Hits        92178    92138      -40     
+ Misses      13391    13302      -89     
  Partials       67       67              
Flag Coverage Δ
backend 92.12% <100.00%> (+0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 92.74% <ø> (ø)
Backend General 94.50% <ø> (ø)
Frontend 79.45% <ø> (+0.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat SchrodingersGat modified the milestones: 1.6.0, 1.7.0 Oct 17, 2026
@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair I'd like this to have a bit more time on master, will merge after we release 1.6.0

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

Labels

api Relates to the API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants