diff --git a/.changeset/big-spies-stare.md b/.changeset/big-spies-stare.md new file mode 100644 index 0000000000..bab1643284 --- /dev/null +++ b/.changeset/big-spies-stare.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-backend': patch +--- + +Dedicated token for techdocs cache sync diff --git a/plugins/techdocs-backend/src/service/router.ts b/plugins/techdocs-backend/src/service/router.ts index b6f95d4e1b..fff55a9ed1 100644 --- a/plugins/techdocs-backend/src/service/router.ts +++ b/plugins/techdocs-backend/src/service/router.ts @@ -252,10 +252,14 @@ export async function createRouter( // However, if caching is enabled, take the opportunity to check and // invalidate stale cache entries. if (cache) { + const { token: techDocsToken } = await auth.getPluginRequestToken({ + onBehalfOf: await auth.getOwnServiceCredentials(), + targetPluginId: 'techdocs', + }); await docsSynchronizer.doCacheSync({ responseHandler, discovery, - token, + token: techDocsToken, entity, }); return;