How can an app obtain access to the elasticsearch/opensearch credentials password?
In BB9 the Elasticsearch password is set to {ATL_SECURED}
in the DB.
bitbucket=> select namespace,key_name,key_value from plugin_setting where key_name like '%elasticsearch%';
namespace | key_name | key_value
-------------------------------------------------------+------------------------+-------------------------
com.atlassian.bitbucket.search.bitbucket-search-query | elasticsearch.baseurl | http://opensearch:9200/
com.atlassian.bitbucket.search.bitbucket-search-query | elasticsearch.password | {ATL_SECURED}
com.atlassian.bitbucket.search.bitbucket-search-query | elasticsearch.username | admin
It used to be possible to gain access to the actual credentials via
elasticPluginSettings.get("elasticsearch.username")
elasticPluginSettings.get("elasticsearch.password")
I understand that this option has been chosen for security reasons, however our app needs to access the ES service in order to maintain an index private to the app.
Any insights welcome.
Best, Ulrich