Conversation
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
… and tests Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
|
|
||
| // Use saved config as base, with user overrides on top | ||
| const configValues = configOverrides ?? integration?.spec?.configuration ?? {}; | ||
| const setConfigValues = (newValues: Record<string, unknown>) => setConfigOverrides(newValues); |
There was a problem hiding this comment.
@alabro-bm can you give me a context, why do we need these changes?
There was a problem hiding this comment.
yes sure, when we have dropdown select type for the integration (token vs oauth) the form is not preselected. Meaning the user will open the form without data being filled in.
In this scenario we have Token authentication and OAuth 2.0 as well, when navigating to the form the dropdown is the only field present. With this approach there is no race condition and the form is preselected and filled properly with the data relevant for the integration.
|
@alabro-bm lets add connection instructions to the app, like we do for Discord for example:
Helps a lot while setting it up. |
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
|
@shiroyasha added the instructions |
| if signature == "" { | ||
| // OAuth dynamic webhooks do not send a signature header. | ||
| return http.StatusOK, nil | ||
| } |
There was a problem hiding this comment.
Webhook authenticity check is effectively bypassed
High Severity
verifyJiraSignature returns success when X-Hub-Signature is absent, so OnIssueCreated.HandleWebhook accepts unsigned payloads and can emit jira.issueCreated events. This removes request authenticity validation for a public webhook endpoint and allows forged webhook deliveries if the URL is exposed.
Additional Locations (1)
There was a problem hiding this comment.
This is intentional
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| fmt.Sprintf("multiple Jira Cloud sites found: %v -- restrict the OAuth app to a single site", names), | ||
| http.StatusBadRequest, | ||
| ) | ||
| return |
There was a problem hiding this comment.
OAuth setup rejects multi-site Jira accounts
Medium Severity
handleOAuthCallback hard-fails when getAccessibleResources returns more than one site, so integrations cannot be connected for users authorized on multiple Jira Cloud sites. Atlassian can return multiple resources for one token, and this branch blocks setup entirely instead of selecting or storing one usable cloudId.
There was a problem hiding this comment.
It's a trade-off: previously it would silently bind to an arbitrary
site (the original bug), now it fails explicitly. If you want to
support multi-site users in the future, that would be a separate
feature (e.g. a site selector in the UI). For now the explicit error
with site names listed is the safer behavior
|
The code is ok-ish, but when I reviewed it with fresh eyes, I really hate the UX flow. @AleksandarCole @ropsii have scheduled a session to solve it on monday. |



Superplane 2890
Added 3 more components for Jira:
The idea was to create only the on issue created, but due to the debugging issues with the webhook since I already had the api implementation for list webhooks and delete webhooks I decided just add components for it.
Notes
Authentication
Jira supports two authentication methods: API Token and OAuth 2.0.
API Token
OAuth 2.0
Create the app
Go to https://developer.atlassian.com/console/myapps/
Click Create > OAuth 2.0 integration
Name your app and agree to the terms
Set permissions
Go to Permissions and add these scopes under Jira API:
By default the app is private, meaning only the app creator can authorize it. To allow other users in your Atlassian
organization to connect:
Go to the Distribution tab
Click Edit and set distribution status to Sharing
Fill in the required fields (app description, privacy policy URL, etc.)
You do not need to submit for Marketplace listing, sharing is sufficient
Get your credentials
Go to Settings to find the Client ID and create a Secret.
Create the integration in SuperPlane
Create a Jira integration and select OAuth 2.0 as auth type
Enter the Client ID and Client Secret
Copy the integration ID from the URL or integration details
Set the callback URL
Go back to the Atlassian app, Authorization > OAuth 2.0 (3LO), and add:
https://SUPERPLANE_URL_GOES_HERE(OR_NGROK)/api/v1/integrations/INTEGRATION_ID_GOES_HERE/callback
Connect
Go back to SuperPlane and click connect
You'll be redirected to Atlassian for authorization
After authorizing, select the Jira Cloud site to use