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 option to disable MFA #7747

Closed
wants to merge 4 commits into from

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Jul 27, 2024

Adds installation level option to disable MFA entirely.

By default, MFA is enabled, and requires manual intervention (at the sysadmin level) to turn it off.

This would be useful for installations where MFA is explicitly not wanted - for now, this is intended for the demo server.

@SchrodingersGat SchrodingersGat added the setup Relates to the InvenTree setup / installation process label Jul 27, 2024
@SchrodingersGat SchrodingersGat added this to the 0.16.0 milestone Jul 27, 2024
Copy link

netlify bot commented Jul 27, 2024

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

Name Link
🔨 Latest commit 4557a82
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/66a47be93ed7c30008a27540
😎 Deploy Preview https://deploy-preview-7747--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: 100 (no change from production)
Accessibility: 86 (no change from production)
Best Practices: 92 (no change from production)
SEO: 70 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

Copy link

codecov bot commented Jul 27, 2024

Codecov Report

Attention: Patch coverage is 62.96296% with 10 lines in your changes missing coverage. Please review.

Project coverage is 83.72%. Comparing base (f92d734) to head (4557a82).

Files Patch % Lines
src/backend/InvenTree/InvenTree/settings.py 22.22% 7 Missing ⚠️
...ontend/src/pages/Index/Settings/SystemSettings.tsx 66.66% 2 Missing ⚠️
...Index/Settings/AccountSettings/SecurityContent.tsx 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7747      +/-   ##
==========================================
+ Coverage   83.63%   83.72%   +0.09%     
==========================================
  Files        1118     1118              
  Lines       49549    49574      +25     
  Branches     1625     1627       +2     
==========================================
+ Hits        41441    41508      +67     
+ Misses       7680     7643      -37     
+ Partials      428      423       -5     
Flag Coverage Δ
backend 85.34% <58.82%> (-0.01%) ⬇️
pui 65.13% <70.00%> (+0.65%) ⬆️

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.

@matmair
Copy link
Member

matmair commented Jul 27, 2024

@SchrodingersGat would it not be easier and less error prone to stop addition of new factors? That would be a much smaller diff and less logic branches that could cause issues.

If you are interested I can code that up as a comparison.

@wolflu05
Copy link
Contributor

I thought about also suggesting that. That would be much easier.

@SchrodingersGat
Copy link
Member Author

@matmair sure, if you can suggest a cleaner alternative I'd be happier with that. This did turn out a bit clunky.

matmair added a commit to matmair/InvenTree that referenced this pull request Jul 28, 2024
@matmair
Copy link
Member

matmair commented Jul 28, 2024

@SchrodingersGat https://github.com/matmair/InvenTree/tree/disable-mfa-ref would be a minial implementation without frontend changes

@SchrodingersGat
Copy link
Member Author

@matmair that looks cleaner. Can you submit a PR?

SchrodingersGat pushed a commit that referenced this pull request Jul 30, 2024
* Add changes from #7747

* disable addition of factors

* rename variable
@SchrodingersGat SchrodingersGat deleted the disable-mfa branch July 30, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup Relates to the InvenTree setup / installation process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants