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

[Fleet][Kafka Output] Tweaks for Kafka UI/API #162875

Merged
merged 41 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
375a009
Remove Kerberos option, mask password
szwarckonrad Aug 1, 2023
a161d19
align cypress
szwarckonrad Aug 1, 2023
cede695
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 1, 2023
2b56d8d
align cypress
szwarckonrad Aug 2, 2023
50cafe4
jest tests aligned
szwarckonrad Aug 2, 2023
0d0ffc5
mappings
szwarckonrad Aug 2, 2023
c0625bd
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Aug 2, 2023
47a9416
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 3, 2023
7248f32
partition
szwarckonrad Aug 3, 2023
20df38a
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 3, 2023
4fce3b3
topics
szwarckonrad Aug 3, 2023
d866966
Revert "topics"
szwarckonrad Aug 3, 2023
a47ca08
Revert "partition"
szwarckonrad Aug 3, 2023
c8e1915
topics, partition yaml transfers
szwarckonrad Aug 3, 2023
86c51cd
Merge branch 'main' into kafka-tweaks
kibanamachine Aug 3, 2023
13c0a61
nested when property on topic
szwarckonrad Aug 4, 2023
c68b35c
validation for client_id
szwarckonrad Aug 4, 2023
ef04196
validation for client_id cypress
szwarckonrad Aug 4, 2023
92618f0
removed channel_buffer_size
szwarckonrad Aug 4, 2023
783bef6
hostname:port hosts for kafka
szwarckonrad Aug 4, 2023
846f88f
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 4, 2023
b672e20
default messages
szwarckonrad Aug 4, 2023
5dbeccd
topic condition
szwarckonrad Aug 4, 2023
f944f83
ca moved outside of authentication panel
szwarckonrad Aug 4, 2023
47f780f
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 4, 2023
e16b9bd
aligned jest tests
szwarckonrad Aug 4, 2023
ece697b
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 7, 2023
90ea5b4
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 7, 2023
33e4f06
verification_mode field
szwarckonrad Aug 7, 2023
2908234
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 7, 2023
ef21a4a
verification_mode field tweaks, no empty headers
szwarckonrad Aug 7, 2023
2e0ed51
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 8, 2023
aca6130
connection_type UI field
szwarckonrad Aug 8, 2023
0bf9fcb
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Aug 8, 2023
adc8a69
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 9, 2023
88ec5e7
encrypted password SO field
szwarckonrad Aug 9, 2023
47806a4
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 9, 2023
1e5cb09
so mappings and unit test
szwarckonrad Aug 9, 2023
b79ac72
so mappings reverted
szwarckonrad Aug 9, 2023
4128117
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 9, 2023
022ac86
Merge branch 'main' into kafka-tweaks
szwarckonrad Aug 9, 2023
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
31 changes: 20 additions & 11 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -629,17 +629,6 @@
}
}
},
"search": {
"dynamic": false,
"properties": {
"title": {
"type": "text"
},
"description": {
"type": "text"
}
}
},
"alert": {
"dynamic": false,
"properties": {
Expand Down Expand Up @@ -931,6 +920,17 @@
}
}
},
"search": {
"dynamic": false,
"properties": {
"title": {
"type": "text"
},
"description": {
"type": "text"
}
}
},
"visualization": {
"dynamic": false,
"properties": {
Expand Down Expand Up @@ -1657,6 +1657,9 @@
"auth_type": {
"type": "keyword"
},
"connection_type": {
"type": "keyword"
},
"username": {
"type": "keyword"
},
Expand Down Expand Up @@ -1743,6 +1746,12 @@
},
"broker_buffer_size": {
"type": "integer"
},
"required_acks": {
"type": "integer"
},
"channel_buffer_size": {
"type": "integer"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"infrastructure-ui-source": "113182d6895764378dfe7fa9fa027244f3a457c4",
"ingest-agent-policies": "f11cc19275f4c3e4ee7c5cd6423b6706b21b989d",
"ingest-download-sources": "d7edc5e588d9afa61c4b831604582891c54ef1c7",
"ingest-outputs": "bffa0fd93dfdde904d7f5aff77df72d1c35938d9",
"ingest-outputs": "b4e636b13a5d0f89f0400fb67811d4cca4736eb0",
"ingest-package-policies": "55816507db0134b8efbe0509e311a91ce7e1c6cc",
"ingest_manager_settings": "418311b03c8eda53f5d2ea6f54c1356afaa65511",
"inventory-view": "b8683c8e352a286b4aca1ab21003115a4800af83",
Expand Down
25 changes: 16 additions & 9 deletions x-pack/plugins/fleet/common/constants/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ export const kafkaAuthType = {
Userpass: 'user_pass',
Ssl: 'ssl',
Kerberos: 'kerberos',
None: 'none',
} as const;

export const kafkaConnectionType = {
Plaintext: 'plaintext',
Encryption: 'encryption',
} as const;

export const kafkaSaslMechanism = {
Expand All @@ -60,18 +66,19 @@ export const kafkaTopicWhenType = {
Equals: 'equals',
Contains: 'contains',
Regexp: 'regexp',
Range: 'range',
Network: 'network',
HasFields: 'has_fields',
Or: 'or',
And: 'and',
Not: 'not',
} as const;

export const kafkaAcknowledgeReliabilityLevel = {
Commit: 'Wait for local commit',
Replica: 'Wait for all replicas to commit',
DoNotWait: 'Do not wait',
Commit: 1,
Replica: -1,
DoNotWait: 0,
} as const;

export const kafkaVerificationModes = {
Full: 'full',
None: 'none',
Strict: 'strict',
Certificate: 'certificate',
} as const;

export const kafkaSupportedVersions = [
Expand Down
42 changes: 34 additions & 8 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -7701,6 +7701,15 @@
},
"key": {
"type": "string"
},
"verification_mode": {
"type": "string",
"enum": [
"none",
"full",
"certificate",
"strict"
]
}
}
},
Expand Down Expand Up @@ -7751,6 +7760,13 @@
"auth_type": {
"type": "string"
},
"connection_type": {
"type": "string",
"enum": [
"plaintext",
"encryption"
]
},
"username": {
"type": "string"
},
Expand Down Expand Up @@ -7826,11 +7842,8 @@
"broker_timeout": {
"type": "number"
},
"broker_buffer_size": {
"required_acks": {
"type": "number"
},
"broker_ack_reliability": {
"type": "string"
}
},
"required": [
Expand Down Expand Up @@ -8103,6 +8116,15 @@
},
"key": {
"type": "string"
},
"verification_mode": {
"type": "string",
"enum": [
"none",
"full",
"certificate",
"strict"
]
}
}
},
Expand Down Expand Up @@ -8153,6 +8175,13 @@
"auth_type": {
"type": "string"
},
"connection_type": {
"type": "string",
"enum": [
"plaintext",
"encryption"
]
},
"username": {
"type": "string"
},
Expand Down Expand Up @@ -8228,10 +8257,7 @@
"broker_timeout": {
"type": "number"
},
"broker_ack_reliability": {
"type": "string"
},
"broker_buffer_size": {
"required_acks": {
"type": "number"
}
},
Expand Down
32 changes: 26 additions & 6 deletions x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4959,6 +4959,13 @@ components:
type: string
key:
type: string
verification_mode:
type: string
enum:
- none
- full
- certificate
- strict
proxy_id:
type: string
shipper:
Expand Down Expand Up @@ -4990,6 +4997,11 @@ components:
type: string
auth_type:
type: string
connection_type:
type: string
enum:
- plaintext
- encryption
username:
type: string
password:
Expand Down Expand Up @@ -5038,10 +5050,8 @@ components:
type: number
broker_timeout:
type: number
broker_buffer_size:
required_acks:
type: number
broker_ack_reliability:
type: string
required:
- name
- type
Expand Down Expand Up @@ -5223,6 +5233,13 @@ components:
type: string
key:
type: string
verification_mode:
type: string
enum:
- none
- full
- certificate
- strict
proxy_id:
type: string
shipper:
Expand Down Expand Up @@ -5254,6 +5271,11 @@ components:
type: string
auth_type:
type: string
connection_type:
type: string
enum:
- plaintext
- encryption
username:
type: string
password:
Expand Down Expand Up @@ -5302,9 +5324,7 @@ components:
type: number
broker_timeout:
type: number
broker_ack_reliability:
type: string
broker_buffer_size:
required_acks:
type: number
required:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ properties:
type: string
key:
type: string
verification_mode:
type: string
enum: ['none', 'full', 'certificate', 'strict']
proxy_id:
type: string
shipper:
Expand Down Expand Up @@ -66,6 +69,9 @@ properties:
type: string
auth_type:
type: string
connection_type:
type: string
enum: ['plaintext', 'encryption']
username:
type: string
password:
Expand Down Expand Up @@ -114,10 +120,8 @@ properties:
type: number
broker_timeout:
type: number
broker_buffer_size:
required_acks:
type: number
broker_ack_reliability:
type: string
required:
- name
- type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ properties:
type: string
key:
type: string
verification_mode:
type: string
enum: ['none', 'full', 'certificate', 'strict']
proxy_id:
type: string
shipper:
Expand Down Expand Up @@ -66,6 +69,9 @@ properties:
type: string
auth_type:
type: string
connection_type:
type: string
enum: ['plaintext', 'encryption']
username:
type: string
password:
Expand Down Expand Up @@ -114,9 +120,7 @@ properties:
type: number
broker_timeout:
type: number
broker_ack_reliability:
type: string
broker_buffer_size:
required_acks:
type: number
required:
- name
9 changes: 7 additions & 2 deletions x-pack/plugins/fleet/common/types/models/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ import type { kafkaAuthType, kafkaCompressionType, kafkaSaslMechanism } from '..
import type { kafkaPartitionType } from '../../constants';
import type { kafkaTopicWhenType } from '../../constants';
import type { kafkaAcknowledgeReliabilityLevel } from '../../constants';
import type { kafkaVerificationModes } from '../../constants';
import type { kafkaConnectionType } from '../../constants';

