Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Await signature verification function in backend #3174

Closed
1 task
mkurapov opened this issue Dec 11, 2024 · 0 comments · Fixed by #3175
Closed
1 task

Await signature verification function in backend #3174

mkurapov opened this issue Dec 11, 2024 · 0 comments · Fixed by #3175
Assignees
Labels
pkg: backend Changes in the backend package. type: bug Something isn't working

Comments

@mkurapov
Copy link
Contributor

Context

We are currently not awaiting the verifyApiSignature function in the Admin API middleware:

if (this.config.adminApiSecret) {
koa.use(async (ctx, next: Koa.Next): Promise<void> => {
if (!verifyApiSignature(ctx, this.config)) {
ctx.throw(401, 'Unauthorized')
}
return next()
})
}

Since the function always returns a Promise instead of a bool, it effectively allows us to pass signature validation no matter the result of the function itself.

Todo

  • Await signature verification in backend
@mkurapov mkurapov added the type: bug Something isn't working label Dec 11, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Dec 11, 2024
@mkurapov mkurapov added the pkg: backend Changes in the backend package. label Dec 11, 2024
@mkurapov mkurapov self-assigned this Dec 11, 2024
@mkurapov mkurapov moved this from Backlog to In Progress in Rafiki Dec 11, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Rafiki Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package. type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant