diff --git a/.changeset/four-schools-shake.md b/.changeset/four-schools-shake.md new file mode 100644 index 0000000000..9fd81b5888 --- /dev/null +++ b/.changeset/four-schools-shake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Pass in auth token to ancestry endpoint diff --git a/plugins/catalog-backend/src/service/createRouter.ts b/plugins/catalog-backend/src/service/createRouter.ts index 56121f4155..df289d579b 100644 --- a/plugins/catalog-backend/src/service/createRouter.ts +++ b/plugins/catalog-backend/src/service/createRouter.ts @@ -158,7 +158,9 @@ export async function createRouter( async (req, res) => { const { kind, namespace, name } = req.params; const entityRef = stringifyEntityRef({ kind, namespace, name }); - const response = await entitiesCatalog.entityAncestry(entityRef); + const response = await entitiesCatalog.entityAncestry(entityRef, { + authorizationToken: getBearerToken(req.header('authorization')), + }); res.status(200).json(response); }, )