Skip to content

Commit d24e6ff

Browse files
committed
feat: revert authentication and rate limit
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent 0ed4591 commit d24e6ff

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

backend/src/api/public/v1/akrites-external/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ function envTunableRateLimiter(envPrefix: string, defaultMax: number, defaultWin
3131
})
3232
}
3333

34-
// Blast-radius jobs default to 5 requests/hour.
34+
// Blast-radius jobs default to 50 requests/hour.
3535
const blastRadiusRateLimiter = envTunableRateLimiter(
3636
'AKRITES_BLAST_RADIUS_RATE_LIMIT',
37-
5,
37+
50,
3838
60 * 60 * 1000,
3939
)
4040

backend/src/api/public/v1/index.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,7 @@ export function v1Router(): Router {
4343
router.use('/ossprey', oauth2Middleware(AUTH0_CONFIG), osspreyRouter())
4444

4545
router.use('/akrites', oauth2Middleware(AUTH0_CONFIG), akritesRouter())
46-
// LOCAL-BYPASS-TODO-REVERT: real Auth0 check commented out for a local blast-radius
47-
// e2e load test (no easy way to mint a token locally). Restore the line below and
48-
// delete the stub before this ever reaches a shared/prod branch.
49-
// router.use('/akrites-external', oauth2Middleware(AUTH0_CONFIG), akritesExternalRouter())
50-
router.use(
51-
'/akrites-external',
52-
(req, _res, next) => {
53-
req.actor = { id: 'local-load-test', type: 'service', scopes: Object.values(SCOPES) }
54-
next()
55-
},
56-
akritesExternalRouter(),
57-
)
46+
router.use('/akrites-external', oauth2Middleware(AUTH0_CONFIG), akritesExternalRouter())
5847

5948
router.use(() => {
6049
throw new NotFoundError()

0 commit comments

Comments
 (0)