Merge pull request #23994 from sagardesai1/bug/entity-badges

Fix: allow unauthenticated requests for entity badges
This commit is contained in:
Ben Lambert
2024-04-10 14:31:44 +02:00
committed by GitHub
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-badges-backend': minor
---
Fix unauthorized requests by allowing unauthenticated requests.
+8
View File
@@ -63,6 +63,14 @@ export const badgesPlugin = createBackendPlugin({
auth,
}),
);
httpRouter.addAuthPolicy({
path: '/entity/:entityUuid/:badgeId',
allow: 'unauthenticated',
});
httpRouter.addAuthPolicy({
path: '/entity/:namespace/:kind/:name/badge/:badgeId',
allow: 'unauthenticated',
});
},
});
},