All Apps and Add-ons

How to link Splunk and bitbucket add-on?

hyeji
Loves-to-Learn Lots

Hi. Please tell me how to link Splunk and bitbucket add-on

https://splunkbase.splunk.com/app/4592 
I added the app, and I want to know how to set it up.

Labels (1)
0 Karma

Gr0und_Z3r0
Contributor

Hi @hyeji 

In the app page on Splunkbase, check the details tab. It lists down the steps to install and configure the add-on. It will be using an OAuth API token to connect to your Atlassian Bitbucket account.

 

Setup

The security method used for this is the 3-LO  method available with the BitBucket API. The API requires navigating the repositories against a user account, therefore it would be advised (although not necessary) to setup a separate splunk user in BitBucket as a first step. Instructions for setting up the integration are as follows:

1.  Navigate to your account settings > OAuth

2.  Select the option to Add consumer

3.  Fill in your desired fields, please ensure to enter a value for Callback URL. This can be your own website, https://www.splunk.com, https://example.com. The only requirement is the address is a https address.

4.  The following permissions are required

a.  Repositories – Read

b.  Pull Requests – Read

5.  Save your new consumer. You should be supplied with a key and secret. N.B you may need to navigate to the OAuth setting screen again and expand the row containing your newly created consumer

6.  Open a new browser and navigate to https://bitbucket.org/site/oauth2/authorize?client_id=YOUR_CONSUMER_KEY&response_type=code

7.  You may be asked to authorise access before completing your redirection to your callback url. 

8.  Once you have navigated to your callback url, your auth code will be available in your browser within your url address (e.g. setting the callback url to https://www.splunk.com will produce the following url when it’s called: https://www.splunk.com/?code=YOUR_CODE_HERE. Make a note of this code as you will need it shortly!

9.  Open Splunk and go to the bitbucket add-on

10. Open the configuration tab and enter your bitbucket api address in the Base URL input. If it is already correct, ensure this is confirmed by pressing save. It would also be advisable to set the logging level to DEBUG for the initial setup to confirm that everything is running as expected. This can be changed at anypoint.

11. Go to the inputs tab > Create New Input and fill in all fields.

12. The add-on should now be running as expected.

 


Note: I would strongly recommend creating and using a service account in bitbucket to setup this integration with the bare minimum permissions. Also, this add-on hasn't been updated since 2019, it would be wise to do your due diligence to check for any security vulnerabilities.

~ If the reply helps, a karma upvote would be appreciated.

0 Karma

hyeji
Loves-to-Learn Lots

 

Adding that app will return related issues.

 

hyeji_0-1680585205986.png

 

Unable to initialize modular input \"bitbucket_repositories\" defined in the app \"TA-bitbucket\": Introspecting scheme=bitbucket_repositories: script running failed (PID 9923 exited with code 1)..

0 Karma

ccoqueiro
Splunk Employee
Splunk Employee

Hello @hyeji , have you been able to evolve this issue?
I'm also having the same problem, obviously, I'm trying to run this add-on on version 9.2 of Splunk, I applied python future to the code and managed to overcome several compatibility issues between python 2 and 3, but I still couldn't run the add-on. If you have any status of this you will be very welcome.

 

 

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...