Skip to content

feat(backend): enable OIDC/oAuth2 provider by default - #12731

Merged
SchrodingersGat merged 53 commits into
inventree:masterfrom
matmair:default-enable-oidc
Sep 5, 2026
Merged

SchrodingersGat merged 53 commits into
inventree:masterfrom
matmair:default-enable-oidc

Conversation

@matmair

@matmair matmair commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

This has been shipping with the codebase for a while but disabled by default. This PR changes that.

oAuth2 is the default standard for secure inter-application communication. I think it is reasonable to shift ppl towards it for most surfaces (pattform integrations, apps, desktop clients, mcp servers).

grafik

TODO:

Related:

Ref #12714
Contains #12713
Closes #12746

@netlify

netlify Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit adad477
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a9b53f9882a4f0008f71510
😎 Deploy Preview https://deploy-preview-12731--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 3 from production)
Accessibility: 82 (🟢 up 1 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 self-assigned this Aug 28, 2026
@matmair matmair added enhancement This is an suggested enhancement or new feature security Relates to a security issue setup Relates to the InvenTree setup / installation process labels Aug 28, 2026
@matmair matmair added this to the 1.6.0 milestone Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.25373% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.16%. Comparing base (b51f710) to head (adad477).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12731      +/-   ##
==========================================
+ Coverage   87.13%   87.16%   +0.02%     
==========================================
  Files        1483     1483              
  Lines      100534   100662     +128     
  Branches    11524    11615      +91     
==========================================
+ Hits        87604    87737     +133     
+ Misses      12868    12863       -5     
  Partials       62       62              
Flag Coverage Δ
backend 91.17% <99.25%> (+0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 92.43% <98.30%> (+<0.01%) ⬆️
Backend General 94.71% <98.11%> (+0.02%) ⬆️
Frontend 79.79% <ø> (+0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matmair
matmair marked this pull request as ready for review August 31, 2026 18:38
@matmair

matmair commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat ready for review

@matmair

matmair commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

API number bump addressed

MIGRATIONS_CHECK_DONE = False

OIDC_CLIENT_CHECKED = False
DEFAULT_OIDC_APP_ID = 'zDFnsiRheJIOKNx6aCQ0quBxECg1QBHtVFDPloJ6'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be configurable at the system level? Or is it important that it is hard-coded across all InvenTree instances?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, it being well-known and stable is important for seamlessly working with the python-api and possibly the app

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

additional client can be create via the API

@SchrodingersGat

Copy link
Copy Markdown
Member

Are there existing docs for OIDC configuration? It does not appear that this PR adds any

@matmair

matmair commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Are there existing docs for OIDC configuration? It does not appear that this PR adds any

there is https://docs.inventree.org/en/stable/api/#oauth2-and-oidc and there is not much more to it then creating and application and using it in whatever client you use.
What would you want to see in addition?

@matmair

matmair commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat I have adapted the docs a bit and added more descriptive descriptions to the forms
grafik

@SchrodingersGat
SchrodingersGat merged commit 0a4f095 into inventree:master Sep 5, 2026
46 checks passed
@SchrodingersGat
SchrodingersGat deleted the default-enable-oidc branch September 5, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This is an suggested enhancement or new feature security Relates to a security issue setup Relates to the InvenTree setup / installation process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Manage oAuth2 provider applications via API

2 participants