GithubHelp home page GithubHelp logo

isamalrikabi / node-log4js-qradar-syslog-appender Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/node-log4js-qradar-syslog-appender

0.0 1.0 0.0 150 KB

Node.js Log4js syslog appender for QRadar

License: MIT License

JavaScript 94.95% Shell 5.05%

node-log4js-qradar-syslog-appender's Introduction

Build Status

IBM Bluemix DevOps Services - node-log4js-syslog-appender

This module is a qradar syslog appender for node-log4js.

Link to IBM Cloud DevOps Toolchains.

This is one of hundreds of IBM Open Source projects at GitHub.

License

The MIT License (MIT)

Contributing

Contributions are welcome via Pull Requests. Please submit your very first Pull Request against the Developer's Certificate of Origin, adding a line like the following to the end of the file... using your name and email address of course!

Note that all contributions must be submitted through pull requests and have to pass the Travis Status Checks in order for code to be merged into master.

Signed-off-by: John Doe [email protected]

Usage

Pre-requisites

You must be using log4js-node 3.x or higher, and must call log4js.configure('/path/to/log4js.json') somewhere in your code.

To upgrade

  • npm i log4js-qradar-syslog-appender@latest --save

To install

npm i log4js-qradar-syslog-appender --save

  • Set the following environment variable to true in order to enable the appender: export log4js_syslog_appender_enabled=true
  • The default behavior is all log messages will be send to syslog, you can override this behavior by specifying which loggers' log messages to send via the comma separated list env var export log4js_syslog_appender_whitelist=audit-logs
  • For local deveopment only: Add the following appender to your log4js.json file (note this is the minimal valid configuration):
{
        "type": "log4js-qradar-syslog-appender",
        "options": {
                "host": "syslog.prd.ccs.ibmcloud.com",
                "port": "6514",
                "product": "otc-api"
          }
}
  • For production environments (and in source), only push the following in the log4js.json file:
{
        "type": "log4js-qradar-syslog-appender",
        "options": {}
}
  • Set the following env vars (in pipeline - values depending on your setup/app):
export log4js_syslog_appender_enabled=true
export log4js_syslog_appender_whitelist=audit-logs,audit-logs-v2
export log4js_syslog_appender_host=syslog.prd.ccs.ibmcloud.com
export log4js_syslog_appender_port=6514
export log4js_syslog_appender_product=otc-api
export log4js_syslog_appender_url=devops.ng.bluemix.net

Use with default syslog

You can use this appender with any default UDP syslog in unencrypted mode. The environment setup is very similar to above:

export log4js_syslog_appender_enabled=true
export log4js_syslog_appender_useUdpSyslog=true
export log4js_syslog_appender_whitelist=audit-logs,audit-logs-v2
export log4js_syslog_appender_host=localhost
export log4js_syslog_appender_port=514
export log4js_syslog_appender_product=otc-api
export log4js_syslog_appender_url=devops.ng.bluemix.net

Setting Certificates

There are two ways of setting the certs, either through a path (meaning you have to check the certs into source control - so not ideal) or preferably, by setting the base64 encoded values as env vars.

Option 1: Checking them into source control, then specifying the path to them

export log4js_syslog_appender_certificatePath=keys/IDS-crt.pem
export log4js_syslog_appender_privateKeyPath=keys/IDS-key.pem
export log4js_syslog_appender_caPath=keys/ca.pem

Option 2: A more secure way is actually setting the cert itself as env vars.

Note: To shorten the length, we use the base64 encoded values of the certs.

export log4js_syslog_appender_certificateBase64=zeaalkjsdfkalsdjfkrlasdjflkasjdlfkjsdfKLJFLSKDJF9f34...
export log4js_syslog_appender_privateKeyBase64=pop4545FDSFalkjsdfrkalsdjfklasdjflkasjdlfkjsdfKLJFLSKDJF9f34...
export log4js_syslog_appender_caBase64=ee3rr435F43alkjsdfkalsdjfklasdjflkasjdlfkjsdfKLJFLSKDJF9f34...

Allow connections to servers with self signed certs. By default, these connections will fail.

export log4js_syslog_appender_rejectUnauthorized=false

node-log4js-qradar-syslog-appender's People

Contributors

hermanba avatar hermansb avatar cttttt avatar simonkotwicz avatar dependabot[bot] avatar tcschmid avatar jauninb avatar paulweb515 avatar pdehaan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.