Skip to content

Commit 58d9057

Browse files
Merge pull request #17876 from netbox-community/develop
Release v4.1.5
2 parents 4deb6e5 + 8133471 commit 58d9057

File tree

67 files changed

+76833
-88078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+76833
-88078
lines changed

.github/ISSUE_TEMPLATE/01-feature_request.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v4.1.4
17+
placeholder: v4.1.5
1818
validations:
1919
required: true
2020
- type: dropdown
@@ -36,9 +36,8 @@ body:
3636
options:
3737
- I volunteer to perform this work (if approved)
3838
- I'm a NetBox Labs customer
39-
- This is a very minor change
4039
- N/A
41-
default: 3
40+
default: 2
4241
validations:
4342
required: true
4443
- type: textarea

.github/ISSUE_TEMPLATE/02-bug_report.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ body:
3131
options:
3232
- I volunteer to perform this work (if approved)
3333
- I'm a NetBox Labs customer
34-
- This is preventing me from using NetBox
3534
- N/A
36-
default: 3
35+
default: 2
3736
validations:
3837
required: true
3938
- type: input
4039
attributes:
4140
label: NetBox Version
4241
description: What version of NetBox are you currently running?
43-
placeholder: v4.1.4
42+
placeholder: v4.1.5
4443
validations:
4544
required: true
4645
- type: dropdown

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
2+
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo_light.svg" width="400" alt="NetBox logo" />
33
<p><strong>The cornerstone of every automated network</strong></p>
44
<a href="https://github.com/netbox-community/netbox/releases"><img src="https://img.shields.io/github/v/release/netbox-community/netbox" alt="Latest release" /></a>
55
<a href="https://github.com/netbox-community/netbox/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>

base_requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ django-rich
4242

4343
# Django integration for RQ (Reqis queuing)
4444
# https://github.com/rq/django-rq/blob/master/CHANGELOG.md
45-
django-rq
45+
django-rq<3.0
4646

4747
# Abstraction models for rendering and paginating HTML tables
4848
# https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md
@@ -116,6 +116,10 @@ PyYAML
116116
# https://github.com/psf/requests/blob/main/HISTORY.md
117117
requests
118118

