Logger name syntax is invalid for authentication events #5724

Closed
opened 2025-12-29 19:31:54 +01:00 by adam · 3 comments
Owner

Originally created by @markkuleinio on GitHub (Dec 3, 2021).

Originally assigned to: @jeremystretch on GitHub.

Change Type

Correction

Area

Configuration parameters

Proposed Changes

In https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#available-loggers it says:

netbox.auth.* - Authentication events

But apparently it should be netbox.authentication.*:

2021-12-03 10:20:19,352 netbox.authentication.RemoteUserBackend DEBUG: trying to authenticate markku with groups None

Tested with NetBox 3.0.11.

Originally created by @markkuleinio on GitHub (Dec 3, 2021). Originally assigned to: @jeremystretch on GitHub. ### Change Type Correction ### Area Configuration parameters ### Proposed Changes In https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#available-loggers it says: > `netbox.auth.*` - Authentication events But apparently it should be `netbox.authentication.*`: ``` 2021-12-03 10:20:19,352 netbox.authentication.RemoteUserBackend DEBUG: trying to authenticate markku with groups None ``` Tested with NetBox 3.0.11.
adam added the type: bugstatus: accepted labels 2025-12-29 19:31:54 +01:00
adam closed this issue 2025-12-29 19:31:54 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Dec 3, 2021):

You sure the documentation isn't correct?

e05fa5c302/netbox/users/views.py (L36-L49)

netbox.authentication.RemoteUserBackend is the path to the class, not the name of the logger.

I actually think the issue is that the wrong logger is request in RemoteBackend.

83010e278c/netbox/netbox/authentication.py (L99-L108)

One of the places should be changed.

@kkthxbye-code commented on GitHub (Dec 3, 2021): You sure the documentation isn't correct? https://github.com/netbox-community/netbox/blob/e05fa5c30285a7db9c7b80f52c883523401ef01c/netbox/users/views.py#L36-L49 `netbox.authentication.RemoteUserBackend` is the path to the class, not the name of the logger. I actually think the issue is that the wrong logger is request in RemoteBackend. https://github.com/netbox-community/netbox/blob/83010e278c3046a48368f2c5d7ca6bd3ee38e8ff/netbox/netbox/authentication.py#L99-L108 One of the places should be changed.
Author
Owner

@markkuleinio commented on GitHub (Dec 3, 2021):

Yes my logger format is '%(asctime)s %(name)s %(levelname)s: %(message)s' so netbox.authentication.RemoteUserBackend is the logger name that was used there as you pointed out.

Let me know if a new issue or PR is needed.

@markkuleinio commented on GitHub (Dec 3, 2021): Yes my logger format is `'%(asctime)s %(name)s %(levelname)s: %(message)s'` so `netbox.authentication.RemoteUserBackend` is the logger name that was used there as you pointed out. Let me know if a new issue or PR is needed.
Author
Owner

@jeremystretch commented on GitHub (Dec 21, 2021):

I actually think the issue is that the wrong logger is request in RemoteBackend.

Agreed. I'm going to change it to netbox.auth.RemoteBackend.

@jeremystretch commented on GitHub (Dec 21, 2021): > I actually think the issue is that the wrong logger is request in RemoteBackend. Agreed. I'm going to change it to `netbox.auth.RemoteBackend`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5724