Allow disabling Authorization for bundle downloads#174
Conversation
Bastian-Krause
left a comment
There was a problem hiding this comment.
Sorry for the long waiting time.
The feature itself looks good. Please see my comments below.
I don't really like the scapy testing approach. We could add an nginx include instead that makes nginx respond with an error if auth headers are detected, mimicking what the problematic storage providers do. If you'd like to add that, please base your work on #188.
cfca7ac to
98f7cfe
Compare
Ok I think it's done. Tell me if it's ok for you. Thank you. |
98f7cfe to
21ec155
Compare
|
Thanks for your work! I've..
I think this can be merged once #188 is merged (I've marked this as draft to prevent premature merging) if @ejoerns has no objections. |
|
Thank you for adjustments. |
21ec155 to
1bbf979
Compare
1bbf979 to
9d4804c
Compare
Adds a `send_download_authentication` option defaulting to `true`, keeping the previous behavior. If set to false, no authentication data is sent. This is useful for artifact downloads from external storage providers. Signed-off-by: Kevin Fardel <kevin.fardel@rtone.fr> [bst: rewording of documentation and commit message] Signed-off-by: Bastian Krause <bst@pengutronix.de>
We add an nginx include file to send an HTTP 401 error if the test bundle is downloaded with "authorization" header. Then we run rauc-hawkbit-updater with `send_download_authentication=false` to verify that authorization headers are not sent. Signed-off-by: Kevin Fardel <kevin.fardel@rtone.fr> [bst: make nginx exit with 401, fix docs, rework test to serve the bundle externally] Signed-off-by: Bastian Krause <bst@pengutronix.de>
Test that rauc-hawkbit-updater fails when sending authentication header to external storage provider with send_download_authentication=true. Signed-off-by: Bastian Krause <bst@pengutronix.de>
9d4804c to
5227e50
Compare
|
Now that #169 is merged, setting the new |
|
Since I've modified the PR quite heavily myself, I'd like a review from @ejoerns before merging. |
Hello,
To be able to download bundle from some external storage (like aws S3 or azure blob storage) it can be useful to not send Authorization header.
In order to test this modification correctly I add a sniffer (using scapy module). It's allow us to check requests send by rauc-hawkbit-updater to hawkbit container and validate headers. To make it works we must add specific capabilities. It's annoying, but I don't find any alternatives.