Skip to content

Commit

Permalink
DLS/FLS fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <[email protected]>
  • Loading branch information
nibix committed Sep 16, 2024
1 parent d8aa346 commit 780a6b9
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/main/java/org/opensearch/security/privileges/IndexPattern.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
package org.opensearch.security.privileges;

import java.util.ArrayList;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
package org.opensearch.security.privileges;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.Map;

import org.apache.logging.log4j.util.Strings;

import org.opensearch.cluster.metadata.IndexAbstraction;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.xcontent.json.JsonXContent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
package org.opensearch.security.privileges.dlsfls;

import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -29,6 +39,16 @@

import com.rfksystems.blake2b.Blake2b;

/**
* This class converts role configuration into pre-computed, optimized data structures for applying field masking
* to indexed documents.
* <p>
* With the exception of the statefulRules property, instances of this class are immutable. The life-cycle of an
* instance of this class corresponds to the life-cycle of the role configuration. If the role configuration is changed,
* a new instance needs to be built.
* <p>
* Instances of this class are managed by DlsFlsProcessedConfig.
*/
public class FieldMasking extends AbstractRuleBasedPrivileges<FieldMasking.FieldMaskingRule.SingleRole, FieldMasking.FieldMaskingRule> {

private final FieldMasking.Config fieldMaskingConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
package org.opensearch.security.privileges.dlsfls;

import java.util.function.Predicate;
Expand Down

0 comments on commit 780a6b9

Please sign in to comment.