119+
# rq
120+
# https://github.com/rq/rq/blob/master/CHANGES.md
121+
rq<2.0
122+
119123
# Social authentication framework
120124
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md
121125
social-auth-core
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Google
2+
3+
This guide explains how to configure single sign-on (SSO) support for NetBox using [Google OAuth2](https://developers.google.com/identity/protocols/oauth2/web-server) as an authentication backend.
4+
5+
## Google OAuth2 Configuration
6+
7+
1. Log into [console.cloud.google.com](https://console.cloud.google.com/).
8+
2. Create new project for NetBox.
9+
3. Under "APIs and Services" click "OAuth consent screen" and enter the required information.
10+
4. Under "Credentials," click "Create Credentials" and select "OAuth 2.0 Client ID." Select type "Web application."
11+
- "Authorized JavaScript origins" should follow the format `http[s]://<netbox>[:<port>]`
12+
- "Authorized redirect URIs" should follow the format `http[s]://<netbox>[:<port>]/oauth/complete/google-oauth2/`
13+
5. Copy the "Client ID" and "Client Secret" values somewhere convenient.
14+
15+
!!! note
16+
Google requires the NetBox hostname to use a public top-level-domain (e.g. `.com`, `.net`). The use of IP addresses is not permitted (except `127.0.0.1`).
17+
18+
For more information, consult [Google's documentation](https://developers.google.com/identity/protocols/oauth2/web-server#prerequisites).
19+
20+
## NetBox Configuration
21+
22+
### 1. Enter configuration parameters
23+
24+
Enter the following configuration parameters in `configuration.py`, substituting your own values:
25+
26+
```python
27+
REMOTE_AUTH_BACKEND = 'social_core.backends.google.GoogleOAuth2'
28+
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '{CLIENT_ID}'
29+
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '{CLIENT_SECRET}'
30+
```
31+
32+
### 2. Restart NetBox
33+
34+
Restart the NetBox services so that the new configuration takes effect. This is typically done with the command below:
35+
36+
```no-highlight
37+
sudo systemctl restart netbox
38+
```
39+
40+
## Testing
41+
42+
Log out of NetBox if already authenticated, and click the "Log In" button at top right. You should see the normal login form as well as an option to authenticate using Google. Click that link.
43+
44+
![NetBox Google login form](../../media/authentication/netbox_google_login.png)
45+
46+
You should be redirected to Google's authentication portal. Enter the username/email and password of your test account to continue. You may also be prompted to grant this application access to your account.
47+
48+
![NetBox Google login form](../../media/authentication/google_login_portal.png)
49+
50+
If successful, you will be redirected back to the NetBox UI, and will be logged in as the Google user. You can verify this by navigating to your profile (using the button at top right).
51+
52+
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions.

docs/administration/authentication/microsoft-entra-id.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Under the Azure Active Directory dashboard, navigate to **Add > App registration
1616

1717
Enter a name for the registration (e.g. "NetBox") and ensure that the "single tenant" option is selected.
1818

19-
Under "Redirect URI", select "Web" for the platform and enter the path to your NetBox installation, ending with `/oauth/complete/entraid-oauth2/`. Note that this URI **must** begin with `https://` unless you are referencing localhost (for development purposes).
19+
Under "Redirect URI", select "Web" for the platform and enter the path to your NetBox installation, ending with `/oauth/complete/azuread-oauth2/`. Note that this URI **must** begin with `https://` unless you are referencing localhost (for development purposes).
2020

2121
![App registration parameters](../../media/authentication/azure_ad_app_registration.png)
2222

docs/customization/custom-scripts.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ script_order = (MyCustomScript, AnotherCustomScript)
7272

7373
Script attributes are defined under a class named `Meta` within the script. These are optional, but encouraged.
7474

75+
!!! warning
76+
These are also defined and used as properties on the base custom script class, so don't use the same names as variables or override them in your custom script.
77+
7578
### `name`
7679

7780
This is the human-friendly names of your script. If omitted, the class name will be used.

docs/development/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ When adding a new dependency, a short description of the package and the URL of
7676

7777
* When referring to NetBox in writing, use the proper form "NetBox," with the letters N and B capitalized. The lowercase form "netbox" should be used in code, filenames, etc. but never "Netbox" or any other deviation.
7878

79-
* There is an SVG form of the NetBox logo at [docs/netbox_logo.svg](../netbox_logo.svg). It is preferred to use this logo for all purposes as it scales to arbitrary sizes without loss of resolution. If a raster image is required, the SVG logo should be converted to a PNG image of the prescribed size.
79+
* There are SVG forms of the NetBox logo for both [light mode](../netbox_logo_light.svg) and [dark mode](../netbox_logo_dark.svg) available. It is preferred to use the SVG logo for all purposes as it scales to arbitrary sizes without loss of resolution. If a raster image is required, the SVG logo should be converted to a PNG image of the desired size.

docs/extra.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ img {
55
margin-right: auto;
66
}
77

8+
.md-content img {
9+
background-color: rgba(255, 255, 255, 0.64);
10+
}
11+
812
/* Tables */
913
table {
1014
margin-bottom: 24px;

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
![NetBox](netbox_logo.svg "NetBox logo"){style="height: 100px; margin-bottom: 3em"}
1+
![NetBox](netbox_logo_light.svg#only-light "NetBox logo"){style="height: 100px; margin-bottom: 3em; background: none;"}
2+
![NetBox](netbox_logo_dark.svg#only-dark "NetBox logo"){style="height: 100px; margin-bottom: 3em; background: none;"}
23

34
# The Premier Network Source of Truth
45

0 commit comments

Comments
 (0)