Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INS-48042: Rename Record to UCRecord #608

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c000f1a
fix: Intermitent commit
chirag-ibm Oct 11, 2024
c76f86a
fix: INS-48042 dynamo db plugin upgrade to java 17
chirag-ibm Oct 12, 2024
84133af
fix: INS-48042 elastic search plugin upgrade to java 17
chirag-ibm Oct 12, 2024
7408423
fix: INS-48042 generic plugin upgrade to java 17
chirag-ibm Oct 12, 2024
38ed037
fix: INS-48042 hdfs plugin upgrade to java 17
chirag-ibm Oct 12, 2024
56c806d
fix: INS-48042 intersystems iris plugin upgrade to java 17
chirag-ibm Oct 12, 2024
fa6c640
fix: INS-48042 maria db aws plugin upgrade to java 17
chirag-ibm Oct 12, 2024
d1a3256
fix: INS-48042 maria db plugin upgrade to java 17
chirag-ibm Oct 12, 2024
ee857bd
fix: INS-48042 mongo db plugin upgrade to java 17
chirag-ibm Oct 14, 2024
ffa81ea
fix: INS-48042 mysql azure plugin upgrade to java 17
chirag-ibm Oct 14, 2024
21fa942
fix: INS-48042 mysql plugin upgrade to java 17
chirag-ibm Oct 14, 2024
7dd7d3f
fix: INS-48042 mysql percona upgrade to java 17
chirag-ibm Oct 14, 2024
8b97700
fix: INS-48042 neo4j plugin upgrade to java 17
chirag-ibm Oct 14, 2024
78469f7
fix: INS-48042 neptune aws plugin upgrade to java 17
chirag-ibm Oct 14, 2024
3315bf3
fix: INS-48042 greenplum db plugin upgrade to java 17
chirag-ibm Oct 14, 2024
d09d79f
fix: INS-48042 greenplum OUA plugin upgrade to java 17
chirag-ibm Oct 14, 2024
5582b42
fix: INS-48042 greenplum ICD postgres plugin upgrade to java 17
chirag-ibm Oct 14, 2024
95d7942
fix: INS-48042 ProgressDB plugin upgrade to java 17
chirag-ibm Oct 14, 2024
8dff7e4
fix: INS-48042 pubsub apache solar plugin upgrade to java 17
chirag-ibm Oct 14, 2024
45f8a17
fix: INS-48042 pubsub bq plugin upgrade to java 17
chirag-ibm Oct 14, 2024
90cb252
fix: INS-48042 pubsub firebase plugin upgrade to java 17
chirag-ibm Oct 14, 2024
d59d9ca
fix: INS-48042 pubsub firestore plugin upgrade to java 17
chirag-ibm Oct 14, 2024
b27aebf
fix: INS-48042 pubsub spanner plugin upgrade to java 17
chirag-ibm Oct 14, 2024
d22adfc
fix: INS-48042 pubsub redshift plugin upgrade to java 17
chirag-ibm Oct 14, 2024
ee25cab
fix: INS-48042 S3 plugin upgrade to java 17
chirag-ibm Oct 14, 2024
181b7c1
fix: INS-48042 Sap Hana plugin upgrade to java 17
chirag-ibm Oct 15, 2024
0fad17f
fix: INS-48042 Scylla db plugin upgrade to java 17
chirag-ibm Oct 15, 2024
e156249
fix: INS-48042 Snowflake db plugin upgrade to java 17
chirag-ibm Oct 15, 2024
25b8d4c
fix: INS-48042 teradata db plugin upgrade to java 17
chirag-ibm Oct 15, 2024
a20721d
fix: INS-48042 yugabyte plugin upgrade to java 17
chirag-ibm Oct 15, 2024
de4adcf
fix: INS-48042 Aurora Mysql - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
4b05a91
fix: INS-48042 Azure Postgres - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
464aa79
fix: INS-48042 Azure SQL - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
d967599
fix: INS-48042 Cassandra - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
933cb17
fix: INS-48042 Apache Solr - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
7e04da4
fix: INS-48042 Couchbase DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
733d1c0
fix: INS-48042 Couch DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
0546731
fix: INS-48042 AWS Document DB- rebuit the Zip archive.
chirag-ibm Oct 21, 2024
04d68d3
fix: INS-48042 Azure Event Hub - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
c30f3e6
fix: INS-48042 Generic Plugin - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
aec0a5f
fix: INS-48042 DynamoDB Plugin - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
0df4486
fix: INS-48042 Elastic SearchPlugin - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
b2e322d
fix: INS-48042 HDFS - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
9d4fb27
fix: Maris DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
ac8a6b4
fix: Maris DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
f8e39e2
fix: Iris intersyatems - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
64a55e1
fix: Iris mongo DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
33132ab
fix: Mysql - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
3125ecc
fix: Mysql Azure - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
df75865
fix: Neo4j - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
9c24419
fix: MySQL Percona - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
a6c7c71
fix: MySQL GreenPlum DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
685276e
fix: Neptune AWS - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
80e928c
fix: Apache Solr - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
d9f458e
fix: ICD Postgres - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
b01de6d
fix: Progress DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
7123d38
fix: PubSub Firestore - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
1a118fd
fix: PubSub Firebase - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
4f9f75f
fix: PubSub Snanner - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
80b431f
fix: Redshift - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
8746edd
fix: S3 - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
0846675
fix: SAP Hana - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
39753c1
fix: Teradata - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
dfc4f91
fix: Scyll DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
09dc9eb
fix: Yugabyte DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
24331b3
fix: Snowflake DB - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
e2060ce
fix: Big query - rebuit the Zip archive.
chirag-ibm Oct 21, 2024
d39fc1a
fix: Merge Conflicts
chirag-ibm Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ version "${file("VERSION").text.trim()}"
// ===========================================================================


sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 17
targetCompatibility = 17

buildscript {
repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package com.ibm.guardium.universalconnector.commons;

/**
* A utility class for creating a Guardium {@link com.ibm.guardium.universalconnector.commons.structures.Record Record}.
* A utility class for creating a Guardium {@link com.ibm.guardium.universalconnector.commons.structures.UCRecord Record}.
*/
public class Util {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public String getServiceName() {
* the OS level service that runs the DB instace.
*
* @param serviceName Usually identical to DB name, or container identifier in data source.
* @see Record#setDbName(String)
* @see UCRecord#setDbName(String)
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* <li>App username specifies an application username
* </ul>
*/
public class Record {
public class UCRecord {

/**
* Not to be filled by filter developer
Expand Down Expand Up @@ -233,7 +233,7 @@ public void setRecordsAffected(Integer recordsAffected) {

@Override
public String toString() {
return "Record{" +
return "UCRecord{" +
"connectorName='" + connectorName + '\'' +
", connectorId='" + connectorId + '\'' +
", sessionId='" + sessionId + '\'' +
Expand All @@ -247,4 +247,4 @@ public String toString() {
", recordsAffected=" + recordsAffected +
'}';
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class RecordTest {

Record record = new Record();
UCRecord record = new UCRecord();

@Test
public void testAccessorPostManipulation() {
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group 'com.ibm.guardium.auroramysql' // must match the pack
version "${file("VERSION").text.trim()}" // read from required VERSION file
description = "Aurora Mysql Guardium filter plugin"
pluginInfo.licenses = ['Apache-2.0'] // list of SPDX license IDs
pluginInfo.longDescription = "This gem is a Logstash saphana filter plugin required to be installed as part of IBM Security Guardium, Guardium Universal connector configuration. This gem is not a stand-alone program."
pluginInfo.longDescription = "This gem is a Logstash Aurora MySQL filter plugin required to be installed as part of IBM Security Guardium, Guardium Universal connector configuration. This gem is not a stand-alone program."
pluginInfo.authors = ['IBM', 'Laxmikant Mahale']
pluginInfo.email = ['[email protected]']
pluginInfo.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
Expand All @@ -20,10 +20,10 @@ pluginInfo.pluginClass = "AuroraMysqlGuardiumPluginFilter"
pluginInfo.pluginName = "auroramysqlguardiumpluginfilter" // must match the @LogstashPlugin annotation in the main plugin class
// ===========================================================================

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 17
targetCompatibility = 17

def jacocoVersion = '0.8.4'
def jacocoVersion = '0.8.8'
// minimumCoverage can be set by Travis ENV
def minimumCoverageStr = System.getenv("MINIMUM_COVERAGE") ?: "50.0%"
if (minimumCoverageStr.endsWith("%")) {
Expand All @@ -41,8 +41,8 @@ buildscript {
}

dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
classpath "org.barfuin.gradle.jacocolog:gradle-jacoco-log:3.0.0-RC2"
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.1'
classpath "org.barfuin.gradle.jacocolog:gradle-jacoco-log:3.1.0"
classpath group: 'org.yaml', name: 'snakeyaml', version: '2.2'
}
}
Expand Down
Empty file modified filter-plugin/logstash-filter-aurora-mysql-guardium/gradlew
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Collection<Event> filter(Collection<Event> events, FilterMatchListener ma
JsonObject data = new JsonObject();
data = inputData(e);
try {
Record record = Parser.parseRecord(data);
UCRecord record = Parser.parseRecord(data);
final GsonBuilder builder = new GsonBuilder();
builder.serializeNulls();
final Gson gson = builder.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class Parser {

private static Logger log = LogManager.getLogger(Parser.class);

public static Record parseRecord(final JsonObject data) throws ParseException {
Record record = new Record();
public static UCRecord parseRecord(final JsonObject data) throws ParseException {
UCRecord record = new UCRecord();

if (data != null) {
if (data.has(Constants.SESSION_ID) && !data.get(Constants.SESSION_ID).isJsonNull()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

import java.text.ParseException;
import com.google.gson.JsonObject;
import com.ibm.guardium.auroramysql.Constants;
import com.ibm.guardium.auroramysql.Parser;
import com.ibm.guardium.universalconnector.commons.structures.*;
import com.ibm.guardium.universalconnector.commons.structures.Record;

import org.junit.Assert;
import org.junit.Test;
Expand All @@ -35,7 +32,7 @@ public void testParseRecord_CreateTable() throws ParseException {
data.addProperty(Constants.DB_USER, "admin");
data.addProperty(Constants.DB_NAME, "music");
data.addProperty(Constants.SERVERHOSTNAME, "serverHostName");
final Record record = Parser.parseRecord(data);
final UCRecord record = Parser.parseRecord(data);

Assert.assertEquals(
"CREATE TABLE Orders (OrderID int NOT NULL,OrderNumber int NOT NULL,PersonID int,PRIMARY KEY (OrderID))",
Expand All @@ -56,7 +53,7 @@ public void testParseRecord_Error () throws ParseException {
data.addProperty(Constants.DB_USER, "JOHNNY");
data.addProperty(Constants.DB_NAME, "music");
data.addProperty(Constants.SERVERHOSTNAME, "serverHostName");
final Record record = Parser.parseRecord(data);
final UCRecord record = Parser.parseRecord(data);
Assert.assertEquals("LOGIN_FAILED", record.getException().getExceptionTypeId());
Assert.assertEquals("CONNECT", record.getException().getDescription());
}
Expand All @@ -78,7 +75,7 @@ public void testParseAccessor() throws ParseException {
data.addProperty(Constants.DB_USER, "JOHNNY");
data.addProperty(Constants.DB_NAME, "MUSIC");
data.addProperty(Constants.SERVERHOSTNAME, "serverHostName");
Record record = Parser.parseRecord(data);
UCRecord record = Parser.parseRecord(data);
Accessor actual = record.getAccessor();

Assert.assertEquals(Constants.DB_PROTOCOL, actual.getDbProtocol());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pluginInfo.pluginName = "apache_solr_azure_connector" // must match the @Lo
// ===========================================================================


sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 17
targetCompatibility = 17

def jacocoVersion = '0.8.4'
def jacocoVersion = '0.8.8'
// minimumCoverage can be set by Travis ENV
def minimumCoverageStr = System.getenv("MINIMUM_COVERAGE") ?: "50.0%"
if (minimumCoverageStr.endsWith("%")) {
Expand All @@ -42,8 +42,8 @@ buildscript {
}

dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
classpath "org.barfuin.gradle.jacocolog:gradle-jacoco-log:3.0.0-RC2"
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.0'
classpath "org.barfuin.gradle.jacocolog:gradle-jacoco-log:3.1.0"
classpath group: 'org.yaml', name: 'snakeyaml', version: '2.2'

}
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ibm.guardium.universalconnector.commons.GuardConstants;
import com.ibm.guardium.universalconnector.commons.structures.Record;
import com.ibm.guardium.universalconnector.commons.structures.UCRecord;
import co.elastic.logstash.api.Configuration;
import co.elastic.logstash.api.Context;
import co.elastic.logstash.api.Event;
Expand Down Expand Up @@ -47,7 +47,7 @@ public Collection<Event> filter(Collection<Event> events, FilterMatchListener ma
for (Event event : events) {
if (isQtpEvent(event)) {
try {
Record rec = Parser.parseQtpRecord(event);
UCRecord rec = Parser.parseQtpRecord(event);
final GsonBuilder builder = new GsonBuilder();
builder.serializeNulls();
final Gson gson = builder.disableHtmlEscaping().create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.ibm.guardium.universalconnector.commons.structures.Construct;
import com.ibm.guardium.universalconnector.commons.structures.Data;
import com.ibm.guardium.universalconnector.commons.structures.ExceptionRecord;
import com.ibm.guardium.universalconnector.commons.structures.Record;
import com.ibm.guardium.universalconnector.commons.structures.UCRecord;
import com.ibm.guardium.universalconnector.commons.structures.Sentence;
import com.ibm.guardium.universalconnector.commons.structures.SentenceObject;
import com.ibm.guardium.universalconnector.commons.structures.SessionLocator;
Expand All @@ -54,8 +54,8 @@ public class Parser {
* @return record
* @throws Exception
*/
public static Record parseQtpRecord(final Event event) throws Exception {
Record record = new Record();
public static UCRecord parseQtpRecord(final Event event) throws Exception {
UCRecord record = new UCRecord();
try {
record.setSessionId(getSessionId(event));
record.setAppUserName(ApplicationConstant.NOT_AVAILABLE);
Expand Down Expand Up @@ -385,7 +385,7 @@ private static String getRedactedData(Event event) {
/**
* Using this to set redactedDataSql
*
* @param eventF
* @param event
* @return redactedsql
*/
private static String getRedactedSql(final Event event) {
Expand Down Expand Up @@ -453,7 +453,7 @@ protected static Sentence parseQtpSentence(final Event event) throws Exception {
* Using this to perform operation on input, convert String core into
* sentenceObject Object and then return the value as response
*
* @param String core
* @param core
* @return sentenceobject
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.ibm.guardium.universalconnector.commons.structures.Accessor;
import com.ibm.guardium.universalconnector.commons.structures.Construct;
import com.ibm.guardium.universalconnector.commons.structures.ExceptionRecord;
import com.ibm.guardium.universalconnector.commons.structures.Record;
import com.ibm.guardium.universalconnector.commons.structures.UCRecord;
import com.ibm.guardium.universalconnector.commons.structures.Sentence;
import com.ibm.guardium.universalconnector.commons.structures.SessionLocator;

Expand Down Expand Up @@ -111,7 +111,7 @@ public void testRedacted() throws Exception {
event.setField(ApplicationConstant.WEBAPP_FOR_FULLSQL, ApplicationConstantTest.WEBAPP_FOR_FULLSQL_VALUE);
event.setField(ApplicationConstant.PATH_FOR_FULLSQL, ApplicationConstantTest.PATH_FOR_FULLSQL_VALUE);
event.setField(ApplicationConstant.PARAMS, ApplicationConstantTest.PARAMS_VALUE);
Record record = Parser.parseQtpRecord(event);
UCRecord record = Parser.parseQtpRecord(event);
String redacted = record.getData().getConstruct().getRedactedSensitiveDataSql();
Assert.assertNotNull(redacted);
Assert.assertEquals(ApplicationConstantTest.REDACTED_VALUE, redacted);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pluginInfo.pluginName = "azure_postgresql_guardium_plugin_filter" // must m
// ===========================================================================shPlugin annotation in the main plugin class
// ===========================================================================

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 17
targetCompatibility = 17

def jacocoVersion = '0.8.4'
def jacocoVersion = '0.8.8'
// minimumCoverage can be set by Travis ENV
def minimumCoverageStr = System.getenv("MINIMUM_COVERAGE") ?: "50.0%"
if (minimumCoverageStr.endsWith("%")) {
Expand All @@ -42,8 +42,8 @@ buildscript {
}

dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
classpath "org.barfuin.gradle.jacocolog:gradle-jacoco-log:3.0.0-RC2"
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.0'
classpath "org.barfuin.gradle.jacocolog:gradle-jacoco-log:3.1.0"
classpath group: 'org.yaml', name: 'snakeyaml', version: '2.2'
}
}
Expand Down Expand Up @@ -137,7 +137,6 @@ tasks.register("copyDependencyLibs", Copy){
}

apply plugin: 'jacoco'
//apply plugin: 'org.barfuin.gradle.jacocolog' version '2.0.0'
apply plugin: "org.barfuin.gradle.jacocolog"
// ------------------------------------
// JaCoCo is a code coverage tool
Expand Down Expand Up @@ -188,4 +187,4 @@ jacocoTestCoverageVerification {
}))
}
}
project.tasks.check.dependsOn(jacocoTestCoverageVerification, jacocoTestReport)
project.tasks.check.dependsOn(jacocoTestCoverageVerification, jacocoTestReport)
Empty file.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
import java.io.File;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;

import org.apache.commons.collections.map.HashedMap;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.LoggerContext;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ibm.guardium.universalconnector.commons.GuardConstants;
import com.ibm.guardium.universalconnector.commons.structures.Record;
import com.ibm.guardium.universalconnector.commons.structures.UCRecord;

import co.elastic.logstash.api.Configuration;
import co.elastic.logstash.api.Context;
Expand Down Expand Up @@ -74,7 +72,7 @@ public Collection<Event> filter(Collection<Event> events, FilterMatchListener ma

try {

Record record = Parser.parseRecord(e);
UCRecord record = Parser.parseRecord(e);

final GsonBuilder builder = new GsonBuilder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,24 @@
#*/
package com.ibm.guardium.azurepostgresql;

import java.text.SimpleDateFormat;

import org.apache.logging.log4j.LogManager;

import org.apache.logging.log4j.Logger;

import java.util.Date;

import java.text.SimpleDateFormat;
import java.text.ParseException;

import com.ibm.guardium.universalconnector.commons.structures.Accessor;

import com.ibm.guardium.universalconnector.commons.structures.Data;

import com.ibm.guardium.universalconnector.commons.structures.ExceptionRecord;

import com.ibm.guardium.universalconnector.commons.structures.Record;
import com.ibm.guardium.universalconnector.commons.structures.*;

import com.ibm.guardium.universalconnector.commons.structures.SessionLocator;

import com.ibm.guardium.universalconnector.commons.structures.Time;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import co.elastic.logstash.api.Event;

public class Parser {

private static Logger log = LogManager.getLogger(Parser.class);

public static Record parseRecord(final Event e) throws ParseException {
public static UCRecord parseRecord(final Event e) throws ParseException {

Record record = new Record();
UCRecord record = new UCRecord();

String dbname = Constants.NA;
if (e.getField(Constants.DATABASE_NAME) != null) {
Expand Down Expand Up @@ -102,7 +89,7 @@ public static Time parseTimestamp(final Event e) {
return new Time(millis, 0, 0);
}

public static void parseSessionId(final Event e, final Record record) {
public static void parseSessionId(final Event e, final UCRecord record) {

if (e.getField(Constants.SESSION_ID) != null) {
record.setSessionId(e.getField(Constants.SESSION_ID).toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import org.junit.Test;
import org.logstash.plugins.ContextImpl;

import com.ibm.guardium.azurepostgresql.Constants;
import com.ibm.guardium.azurepostgresql.AzurePostgresqlGuardiumPluginFilter;
import com.ibm.guardium.universalconnector.commons.GuardConstants;
import co.elastic.logstash.api.Context;
import co.elastic.logstash.api.Event;
Expand Down
Loading
Loading