Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 1 addition & 26 deletions packages/destination-actions/src/destinations/kafka/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { DestinationDefinition } from '@segment/actions-core'
import type { Settings } from './generated-types'
import { validate, getTopics } from './utils'
import { DEPENDS_ON_CLIENT_CERT, DEPEONDS_ON_AWS, DEPENDS_ON_PLAIN_OR_SCRAM } from './depends-on'
import { DEPENDS_ON_CLIENT_CERT, DEPENDS_ON_PLAIN_OR_SCRAM } from './depends-on'
import send from './send'

const destination: DestinationDefinition<Settings> = {
Expand Down Expand Up @@ -36,7 +36,6 @@ const destination: DestinationDefinition<Settings> = {
{ label: 'Plain', value: 'plain' },
{ label: 'SCRAM-SHA-256', value: 'scram-sha-256' },
{ label: 'SCRAM-SHA-512', value: 'scram-sha-512' },
// { label: 'AWS IAM', value: 'aws' },
{ label: 'Client Certificate', value: 'client-cert-auth' }
],
default: 'plain'
Expand All @@ -57,30 +56,6 @@ const destination: DestinationDefinition<Settings> = {
required: false,
depends_on: DEPENDS_ON_PLAIN_OR_SCRAM
},
accessKeyId: {
label: 'AWS Access Key ID',
description:
'The Access Key ID for your AWS IAM instance. Must be populated if using AWS IAM Authentication Mechanism.',
type: 'string',
required: false,
depends_on: DEPEONDS_ON_AWS
},
secretAccessKey: {
label: 'AWS Secret Key',
description:
'The Secret Key for your AWS IAM instance. Must be populated if using AWS IAM Authentication Mechanism.',
type: 'password',
required: false,
depends_on: DEPEONDS_ON_AWS
},
authorizationIdentity: {
label: 'AWS Authorization Identity',
description:
'AWS IAM role ARN used for authorization. This field is optional, and should only be populated if using the AWS IAM Authentication Mechanism.',
type: 'string',
required: false,
depends_on: DEPEONDS_ON_AWS
},
ssl_enabled: {
label: 'SSL Enabled',
description: 'Indicates if SSL should be enabled.',
Expand Down
17 changes: 0 additions & 17 deletions packages/destination-actions/src/destinations/kafka/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export const serializeKafkaConfig = (settings: Settings): string => {
mechanism: settings.mechanism,
username: settings.username,
password: settings.password,
accessKeyId: settings.accessKeyId,
secretAccessKey: settings.secretAccessKey,
authorizationIdentity: settings.authorizationIdentity,
ssl_ca: settings.ssl_ca,
ssl_cert: settings.ssl_cert,
ssl_key: settings.ssl_key,
Expand Down Expand Up @@ -64,13 +61,6 @@ const getKafka = (settings: Settings) => {
password: settings.password,
mechanism: settings.mechanism
} as SASLOptions
case 'aws':
return {
accessKeyId: settings.accessKeyId,
secretAccessKey: settings.secretAccessKey,
authorizationIdentity: settings.authorizationIdentity,
mechanism: settings.mechanism
} as SASLOptions
default:
return undefined
}
Expand Down Expand Up @@ -118,13 +108,6 @@ export const validate = (settings: Settings) => {
400
)
}
if (['aws'].includes(settings.mechanism) && (!settings.accessKeyId || !settings.secretAccessKey)) {
throw new IntegrationError(
'AWS Access Key ID and AWS Secret Key are required for AWS authentication mechanism',
'SASL_AWS_PARAMS_MISSING',
400
)
}
if (['client-cert-auth'].includes(settings.mechanism) && (!settings.ssl_key || !settings.ssl_cert)) {
throw new IntegrationError(
'SSL Client Key and SSL Client Certificate are required for Client Certificate authentication mechanism',
Expand Down
Loading