Skip to content

Commit

Permalink
Support personal authentication to jira
Browse files Browse the repository at this point in the history
- Fix apache#1529
- In case the maven plugin fails to a unknown parameter, list all
  available endpoint parameters
  • Loading branch information
claudio4j committed Jul 7, 2023
1 parent 09cdea7 commit 035cd06
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 54 deletions.
17 changes: 12 additions & 5 deletions kamelets/jira-add-comment-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ spec:
The comment is set in the body of the message.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -58,12 +58,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand All @@ -88,5 +94,6 @@ spec:
uri: "jira:AddComment"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
17 changes: 12 additions & 5 deletions kamelets/jira-add-issue-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ spec:
The issue description can be set from the body of the message or the `issueDescription`/`ce-issueDescription` in the header, however the body takes precedence.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -70,12 +70,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand Down Expand Up @@ -142,5 +148,6 @@ spec:
uri: "jira:AddIssue"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
18 changes: 13 additions & 5 deletions kamelets/jira-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ spec:
title: "Jira Source"
description: |-
Receive notifications about new issues from Jira.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -51,12 +52,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira.
description: The password to access Jira.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
jql:
title: JQL
description: A query to filter issues.
Expand All @@ -76,8 +83,9 @@ spec:
uri: "jira:newIssues"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
accessToken: "{{?personal-token}}"
jql: "{{jql}}"
steps:
- marshal:
Expand Down
17 changes: 12 additions & 5 deletions kamelets/jira-transition-issue-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ spec:
The comment of the transition is set in the body of the message.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -60,12 +60,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand Down Expand Up @@ -97,5 +103,6 @@ spec:
uri: "jira:transitionIssue"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
17 changes: 12 additions & 5 deletions kamelets/jira-update-issue-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ spec:
The issue description can be set from the body of the message or the `issueDescription`/`ce-issueDescription` in the header, however the body takes precedence.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -70,12 +70,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand Down Expand Up @@ -142,5 +148,6 @@ spec:
uri: "jira:UpdateIssue"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ spec:
The comment is set in the body of the message.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -58,12 +58,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand All @@ -88,5 +94,6 @@ spec:
uri: "jira:AddComment"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ spec:
The issue description can be set from the body of the message or the `issueDescription`/`ce-issueDescription` in the header, however the body takes precedence.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -70,12 +70,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand Down Expand Up @@ -142,5 +148,6 @@ spec:
uri: "jira:AddIssue"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ spec:
title: "Jira Source"
description: |-
Receive notifications about new issues from Jira.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -51,12 +52,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira.
description: The password to access Jira.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
jql:
title: JQL
description: A query to filter issues.
Expand All @@ -76,8 +83,9 @@ spec:
uri: "jira:newIssues"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
accessToken: "{{?personal-token}}"
jql: "{{jql}}"
steps:
- marshal:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ spec:
The comment of the transition is set in the body of the message.
To authenticate a username/password or personal token must be defined. We recommend to use personal token as it is a safer way to get access to Jira.
required:
- jiraUrl
- username
- password
type: object
properties:
jiraUrl:
Expand All @@ -60,12 +60,18 @@ spec:
- urn:camel:group:credentials
password:
title: Password
description: The password or the API Token to access Jira
description: The password to access Jira
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
personal-token:
title: Personal Token
description: Personal Token
type: string
x-descriptors:
- urn:camel:group:credentials
types:
in:
mediaType: application/json
Expand Down Expand Up @@ -97,5 +103,6 @@ spec:
uri: "jira:transitionIssue"
parameters:
jiraUrl: "{{jiraUrl}}"
username: "{{username}}"
password: "{{password}}"
username: "{{?username}}"
password: "{{?password}}"
access-token: "{{?personal-token}}"
Loading

0 comments on commit 035cd06

Please sign in to comment.