forked from ArcadeData/arcadedb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2289 enforce data classification tagging (#8)
* Conditional data validation WIP * initial data filtering by classification marking status * Data stewardship role sourced from keycloak * Added additional plumbing to make ACCM properties configurable. Cleanup and comments * cleanup * updated data steward role keyword * Fixed data steward role not being passed to perm checkers correctly * remove obe debug
- Loading branch information
1 parent
dbe9e72
commit 81a7024
Showing
16 changed files
with
393 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,15 @@ | |
* @author Luca Garulli ([email protected]) | ||
*/ | ||
public class DocumentValidator { | ||
|
||
// TODO move ACCM validation here? | ||
|
||
public static void validateSpecificProperties(final MutableDocument document, final List<Property> properties) throws ValidationException { | ||
document.checkForLazyLoadingProperties(); | ||
for (Property entry : properties) | ||
validateField(document, entry); | ||
} | ||
|
||
public static void validate(final MutableDocument document) throws ValidationException { | ||
document.checkForLazyLoadingProperties(); | ||
for (Property entry : document.getType().getProperties()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
211 changes: 180 additions & 31 deletions
211
engine/src/main/java/com/arcadedb/database/MutableDocument.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ | |
* @author Luca Garulli ([email protected]) | ||
*/ | ||
public class ValidationException extends ArcadeDBException { | ||
public ValidationException(final String message) { | ||
|
||
public ValidationException(final String message) { | ||
super(message); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
engine/src/main/java/com/arcadedb/security/ACCM/AccmProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.arcadedb.security.ACCM; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.arcadedb.schema.Type; | ||
|
||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.Accessors; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@Accessors(chain = true, fluent = true) | ||
public class AccmProperty { | ||
|
||
// Split name by periods into property path | ||
private String name; | ||
private String parentType; | ||
private Type dataType; | ||
private boolean required; | ||
private boolean notNull; | ||
private boolean readOnly; | ||
private List<String> options = new ArrayList<>(); | ||
private String validationRegex; | ||
|
||
// private String keycloakUserInfoPropertyName; | ||
// might also be coming from roles | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.