Commit Graph

19 Commits

Author SHA1 Message Date
Jeremy Stretch a4ade2e7ae
Fixes #23112: Initiate SSO logins via a script-driven navigation (#23177)
Rendering the SSO buttons as POST forms (#23042) made every SSO login a form
submission which NetBox answers with a redirect to the identity provider.
Chromium-based browsers evaluate the CSP form-action directive against every hop
in a form submission's redirect chain, so a deployment which serves NetBox with
`form-action 'self'` blocks that redirect and the button silently does nothing.

Add SocialAuthBeginView, which wraps python-social-auth's begin view and returns
the identity provider's URL as JSON to clients which request it. The login page
now submits the form via fetch() and assigns window.location, which form-action
does not govern. The upstream view is reused as-is, so CSRF protection, the
callback URL, and the session state recorded for the identity provider are
unchanged; clients which do not request JSON (a browser without JavaScript, or a
backend which renders an HTML form rather than redirecting) receive the
unmodified response as before.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 13:00:11 -04:00
Jeremy Stretch 57a7afd548 Merge branch 'main' into feature 2025-09-16 12:00:48 -04:00
Jeremy Stretch c0e4d1c1e3
Closes #16137: Remove `is_staff` boolean from User model (#20306)
* Closes #16137: Remove is_staff boolean from User model

* Remove default is_staff value from UserManager.create_user()

* Restore staff_only on MenuItem

* Introduce IsSuperuser API permission to replace IsAdminUser

* Update and improve RQ task API view tests

* Remove is_staff attribute assignment from RemoteUserBackend
2025-09-10 16:51:59 -04:00
mr1716 1eeede0931
Update Grammar 2025-09-07 08:35:59 -04:00
Tobias Genannt 1a60cb9884
Fixes: #18568 Update mkdocstrings and adapt config (#18841)
* Fixes: #18568 Update mkdocstrings and adapt config

* Fixed some output formatting errors

When trying to compare the output from "mkdocstrings[python-legacy]==0.27.0" and
"mkdocstrings[python]==0.28.2" I encountered some HTML errors:
- <div> inside a <p>
- unescaped non-tags <pk>
2025-03-10 13:11:35 -04:00
Alexander Haase ac9f561372 Fix social auth for Entra ID
Previously Azure AD was renamed to Entra ID. However, as django social
auth didn't change its API, just the display names must be changed but
not the API names.
2024-10-18 10:45:34 -04:00
Ian Bishop e6f41f73f7
Add instructions for authenticating using Google oauth2 (#17527)
* Add instructions for authenticating using Google oauth2

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>

* Add navigation link

* Misc cleanup

---------

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 09:36:29 -04:00
Alexander Haase bfcae8088d Rename Microsoft Azure AD to Entra ID
Occurrences of the old term have been replaced by the new term. However,
the documentation still needs some work to reflect the new Entra ID
screenshots and terminology.
2024-10-03 13:25:48 -04:00
Théophile Bastian ef5c0256f8 SSO: custom name for identity providers (#16732) 2024-07-26 16:20:46 -04:00
Jeremy Stretch 312291b010 Merge branch 'develop' into feature 2024-05-01 16:09:14 -04:00
Jeremy Stretch c73a974fa9 Closes #15811: Note potential incompatibilities for remote auth headers containing underscores 2024-04-29 16:46:56 -04:00
Jeremy Stretch 74e67afa41 Merge branch 'develop' into feature 2024-02-05 14:38:26 -05:00
Jeremy Stretch 5d9311eecf
Closes #12325: Disable the Django admin UI by default (#15008)
* Disable the Django admin UI by default

* Remove outdated references to the admin UI

* Update tests
2024-02-05 11:44:52 -05:00
Markku Leiniö 3d941411d4
Fixes #14722: Change references to admin UI to Admin menu (#14743)
* Change references to admin UI to Admin menu

* Change also for reports and custom scripts

* Minor tweaks to help text flow better

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-10 16:04:46 -05:00
Luke Anderson ab3531558a
Closes #12226: Add Profile Data Headers to Remote Authentication Middleware (#12253)
* Closes #12226: Add Profile Data Headers to Remote Authentication Middleware

* Tweak documentation

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-20 15:49:54 -04:00
jeremystretch 5b5160ca6f Fixes #9715: Fix SOCIAL_AUTH_PIPELINE config parameter not taking effect 2022-07-15 08:34:30 -04:00
jeremystretch d22f9000d6 Add troubleshooting section to Azure AD guide 2022-04-19 10:00:41 -04:00
jeremystretch c21db0ff6a Closes #9137: Add SSO configuration guide for Okta 2022-04-15 16:03:36 -04:00
jeremystretch 10c7fdb618 Closes #9136: Add SSO configuration guide for Microsoft Azure AD 2022-04-14 21:42:47 -04:00