-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[Go] Support HTTP signature #4959
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
[Go] Support HTTP signature #4959
Conversation
There is a dependency on golang 1.10. Update: golang 1.10 dependency is no longer needed. I am using bytes.Buffer. The circleCI build environment should be improved to give better control over the version of golang, but that should be done in a separate PR. |
… signature validation
modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
Outdated
Show resolved
Hide resolved
I kicked off CircleCI again, since it failed but at quick glance it seemed unrelated to work in this PR. |
I just learned some people save their private key with file extensions other than ".pem", so I am going to relax the validation of the private key suffix. |
…em, so I am relaxing the validation of the private key suffix
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.
LGTM!
I've merged the linked pre-req PRs. This should be good to merge after master builds pass. |
This is adding a new "HTTP signature" security schemes (https://datatracker.ietf.org/doc/draft-cavage-http-signatures/). HTTP signatures is still a IETF draft, and hopefully it will become an official RFC this year. On one hand one may argue it shouldn’t be added because it’s still a draft, but on the other hand it is already being used by multiple products, so there may be benefits to support it. It is possible multiple organizations are independently adding the same security scheme.
Ideally one way to address the problem would be to make it possible to add new security schemes (such as HTTP signature) without being required to fork the OpenAPITools repo. But given the current code structure, it’s not clear to me how this could be achieved. Adding new security schemes involves surgery in multiple locations (Java codegen, templates, mustache tags).
I raised this point in Slack before opening the PR.
This PR depends on #4993 and #4934
PR checklist
./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc).master
,4.3.x
,5.0.x
. Default:master
.