Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket seach without disabling xpack security

esk February 22, 2019

Hi 

We use elastic's xpack security to lock down our elastic and kibana instances. 

Bitbucket DC uses elastic search for its code search feature. However, setting up bitbucket to use elastic search requires that we turn off xpack security

https://confluence.atlassian.com/bitbucketserver/install-and-configure-a-remote-elasticsearch-instance-815577748.html ]

xpack.security.enabled: false

My question is how do i get code search to work with xpack security enabled? 

I should mention that turning off xpack security is the only way to get code search to work ATM. Bitbucket search fails if it's turned on.

Thank you for your help!

1 answer

0 votes
Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2019

Hi Elton,

Step 3 on https://confluence.atlassian.com/bitbucketserver/install-and-configure-a-remote-elasticsearch-instance-815577748.html outlines how to do authenticated requests from BB using buckler.

 

CCM

esk February 22, 2019

Thank you for responding Craig. The problem is (and I'm sure other folks with a similar setup will run into ), Our elastic stack relies on the xpack plugin for everything (kibana, apm-server, logstash and so many more). if we disable xpack security and enable buckler, all other elastic stack apps fail to start or do not work as expected.

Would be nice to have bitbucket work with the xpack security.  

Edit:  Trying to enable xpack security and buckler causes the following error.

Caused by: java.lang.IllegalArgumentException: Cannot have more than one plugin implementing a REST wrapper
at org.elasticsearch.action.ActionModule.<init>(ActionModule.java:382) ~[elasticsearch-6.5.3.jar:6.5.3]

Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2019

While I haven’t tried this for this specific combination, I would expect the following to work.If you leave xpack enabled - add a user with the required permissions that BB will need, give it a password and then put those details in to Bitbucket authentication configuration. 

 

CCM

esk February 22, 2019

Bitbucket search always fails when 

xpack.security.enabled: true

 ERROR [http-nio-8082-exec-115] "POST /rest/search/latest/search HTTP/1.0"
c.a.b.i.s.search.rest.SearchResource Unexpected response code from Elasticsearch: 403

Ravi GH July 18, 2019

Did you found solution for this problem?

steven qent July 29, 2019

No solution. The only way forward is to disable search till bitbucket supports ES 7

Ramprasad Baliga December 24, 2019

Hi Elton/All,

I understand BB Data centre search functionality does not work when xpack security is enabled in remote elastic search node. However can someone please tell me if you were atleast able to make a connection to elastic search from your BB cluster with the xpack security enabled?

Thanks

Ram

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events