public class ZKAudit extends Object
| Constructor and Description |
|---|
ZKAudit(ZKClient zk,
File auditConfigFile)
Construct ZKAudit object for audit reports generation.
|
| Modifier and Type | Method and Description |
|---|---|
String |
generateChecksSection()
Generate checks result section.
|
String |
generateQueriesSection()
Generate queries result section.
|
String |
getACLOverview()
Generate a complete list of accessible znodes and their ACL.
|
String |
getFourLetterWordOverview()
Probe the ZooKeeper Server for whitelisted Four Letter Words.
|
Set<String> |
getRootPathCheckKeys()
Get a set of unique root paths defined by the user for each check.
|
Set<String> |
getRootPathKeys()
Get a set of unique root paths defined by the user for each query.
|
ZKAuditSet |
getZkAuditSet()
Return audit configuration object.
|
void |
groupChecksByRootPath()
Group checks based on their root path for optimal performance.
|
void |
groupQueriesByRootPath()
Group queries based on their root path for optimal performance.
|
public ZKAudit(ZKClient zk, File auditConfigFile) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
zk - ZooKeeper Client connected to a ZooKeeper ServerauditConfigFile - File that defines the queries to be executed for this
particular audit reportcom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic Set<String> getRootPathKeys()
public Set<String> getRootPathCheckKeys()
public ZKAuditSet getZkAuditSet()
public String getACLOverview() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic String getFourLetterWordOverview() throws org.apache.zookeeper.KeeperException, InterruptedException, IOException, org.apache.zookeeper.common.X509Exception.SSLContextException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionIOExceptionorg.apache.zookeeper.common.X509Exception.SSLContextExceptionpublic String generateQueriesSection() throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, org.apache.zookeeper.KeeperException, InterruptedException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionNoSuchFieldExceptionSecurityExceptionIllegalArgumentExceptionIllegalAccessExceptionNoSuchMethodExceptionInvocationTargetExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic String generateChecksSection() throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, org.apache.zookeeper.KeeperException, InterruptedException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionNoSuchFieldExceptionSecurityExceptionIllegalArgumentExceptionIllegalAccessExceptionNoSuchMethodExceptionInvocationTargetExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void groupQueriesByRootPath()
throws NoSuchFieldException,
SecurityException,
IllegalArgumentException,
IllegalAccessException
public void groupChecksByRootPath()
throws NoSuchFieldException,
SecurityException,
IllegalArgumentException,
IllegalAccessException
Copyright © 2020. All rights reserved.