Skip to content

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

Merged
SchrodingersGat merged 6 commits into
inventree:masterfrom
matmair:add-federation-proof
Oct 23, 2026
Merged

SchrodingersGat merged 6 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 ec8e3b8
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6adb6e2f694ab2d7b3175c7b
😎 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: 88 (🔴 down 4 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.16%. Comparing base (d11b74f) to head (ec8e3b8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13030      +/-   ##
==========================================
+ Coverage   87.12%   87.16%   +0.03%     
==========================================
  Files        1533     1534       +1     
  Lines      106267   106305      +38     
  Branches    11969    11874      -95     
==========================================
+ Hits        92589    92661      +72     
+ Misses      13612    13577      -35     
- Partials       66       67       +1     
Flag Coverage Δ
backend 92.15% <100.00%> (+0.01%) ⬆️
migrations-mysql 34.08% <34.61%> (-0.02%) ⬇️
migrations-postgresql 34.10% <34.61%> (-0.02%) ⬇️
migrations-sqlite 34.09% <34.61%> (-0.02%) ⬇️

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

Components Coverage Δ
Backend Apps 92.42% <ø> (ø)
Backend General 94.50% <ø> (ø)
Frontend 79.41% <ø> (+0.05%) ⬆️
🚀 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

@matmair

matmair commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat can this be merged now that 1.6 is out?

@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair sure! Please address conflicts and I can merge

@matmair

matmair commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat done

@matmair matmair closed this Oct 22, 2026
@matmair matmair reopened this Oct 22, 2026
@matmair matmair added the full-run Always do a full QC CI run label Oct 22, 2026
@SchrodingersGat
SchrodingersGat merged commit 5bd0036 into inventree:master Oct 23, 2026
61 of 62 checks passed
@SchrodingersGat
SchrodingersGat deleted the add-federation-proof branch October 23, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API full-run Always do a full QC CI run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants