mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-05 20:17:07 +00:00
* FIX #20252 - Add Auto Classification bot * format
This commit is contained in:
parent
581ab6ce71
commit
4350fed406
@ -91,10 +91,6 @@ public class OpenMetadataConnectionBuilder {
|
||||
String type = IngestionPipelineRepository.getPipelineWorkflowType(ingestionPipeline);
|
||||
botName = String.format("%sApplicationBot", type);
|
||||
}
|
||||
// TODO: Remove this once we internalize the DataInsights app
|
||||
// For now we need it since DataInsights has its own pipelineType inherited from when it was
|
||||
// a standalone workflow
|
||||
case DATA_INSIGHT -> botName = "DataInsightsApplicationBot";
|
||||
default -> botName =
|
||||
String.format("%s-bot", ingestionPipeline.getPipelineType().toString().toLowerCase());
|
||||
}
|
||||
@ -195,7 +191,8 @@ public class OpenMetadataConnectionBuilder {
|
||||
private User retrieveBotUser(String botName) {
|
||||
User botUser = retrieveIngestionBotUser(botName);
|
||||
if (botUser == null) {
|
||||
throw new IllegalArgumentException("Please, verify that the ingestion-bot is present.");
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Please, verify that the bot [%s] is present.", botName));
|
||||
}
|
||||
return botUser;
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "autoClassification-bot",
|
||||
"displayName": "AutoClassificationBot",
|
||||
"description": "Bot used for ingesting Sample Data and adding PII classification.",
|
||||
"fullyQualifiedName": "autoClassification-bot",
|
||||
"botUser": {
|
||||
"name" : "autoClassification-bot",
|
||||
"type" : "user"
|
||||
},
|
||||
"provider": "system"
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "autoClassification-bot",
|
||||
"roles": [
|
||||
{
|
||||
"name": "AutoClassificationBotRole",
|
||||
"type": "role"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "AutoClassificationBotPolicy",
|
||||
"displayName": "AutoClassification Bot Policy",
|
||||
"fullyQualifiedName": "AutoClassificationBotPolicy",
|
||||
"description": "Policy for AutoClassification Bot to perform operations on metadata entities.",
|
||||
"enabled": true,
|
||||
"allowDelete": false,
|
||||
"provider": "system",
|
||||
"rules": [
|
||||
{
|
||||
"name": "AutoClassificationBotRule-Allow-Table",
|
||||
"description" : "Allow adding tags and sample data to the tables",
|
||||
"resources" : ["Table"],
|
||||
"operations": ["EditAll", "ViewAll"],
|
||||
"effect": "allow"
|
||||
},
|
||||
{
|
||||
"name": "AutoClassificationBotRule-ViewAll",
|
||||
"description" : "Allow viewing all assets",
|
||||
"resources" : ["All"],
|
||||
"operations": ["ViewAll"],
|
||||
"effect": "allow"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "AutoClassificationBotRole",
|
||||
"displayName": "Auto Classification bot role",
|
||||
"description": "Role corresponding to a Auto Classification bot.",
|
||||
"allowDelete": false,
|
||||
"provider": "system",
|
||||
"policies" : [
|
||||
{
|
||||
"type" : "policy",
|
||||
"name" : "DefaultBotPolicy"
|
||||
},
|
||||
{
|
||||
"type" : "policy",
|
||||
"name" : "AutoClassificationBotPolicy"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user