diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/util/OpenMetadataConnectionBuilder.java b/openmetadata-service/src/main/java/org/openmetadata/service/util/OpenMetadataConnectionBuilder.java index fc8089e09dd..5bf67f96e88 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/util/OpenMetadataConnectionBuilder.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/util/OpenMetadataConnectionBuilder.java @@ -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; } diff --git a/openmetadata-service/src/main/resources/json/data/bot/autoClassificationBot.json b/openmetadata-service/src/main/resources/json/data/bot/autoClassificationBot.json new file mode 100644 index 00000000000..663989157e8 --- /dev/null +++ b/openmetadata-service/src/main/resources/json/data/bot/autoClassificationBot.json @@ -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" +} \ No newline at end of file diff --git a/openmetadata-service/src/main/resources/json/data/botUser/autoClassificationBot.json b/openmetadata-service/src/main/resources/json/data/botUser/autoClassificationBot.json new file mode 100644 index 00000000000..ac4089e00c0 --- /dev/null +++ b/openmetadata-service/src/main/resources/json/data/botUser/autoClassificationBot.json @@ -0,0 +1,9 @@ +{ + "name": "autoClassification-bot", + "roles": [ + { + "name": "AutoClassificationBotRole", + "type": "role" + } + ] +} \ No newline at end of file diff --git a/openmetadata-service/src/main/resources/json/data/policy/AutoClassificationBotPolicy.json b/openmetadata-service/src/main/resources/json/data/policy/AutoClassificationBotPolicy.json new file mode 100644 index 00000000000..1974c6069c5 --- /dev/null +++ b/openmetadata-service/src/main/resources/json/data/policy/AutoClassificationBotPolicy.json @@ -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" + } + ] +} diff --git a/openmetadata-service/src/main/resources/json/data/role/AuoClassificationBotRole.json b/openmetadata-service/src/main/resources/json/data/role/AuoClassificationBotRole.json new file mode 100644 index 00000000000..8be71e5f2fa --- /dev/null +++ b/openmetadata-service/src/main/resources/json/data/role/AuoClassificationBotRole.json @@ -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" + } + ] +}