usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.56k stars 1.27k forks source link

bruno-cli does not support `apikey` authentication inherited from collection #3511

Open rbonestell opened 2 days ago

rbonestell commented 2 days ago

I have checked the following:

Describe the bug

Requests created using the UI (bruno-electron) application which implement inherited authentication, from the collection, of apikey type ultimately fail when executed with bruno-cli. It appears the prepare-request.js implementation in bruno-cli is not up to parity with the functionality of bruno-electron.

When running requests and tests of this type with the CLI utility, all requests result in failed authentication.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Impacted requests simply result in authentication errors because request auth was not inherited properly from the collection. There are no screenshots due to apikey auth inheritance working as expected in the Bruno UI.

ganesh-bruno commented 15 hours ago

Hey @rbonestell,

Thanks for reporting this issue. I was able to reproduce it on my end. We're working on it.

rbonestell commented 9 hours ago

Thanks for the prompt attention, @ganesh-bruno!

It appears there is a broad disparity between bruno-electron and bruno-cli when it comes to inheriting auth from the collection. I mentioned this in my narrowly-scoped PR #3512 which only addresses adding apikey auth to bruno-cli.

At the moment I'm simply using bruno-cli from my fork and for my requirements it is working to my satisfaction. No hard feelings if my PR is rejected in favor of a more proper and official resolution!

Cheers!