generated from camel.apache.org/kamelet
106 lines
3.8 KiB
YAML
106 lines
3.8 KiB
YAML
|
|
apiVersion: camel.apache.org/v1
|
||
|
|
kind: Kamelet
|
||
|
|
metadata:
|
||
|
|
name: http-secured-sink
|
||
|
|
annotations:
|
||
|
|
camel.apache.org/kamelet.support.level: "Stable"
|
||
|
|
camel.apache.org/catalog.version: "4.10.2"
|
||
|
|
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MjAiCmhlaWdodD0iNDIwIiBzdHJva2U9IiMwMDAiIGZpbGw9Im5vbmUiPgo8cGF0aCBzdHJva2Utd2lkdGg9IjI2IgpkPSJNMjA5LDE1YTE5NSwxOTUgMCAxLDAgMiwweiIvPgo8cGF0aCBzdHJva2Utd2lkdGg9IjE4IgpkPSJtMjEwLDE1djM5MG0xOTUtMTk1SDE1TTU5LDkwYTI2MCwyNjAgMCAwLDAgMzAyLDAgbTAsMjQwIGEyNjAsMjYwIDAgMCwwLTMwMiwwTTE5NSwyMGEyNTAsMjUwIDAgMCwwIDAsMzgyIG0zMCwwIGEyNTAsMjUwIDAgMCwwIDAtMzgyIi8+Cjwvc3ZnPg=="
|
||
|
|
camel.apache.org/provider: "Apache Software Foundation"
|
||
|
|
camel.apache.org/kamelet.group: "HTTP"
|
||
|
|
camel.apache.org/kamelet.namespace: "HTTP"
|
||
|
|
labels:
|
||
|
|
camel.apache.org/kamelet.type: sink
|
||
|
|
spec:
|
||
|
|
definition:
|
||
|
|
title: Secured HTTP Sink
|
||
|
|
description: Forwards an event to a secured HTTP endpoint. Supports Oauth and Basic authentication.
|
||
|
|
required:
|
||
|
|
- url
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
url:
|
||
|
|
title: URL
|
||
|
|
description: The URL to send data to
|
||
|
|
type: string
|
||
|
|
example: "https://my-service/path"
|
||
|
|
pattern: "^(http|https)://.*"
|
||
|
|
method:
|
||
|
|
title: Method
|
||
|
|
description: The HTTP method to use
|
||
|
|
type: string
|
||
|
|
default: POST
|
||
|
|
enum: ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "TRACE", "PATCH"]
|
||
|
|
authMethod:
|
||
|
|
title: Authentication Method
|
||
|
|
description: Authentication methods allowed to use as a comma separated list of values Basic, Digest or NTLM.
|
||
|
|
type: string
|
||
|
|
authenticationPreemptive:
|
||
|
|
title: Authentication Preemptive
|
||
|
|
description: If this option is true, camel-http sends preemptive basic authentication to the server.
|
||
|
|
type: boolean
|
||
|
|
default: false
|
||
|
|
authUsername:
|
||
|
|
title: Authentication Username
|
||
|
|
description: Authentication username
|
||
|
|
type: string
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
authPassword:
|
||
|
|
title: Authentication Password
|
||
|
|
description: Authentication password
|
||
|
|
type: string
|
||
|
|
format: password
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
oauth2ClientId:
|
||
|
|
title: Oauth2 Client Id
|
||
|
|
description: Oauth2 Client Id
|
||
|
|
type: string
|
||
|
|
format: password
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
oauth2ClientSecret:
|
||
|
|
title: Oauth2 Client Secret
|
||
|
|
description: Oauth2 Client Secret
|
||
|
|
type: string
|
||
|
|
format: password
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
oauth2TokenEndpoint:
|
||
|
|
title: Oauth2 Token Endpoint
|
||
|
|
description: Oauth2 Token Endpoint
|
||
|
|
type: string
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
oauth2Scope:
|
||
|
|
title: Oauth2 Scope
|
||
|
|
description: Oauth2 Scope
|
||
|
|
type: string
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
dependencies:
|
||
|
|
- "camel:http"
|
||
|
|
- "camel:kamelet"
|
||
|
|
- "camel:core"
|
||
|
|
template:
|
||
|
|
from:
|
||
|
|
uri: kamelet:source
|
||
|
|
steps:
|
||
|
|
- removeHeader:
|
||
|
|
name: CamelHttpUri
|
||
|
|
- setHeader:
|
||
|
|
name: CamelHttpMethod
|
||
|
|
constant: "{{method}}"
|
||
|
|
- to:
|
||
|
|
uri: "{{url}}"
|
||
|
|
parameters:
|
||
|
|
authMethod: "{{?authMethod}}"
|
||
|
|
authUsername: "{{?authUsername}}"
|
||
|
|
authPassword: "{{?authPassword}}"
|
||
|
|
oauth2ClientId: "{{?oauth2ClientId}}"
|
||
|
|
oauth2ClientSecret: "{{?oauth2ClientSecret}}"
|
||
|
|
oauth2Scope: "{{?oauth2Scope}}"
|
||
|
|
oauth2TokenEndpoint: "{{?oauth2TokenEndpoint}}"
|
||
|
|
authenticationPreemptive: "{{authenticationPreemptive}}"
|