paras200 commented on code in PR #986:
URL: https://github.com/apache/ranger/pull/986#discussion_r3405416211


##########
audit-server/audit-dispatcher/dispatcher-opensearch/src/main/java/org/apache/ranger/audit/dispatcher/OpenSearchDispatcherManager.java:
##########
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ranger.audit.dispatcher;
+
+import org.apache.ranger.audit.dispatcher.kafka.AuditDispatcher;
+import org.apache.ranger.audit.dispatcher.kafka.AuditDispatcherTracker;
+import org.apache.ranger.audit.dispatcher.kafka.AuditOpenSearchDispatcher;
+import org.apache.ranger.audit.provider.MiscUtil;
+import org.apache.ranger.audit.server.AuditServerConstants;
+import org.apache.ranger.audit.utils.AuditServerLogFormatter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Properties;
+
+public final class OpenSearchDispatcherManager {
+    private static final Logger LOG = 
LoggerFactory.getLogger(OpenSearchDispatcherManager.class);
+    private static final String CONFIG_DISPATCHER_TYPE = 
AuditServerConstants.PROP_DISPATCHER_TYPE;
+    private static final String TYPE_OPENSEARCH = "opensearch";
+    private static final String ES_DEST_PROP = 
"xasecure.audit.destination.elasticsearch";

Review Comment:
   Implemented a dedicated audit_store=opensearch path — separate from the 
existing Elasticsearch infrastructure — with its own config namespace 
(ranger.audit.opensearch.*), a new  ranger-audit-dest-os module for direct 
plugin writes wired into AuditProviderFactory, and a native audit read path in 
Ranger Admin using the low-level REST client. This gives us compatibility with 
any OpenSearch version (1.x, 2.x+) without relying on the ES High Level REST 
Client



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to