šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

github.com/X-0x01/LDAPServerMonitor

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/X-0x01/LDAPServerMonitor

v0.0.0-20211108114208-a55dc33b5b11
Source
Go
Version published
Created
Source

LDAPServerMonitor

Introduction

The LDAP server manages a large amount of data, but it cannot monitor the changes of these data. What is the use of monitoring data? Examples:

  • monitor the enabled/disabled of an account to handle subsequent account initialization/cleanup work.
  • Monitor the user's login operation, used to initialize some system data.
  • ...

To start using LDAPServerMonitor

func main() {
	monitor := ldapmonitor.NewMonitor(ldapmonitor.LDAPMonitorConfig{
		Url:                   "ldap://...",
		ManagerDN:             "",
		ManagerPassword:       "",
		BaseDN:                "",
		RefreshPeriodInSecond: 10,
		IgnoreLDAPFileds:      []string{"logonCount"},
	})

	monitor.AddListener("firstListener", func(data ldapmonitor.LDAPChangeEntry) {
		fmt.Printf("[%s] accountName: %s, filed: %s, changeType: %s, before: %s, after: %s\n",
		getTime(), data.AccountName, data.Filed, ldapmonitor.DataChangeTypeMap[int(data.ChangeType)],
		data.ChangeBefore, data.ChangeAfter)
	})

	monitor.Start()

	for {
		time.Sleep(time.Hour * 10)
	}
}

func getTime() string {
	return time.Now().Format("2006-01-02 15:04:05")
}

Support

If you need support, raise an issue.

FAQs

Package last updated on 08 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts