suvodeep-pyne commented on code in PR #16616: URL: https://github.com/apache/pinot/pull/16616#discussion_r2286173012
########## pinot-common/src/main/java/org/apache/pinot/common/audit/AuditConfigManager.java: ########## @@ -0,0 +1,130 @@ +/** + * 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.pinot.common.audit; + +import java.util.HashSet; +import java.util.Set; +import javax.inject.Singleton; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Thread-safe configuration manager for audit logging settings. + * Handles dynamic configuration updates from cluster configuration changes. + * Self-registers with the provided cluster config provider. + */ +@Singleton +public final class AuditConfigManager { + + private static final Logger LOG = LoggerFactory.getLogger(AuditConfigManager.class); + + private final AuditConfig _currentConfig = new AuditConfig(); + + /** + * Checks if the given endpoint should be excluded from audit logging. + * Supports simple wildcard matching with '*' character. + */ + public static boolean isEndpointExcluded(String endpoint, String excludedEndpointsString) { Review Comment: So the expectation here is that we'll expose these configurations through the cluster config. A user should be able to change these configurations on the fly. The cluster config will be the configuration that will be respected finally. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
