This is really cool. I'm wondering if we should integrate it more into
the 'Accounts' section of Cockpit ... and show login session information
there, both active and historical.
Garrett, what do you think?
Stef
On 10.07.2017 12:33, Nikolai Kondrashov wrote:
Hi everyone,
Over the last couple of weeks I've been learning about Cockpit
internals, and
hacked together a little proof-of-concept page listing and playing back
user
sessions recorded with tlog [1]. Here is a little demo of it I recorded:
https://youtu.be/BPiqFKvW0q4
And here's the code:
https://github.com/Scribery/cockpit/tree/hacking/pkg/session_recording
The POC has absolutely minimal functionality and is not pretty, but it
proves
we can record sessions to systemd journal, and list them and play them
back.
Tlog-rec-session (a part of tlog) logs a recording as a series of messages,
with several extra journal fields attached to allow for filtering all or
specific recorded sessions from the rest of the journal log. Cockpit goes
through journal extracting all tlog messages to collate a session list.
When
asked to playback a session, it starts tlog-play (another part of tlog)
on the
host, specifying how to extract session messages, connects it to a terminal
emulator in the browser, and lets it play.
Next, me and Kyrill are going to work on verifying we can implement the
rest
of the required core functionality [2] with this approach, learn more about
Cockpit, and prepare a design as required by Cockpit team [3]. We will also
see if we can make this into an out-of-tree package for Cockpit.
We would appreciate any comments you might have, be it on the architecture,
the code, or the way you think it should look!
Thank you.
Nick
[1] Tlog - Terminal I/O logger
https://github.com/Scribery/tlog
[2] User Stories for Session Recording Playback
https://github.com/Scribery/meta/blob/master/playback_ui_user_stories.md
[3] Hacking on Cockpit - Contributing a Change
https://github.com/cockpit-project/cockpit/blob/master/HACKING.md#contrib...
_______________________________________________
cockpit-devel mailing list -- cockpit-devel(a)lists.fedorahosted.org
To unsubscribe send an email to cockpit-devel-leave(a)lists.fedorahosted.org