export type OutputType = typeof outputType;
export type KafkaCompressionType = typeof kafkaCompressionType;
export type KafkaAuthType = typeof kafkaAuthType;
export type KafkaConnectionTypeType = typeof kafkaConnectionType;
export type KafkaSaslMechanism = typeof kafkaSaslMechanism;
export type KafkaPartitionType = typeof kafkaPartitionType;
export type KafkaTopicWhenType = typeof kafkaTopicWhenType;
export type KafkaAcknowledgeReliabilityLevel = typeof kafkaAcknowledgeReliabilityLevel;
export type KafkaVerificationMode = typeof kafkaVerificationModes;

interface NewBaseOutput {
is_default: boolean;
Expand All @@ -34,6 +38,7 @@ interface NewBaseOutput {
certificate_authorities?: string[];
certificate?: string;
key?: string;
verification_mode?: ValueOf<KafkaVerificationMode>;
} | null;
proxy_id?: string | null;
shipper?: ShipperOutput | null;
Expand Down Expand Up @@ -76,6 +81,7 @@ export interface KafkaOutput extends NewBaseOutput {
compression?: ValueOf<KafkaCompressionType>;
compression_level?: number;
auth_type?: ValueOf<KafkaAuthType>;
connection_type?: ValueOf<KafkaConnectionTypeType>;
username?: string;
password?: string;
sasl?: {
Expand Down Expand Up @@ -105,6 +111,5 @@ export interface KafkaOutput extends NewBaseOutput {
}>;
timeout?: number;
broker_timeout?: number;
broker_ack_reliability?: ValueOf<KafkaAcknowledgeReliabilityLevel>;
broker_buffer_size?: number;
required_acks?: ValueOf<KafkaAcknowledgeReliabilityLevel>;
}
Loading