0

Following this documentation, I have protected the Software Catalogue endpoint with a Middleware, so you have to login via OKTA in order to see the Software Catalogue.

However, that broke the Search plugin, which is running on the Backend, trying to create indexes for the Software Catalogue periodically. It is getting 401 responses, I assume, because it doesn't have the correct auth token provided to the request.

But I don't understand why that is the case, as this PR from 2021 was supposed fix this issue by introducing the Identity Provider for the Backstage Search plugin.

The error I get at the backend is:

level: "warn"
message: "Index for software-catalog was not created: an error was encountered"
plugin: "search"
service: "backstage"

stack: "ResponseError: Request failed with 401 Error
    at Function.fromResponse (/app/node_modules/@backstage/errors/dist/index.cjs.js:160:12)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async CatalogClient.requestRequired (/app/node_modules/@backstage/catalog-client/dist/index.cjs.js:350:13)
    at async CatalogClient.getEntities (/app/node_modules/@backstage/catalog-client/dist/index.cjs.js:87:22)
    at async DefaultCatalogCollatorFactory.execute (/app/node_modules/@backstage/plugin-catalog-backend/dist/index.cjs.js:884:25)
    at async next (node:internal/streams/from:85:11)"
task: "search_index_software_catalog"
type: "taskManager"
Mr.Fireman
  • 514
  • 1
  • 5
  • 16

0 Answers0