-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat(auth): fix httpsig bypass env #735
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work until:
at which point OpenAPI validation will fail without the signature headers.
See:
@@ -195,7 +195,9 @@ export class App { | |||
path: '/', | |||
method: HttpMethod.POST | |||
}), | |||
grantInitiationHttpsigMiddleware, | |||
this.config.bypassSignatureValidation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the existing bypass be removed?
rafiki/packages/auth/src/signature/middleware.ts
Lines 25 to 28 in d808c85
if (config.bypassSignatureValidation) { | |
// bypass | |
return true | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is pretty redundant now, yeah.
}) | ||
|
||
const altContainer = await createTestApp(altDeps) | ||
appContainers.push(altContainer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also revert appContainers
to appContainer
https://github.com/interledger/rafiki/pull/683/files#diff-9c6c5d794c9dfa6afb4129ccc2ffb701bcdecb70308c63c7e4d615e8d903859c
Changes proposed in this pull request
Conditionally adds httpsig middleware depending on the setting of the env variable for bypassing httpsig validation.
Context
This conditional used to be in the code but refactors of
app.ts
have caused it to be removed.Checklist
fixes #number