backstage/community-plugins

๐Ÿš€ Confluence: Add ability to restrict indexing by CQL

tamimkh opened this issue ยท 1 comments

Plugin Name

confluence

๐Ÿ”– Feature description

Currently, the confluence collator plugin can only limit the indexing of documents by coarse "spaces". It would ideal if indexing could be restricted in a more fine grained fashion by using CQL

๐ŸŽค Context

Depending on how confluence is setup at an organization, a space may contain documents are not appropriate to store in backstage (ex: on call logs for a team, abandoned project proposals etc). Right now, these would be indexed by the confluence collator and require users of this plugin to create custom collators/decorators to filter these out from the search results.

However, the confluence API already features a rich search language called CQL that can be used to find only the documents a person is interested in. If we are able to expose CQL to users via a config option on the confluence plugin, we can enable users of this plugin to more finely control the documents that appear in backstage via only config changes.

โœŒ๏ธ Possible Implementation

We should be able to implement this change in a backwards compatible way (ie: retain the spaces config and previous docs) by using the confluence search API instead of the content API the plugin is currently using. Since both of these endpoints return confluence documents identically, we would just need to change the API call and construct CQL that combines both the spaces config option as well as the newly added CQL query option.

A colleague of mine made a PR for previous version of this plugin and we are currently using it in our legacy installation of backstage without any issues

๐Ÿ‘€ Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Great freature @tamimkh,
This would be a great addition to secure the index.
Can't wait to see the PR !