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

Audit log event “Flow Deployed” for Devices #3357

Closed
1 of 7 tasks
Tracked by #2423 ...
MarianRaphael opened this issue Jan 18, 2024 · 5 comments · Fixed by #3447, FlowFuse/device-agent#232 or FlowFuse/website#1638
Closed
1 of 7 tasks
Tracked by #2423 ...
Assignees
Labels
area:device Device specific work feature-request New feature or request that needs to be turned into Epic/Story details size:L - 5 Sizing estimation point
Milestone

Comments

@MarianRaphael
Copy link
Contributor

MarianRaphael commented Jan 18, 2024

Description

Introduce a way to publish an Audit log Event from a Device to the FlowFuse Device Audit log.

Scope

  • Devices can publish Audit log events.
  • Upon deployment, an Audit log will be generated titled “Flow Deployed” (see Audit log event of Instances).

Which customers would this be available to

Everyone - CE/Starter/Team/Enterprise

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Acceptance Criteria

  • All log Auditable Log events are triggered in a Node-RED Device that is connected to the platform and are displayed in FF Device Audit Log with correct Node-RED icon and a subtitle under the appropriate log entry heading
    • flows deployed (full, flows, nodes)
    • flows reloaded
    • context key deleted
    • node-red logged out
    • Node-RED Settings Updated
  • Changelog entry is written up for website
    * Changelog Entry for Device Audit Log improvements website#1638
@MarianRaphael MarianRaphael added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do size:L - 5 Sizing estimation point labels Jan 18, 2024
@MarianRaphael MarianRaphael added this to the 2.1 milestone Jan 18, 2024
@MarianRaphael MarianRaphael added the area:device Device specific work label Jan 18, 2024
@MarianRaphael MarianRaphael moved this from Todo to Up Next in 🛠 Development Feb 1, 2024
@Steve-Mcl Steve-Mcl moved this from Up Next to In Design in 🛠 Development Feb 2, 2024
@Steve-Mcl
Copy link
Contributor

@MarianRaphael

While implementing this I noted there was no infrastructure for sending the Node-RED generated audit events like there are in the project/instance node-reds - contrary to what I believed when reading the comments of issue #3268 - I (wrongly) assumed since this Issue was asking for the addition of 1 more thing (Flow Deployed) that the pathway to capture node-red raised audit entries was already in-place - this is not the case.

So, in introducing this pathway we automatically get additional audit log entries (on top of just "Flow Deployed")

This left me 2 choices:

  1. add code to agent to prevent anything but 'flows deployed"
  2. add code to FF core for visualising the additional node-red events

I guess I am asking is it OK that we keep all logging so as to align the device agent with the instance node-reds and accept the same level of audit logging?

It is my strong preference to keep all of the device generated audit entries and thus achieve parity between devices & instances.

@MarianRaphael
Copy link
Contributor Author

For this iteration, it is just about, as you mentioned:

  1. The infrastructure for sending audit events generated by devices.
  2. The "Flow Deployed" event
    (see scope)

In a later iteration, we could add more events if there is a user demand for them.

@MarianRaphael
Copy link
Contributor Author

After further explanation and discussion, it has been determined that since the audit logs are already generated on the device but not transmitted to the FF platform, it would require additional code and effort to stop the existing events from being sent. Therefore, we can simply replicate the behavior of instances to avoid extra work on the Launcher side.

@Steve-Mcl
Copy link
Contributor

@MarianRaphael I updated the OP to include acceptance criteria - please revise as you see fit.

I also added a task for Change Log - however, does this actually warrant a changelog entry 🤔

@github-project-automation github-project-automation bot moved this from Next to Closed / Done in ☁️ Product Planning Feb 6, 2024
@MarianRaphael
Copy link
Contributor Author

Yes a changelog entry would be great

@knolleary knolleary moved this from Review to Verify in 🛠 Development Feb 9, 2024
@joepavitt joepavitt moved this from Verify to Done in 🛠 Development Feb 15, 2024
@joepavitt joepavitt removed the needs-triage Needs looking at to decide what to do label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:device Device specific work feature-request New feature or request that needs to be turned into Epic/Story details size:L - 5 Sizing estimation point
Projects
Archived in project
Archived in project
3 participants