-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Microsoft Exchange IMAP OAUTH source kamelet
- Loading branch information
1 parent
0b6e7e6
commit 3ddc5c9
Showing
1 changed file
with
104 additions
and
0 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
kamelets/ms-exchange-online-imap-oauth-source.kamelet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# --------------------------------------------------------------------------- | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# --------------------------------------------------------------------------- | ||
apiVersion: camel.apache.org/v1alpha1 | ||
kind: Kamelet | ||
metadata: | ||
name: name:ms-exchange-online-imap-oauth-source | ||
annotations: | ||
camel.apache.org/kamelet.support.level: "Stable" | ||
camel.apache.org/catalog.version: "main-SNAPSHOT" | ||
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjQgOCA1NSA0OCI+PHRpdGxlPkV4Y2hhbmdlXzY0eDwvdGl0bGU+PHBhdGggZD0iTTU1LjUwOTc3LDhoLTEyLjIwN0EzLjQ4ODM1LDMuNDg4MzUsMCwwLDAs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kEyLjMyNiwyLjMyNiwwLDAsMSwzMywyMC4zMzAwOFoiIG9wYWNpdHk9IjAuMiIvPjxwYXRoIGQ9Ik0zNCwyMC4zMzAwOFY0NC42Njk5MkEzLjM2MTcxLDMuMzYxNzEsMCwwLDEsMzAuNjY5OTIsNDhIMTFWMTdIMzAuNjY5OTJBMy4zNDE3NywzLjM0MTc3LDAsMCwxLDM0LDIwLjMzMDA4WiIgb3BhY2l0eT0iMC4xIi8+PHBhdGggZD0iTTMzLDIwLjMzMDA4VjQ0LjY2OTkyQTIuMzI2LDIuMzI2LDAsMCwxLDMwLjY2OTkyLDQ3SDExVjE4SDMwLjY2OTkyQTIuMzI2LDIuMzI2LDAsMCwxLDMzLDIwLjMzMDA4WiIgb3BhY2l0eT0iMC4yIi8+PHBhdGggZD0iTTMyLDIwLjMzMDA4VjQ0LjY2OTkyQTIuMzI2LDIuMzI2LDAsMCwxLDI5LjY2OTkyLDQ3SDExVjE4SDI5LjY2OTkyQTIuMzI2LDIuMzI2LDAsMCwxLDMyLDIwLjMzMDA4WiIgb3BhY2l0eT0iMC4xIi8+PHJlY3QgeD0iNC4wMDAyMiIgeT0iMTgiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgcng9IjIuMzMzMzMiIGZpbGw9IiMwMDc4ZDQiLz48cGF0aCBkPSJNMjIuNTg1MzMsMjYuODgxMjFoLTYuNTQ3MlYzMC43MDk4aDYuMTQ1MzV2Mi40NTM3NUgxNi4wMzgxM1YzNy4xNDAxaDYuODk2MDl2Mi40NDM0aC05Ljg2OFYyNC40MTY1aDkuNTE5MVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=" | ||
camel.apache.org/provider: "Apache Software Foundation" | ||
camel.apache.org/kamelet.group: "Mail" | ||
labels: | ||
camel.apache.org/kamelet.type: "source" | ||
spec: | ||
definition: | ||
title: "Microsoft Exchange IMAP OAuth2 Source" | ||
description: |- | ||
Receive unread emails from an IMAP Microsoft Exchange mail server, marking them as read once they are received. | ||
It uses OAuth2 to authenticate IMAP session. | ||
required: | ||
- tenantId | ||
- clientId | ||
- clientSecret | ||
- username | ||
type: object | ||
properties: | ||
connectionHost: | ||
title: Connection Host | ||
description: The IMAP server host | ||
type: string | ||
default: outlook.office365.com | ||
connectionPort: | ||
title: Connection Port | ||
description: The IMAP server port | ||
type: string | ||
default: 993 | ||
tenantId: | ||
title: Tenant ID | ||
description: Azure Active Directory Tenant ID | ||
type: string | ||
clientId: | ||
title: Client ID | ||
description: Azure Active Directory Application Client ID | ||
type: string | ||
x-descriptors: | ||
- urn:camel:group:credentials | ||
clientSecret: | ||
title: Client Secret | ||
description: The Azure Active Directory Application Client Secret | ||
type: string | ||
format: password | ||
x-descriptors: | ||
- urn:alm:descriptor:com.tectonic.ui:password | ||
- urn:camel:group:credentials | ||
username: | ||
title: Username | ||
description: The username to access the mail box | ||
type: string | ||
example: arthur@mycompany.com | ||
x-descriptors: | ||
- urn:camel:group:credentials | ||
fetchSize: | ||
title: Fetch Size | ||
description: The number of messages fetched for each poll (-1 for no limits) | ||
type: integer | ||
default: 10 | ||
delay: | ||
title: Delay | ||
description: The delay between fetches in milliseconds | ||
type: integer | ||
default: 60000 | ||
dependencies: | ||
- "camel:core" | ||
- "camel:kamelet" | ||
- "camel:mail-microsoft-oauth" | ||
template: | ||
beans: | ||
- name: exchangeAuthenticator | ||
type: "#class:org.apache.camel.component.mail.microsoft.authenticator.MicrosoftExchangeOnlineOAuth2MailAuthenticator({{tenantId}}, {{clientId}}, {{clientSecret}}, {{username}})" | ||
from: | ||
uri: "imaps:{{connectionHost}}:{{connectionPort}}" | ||
parameters: | ||
mail.imaps.auth.mechanisms: "XOAUTH2" | ||
username: "{{username}}" | ||
fetchSize: "{{fetchSize}}" | ||
delay: "{{delay}}" | ||
authenticator: "#bean:{{exchangeAuthenticator}}" | ||
steps: | ||
- to: "kamelet:sink" |