Motion - Logging Against Motion Stream Auth Patch
You are here: Foswiki>Motion Web>LoggingAgainstMotionStreamAuthPatch (16 Aug 2015, StevePowers)Edit Attach

Enable IP and Auth login attempts against Live Stream

Description of Patch

With the MotionStreamAuthPatch added to snapshot, we can expose the Live Stream Server to a public IP, but there is no logging so we can't monitor any possible issues...

The attached patch against 'trunkREV561' (latest daily snapshot) logs at WRN (ip connected and successful auth) and ERR (failed auth) which should work with a reasonable verbose log file at 'log_level 5'.

What it does:

  1. log the remote IP and port of any connections against the stream server (supports IPv4 & IPv6).
  2. log decoded base64 (using OpenSSL BIO functions) failed basic_auth attempts - (OpenSSL may limit portabilty, I have only tested on x86_64/i686)
  3. log failed digest_auth, records the failed username only.
  4. log any successful auth attempt (no credentials displayed).
I have been using for a couple of weeks now with no issues - and some peace of mind - I'm sure it can be improved.

LoggingAgainstMotionStreamAuthPatch.diff

Installation of Patch

Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called filename_of_patch_file.diff)

patch < filename_of_patch_file.diff

Then re-build Motion and test the patch.

Change History of Patch

  • 1.0 Initial revision

Discussion and Comments


Topic revision: r3 - 16 Aug 2015, StevePowers
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.