Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2493

cf-net command line tool

    XMLWordPrintable

    Details

    • Type: Epic
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.11.0
    • Component/s: cf-net
    • Labels:
      None
    • Epic Name:
      cf-net

      Description

      Tool that implements the client-side of all network-protocol commands of CFEngine, fully configurable from the command-line. Useful for debugging, testing, stress-testing, every-day use without writing policy, etc.

      Syntax:

      • cf-net [options] COMMAND [parameter]

      Example command-line usage:

      • cf-net -H 1.2.3.4:5432 GET /var/cfengine/masterfiles/promises.cf
      • cf-net STAT /var/cfengine/masterfiles/promises.cf (This is the "SYNCH time STAT" command actually)
      • cf-net OPENDIR /var/cfengine/masterfiles

      Options

      • --host|-h host[:port]
      • --trust-server=yes default is no, which means that connection is closed if server presents an unknown key.

      Notes

      • By default, it should read the trust from the same locations as the rest of CFEngine and have similar actions. For example keys should be searched in /var/cfengine/ppkeys and trust connection should be denied if remote key is not found in there.

      Useful implementation examples:

      • cf-runagent/cf-runagent.c:main()
      • cf-agent/verify_files_utils.c:ScheduleCopyOperation()
      • cf-serverd/server_tls.c lists all protocol commands from the server's point of view

      Tips:

      • In any CFEngine process, logging in debug mode prints all network traffic, incoming or outgoing. For example to see the server's traffic, launch it in foreground with debug logging enabled: cf-serverd -dF

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olehermanse Ole Herman Schumacher Elgesem
                Reporter:
                a10038 jimis (Dimitrios Apostolou)
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel