# Include ip-address in logs for type audit

**URL:** https://discourse.nodered.org/t/include-ip-address-in-logs-for-type-audit/81724
**Category:** Feature Requests
**Created:** [2 October 2023 15:18 UTC](https://discourse.nodered.org/t/include-ip-address-in-logs-for-type-audit/81724 "2023-10-02T15:18:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![khfischbach](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/khfischbach/32/16627_2.png) [@khfischbach](https://discourse.nodered.org/u/khfischbach)
#### Post date: [2 October 2023 15:18 UTC](https://discourse.nodered.org/t/include-ip-address-in-logs-for-type-audit/81724/1 "2023-10-02T15:18:46Z")

</div>

I found in the logfile for a successfull login:

```auto
2 Oct 15:04:27 - [audit] {"event":"auth.login.revoke","level":98,"user":{"username":"abcd","permissions":"*"},"path":"/auth/revo ke","ip":"192.xxx.xxx.xxx","timestamp":1696259067189}

```

Unfortunately for a not succussfull login attempt I can't find the ip-address in the log-entry.

```auto
2 Oct 15:10:14 - [audit] {"event":"auth.login.fail.credentials","username":"xxx","client":"node-red-editor","scope":"","level":98 ,"timestamp":1696259414151}

```

This does not allow me to take action on this ip-address, e.g. block it.

Feature request:  
Please add the ip-address of origin for a non successfull login attempt.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [2 October 2023 20:03 UTC](https://discourse.nodered.org/t/include-ip-address-in-logs-for-type-audit/81724/2 "2023-10-02T20:03:16Z")

</div>

We have an item on the backlog for this already. It proved more complicated to achieve due to the set of libraries we use to handle Auth. I'll take another look.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [1 December 2023 20:04 UTC](https://discourse.nodered.org/t/include-ip-address-in-logs-for-type-audit/81724/3 "2023-12-01T20:04:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
