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

Chore: add authorization to the MQTT Kamelet #547

Merged
merged 2 commits into from
Oct 20, 2021
Merged
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
2 changes: 2 additions & 0 deletions docs/modules/ROOT/pages/mqtt-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The following table summarizes the configuration options available for the `mqtt
| Property| Name| Description| Type| Default| Example
| *brokerUrl {empty}* *| Broker URL| The URL of the broker where to establish the connection| string| | `"tcp://mosquitto:1883"`
| *topic {empty}* *| Topic| The topic to send messages to| string| | `"mytopic"`
| password| Password| Password to use when connecting to the MQTT broker| string| |
| username| Username| Username to use when connecting to the MQTT broker| string| |
|===

NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/ROOT/pages/mqtt-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The following table summarizes the configuration options available for the `mqtt
| *brokerUrl {empty}* *| Broker URL| The URL of the broker where to establish the connection| string| | `"tcp://mosquitto:1883"`
| *topic {empty}* *| Topic| The topic to subscribe to| string| | `"mytopic"`
| clientId| Client ID| The client ID to use when connecting to the resource| string| `"mqtt-source"`|
| password| Password| Password to use when connecting to the MQTT broker| string| |
| username| Username| Username to use when connecting to the MQTT broker| string| |
|===

NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ spec:
description: The URL of the broker where to establish the connection
type: string
example: "tcp://mosquitto:1883"
username:
title: Username
description: Username to use when connecting to the MQTT broker
type: string
password:
title: Password
description: Password to use when connecting to the MQTT broker
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
dependencies:
- "camel:paho"
- "camel:kamelet"
Expand All @@ -41,3 +52,5 @@ spec:
uri: paho:{{topic}}
parameters:
brokerUrl: "{{brokerUrl}}"
userName: "{{?username}}"
password: "{{?password}}"
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ spec:
description: The client ID to use when connecting to the resource
type: string
default: "mqtt-source"
username:
title: Username
description: Username to use when connecting to the MQTT broker
type: string
password:
title: Password
description: Password to use when connecting to the MQTT broker
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
dependencies:
- "camel:paho"
- "camel:kamelet"
Expand All @@ -44,5 +55,7 @@ spec:
parameters:
brokerUrl: "{{brokerUrl}}"
clientId: "{{clientId}}"
userName: "{{?username}}"
password: "{{?password}}"
steps:
- to: kamelet:sink
13 changes: 13 additions & 0 deletions mqtt-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ spec:
description: The URL of the broker where to establish the connection
type: string
example: "tcp://mosquitto:1883"
username:
title: Username
description: Username to use when connecting to the MQTT broker
type: string
password:
title: Password
description: Password to use when connecting to the MQTT broker
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
dependencies:
- "camel:paho"
- "camel:kamelet"
Expand All @@ -41,3 +52,5 @@ spec:
uri: paho:{{topic}}
parameters:
brokerUrl: "{{brokerUrl}}"
userName: "{{?username}}"
password: "{{?password}}"
13 changes: 13 additions & 0 deletions mqtt-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ spec:
description: The client ID to use when connecting to the resource
type: string
default: "mqtt-source"
username:
title: Username
description: Username to use when connecting to the MQTT broker
type: string
password:
title: Password
description: Password to use when connecting to the MQTT broker
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
dependencies:
- "camel:paho"
- "camel:kamelet"
Expand All @@ -44,5 +55,7 @@ spec:
parameters:
brokerUrl: "{{brokerUrl}}"
clientId: "{{clientId}}"
userName: "{{?username}}"
password: "{{?password}}"
steps:
- to: kamelet:sink