Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: onboarding customerio segment #1853

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "CUSTOMERIO_SEGMENT",
"displayName": "Customerio Segment",
"config": {
"features": ["vdm-next"],
"supportsBlankAudienceCreation": true,
"disableJsonMapper": true,
"supportsVisualMapper": true,
"syncBehaviours": ["mirror"],
"transformAtV1": "router",
"saveDestinationResponse": true,
"includeKeys": ["oneTrustCookieCategories", "consentManagement"],
"excludeKeys": [],
"supportedSourceTypes": ["warehouse"],
"supportedMessageTypes": {
"cloud": ["record"]
},
"isAudienceSupported": true,
"supportedConnectionModes": {
"warehouse": ["cloud"]
},
"destConfig": {
"defaultConfig": ["siteId", "appApiKey", "apiKey"],
"warehouse": [
"connectionMode",
"consentManagement",
"oneTrustCookieCategories",
"ketchConsentPurposes"
]
},
"secretKeys": ["appApiKey", "apiKey"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Add siteId to secretKeys array for consistent security configuration

Based on the UI configuration, siteId is marked with "secret": true in the UI, but is missing from the secretKeys array in the db-config.json. This inconsistency should be fixed by adding siteId to maintain proper security handling across the configuration.

  • src/configurations/destinations/customerio_segment/db-config.json: Add siteId to the secretKeys array
🔗 Analysis chain

Verify consistency of secret keys configuration

The secretKeys array includes appApiKey and apiKey but excludes siteId, which is marked as secret in the UI configuration.

Add siteId to the secretKeys array:

-    "secretKeys": ["appApiKey", "apiKey"]
+    "secretKeys": ["appApiKey", "apiKey", "siteId"]

Let me verify the consistency between secret keys configuration and UI fields by searching through the codebase.


Let me search specifically for UI configuration that marks the siteId as secret.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for UI configuration files related to customerio_segment
fd customerio_segment --type f

# Search for siteId configuration in the found files
rg "siteId" --type json

Length of output: 8732


Script:

#!/bin/bash
# Check UI configuration for customerio_segment
cat src/configurations/destinations/customerio_segment/ui-config.json

Length of output: 8861

},
"options": {
"isBeta": true
}
}
115 changes: 115 additions & 0 deletions src/configurations/destinations/customerio_segment/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": ["siteId", "appApiKey", "apiKey"],
"type": "object",
"properties": {
"apiKey": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,500})$"
},
manish339k marked this conversation as resolved.
Show resolved Hide resolved
"appApiKey": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$"
},
"siteId": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$"
},
"oneTrustCookieCategories": {
"type": "object",
"properties": {
"warehouse": {
"type": "array",
"items": {
"type": "object",
"properties": {
"oneTrustCookieCategory": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
}
}
},
"consentManagement": {
"type": "object",
"properties": {
"warehouse": {
"type": "array",
"items": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": ["custom", "ketch", "oneTrust"],
"default": "oneTrust"
},
"consents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"consent": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
}
},
"allOf": [
{
"if": {
"properties": {
"provider": {
"const": "custom"
}
},
"required": ["provider"]
},
"then": {
"properties": {
"resolutionStrategy": {
"type": "string",
"enum": ["and", "or"]
}
},
"required": ["resolutionStrategy"]
}
}
]
}
}
}
},
"connectionMode": {
"type": "object",
"properties": {
"warehouse": {
"type": "string",
"enum": ["cloud"]
}
}
},
"ketchConsentPurposes": {
"type": "object",
"properties": {
"warehouse": {
"type": "array",
"items": {
"type": "object",
"properties": {
"purpose": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
}
}
}
}
}
}
Loading
Loading