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

Inheritance of collection's secrets broken after upgrading to 1.16.x #2246

Open
2 tasks done
gianpo86 opened this issue May 6, 2024 · 4 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@gianpo86
Copy link
Contributor

gianpo86 commented May 6, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

(Wanted) Behaviour in 1.15 and previous versions:

  • Create a collection
  • Create a secret in the Env Variables:
Screenshot 2024-05-06 at 08 50 55
  • Reference the env variable in the collection's settings:
Screenshot 2024-05-06 at 08 52 06

Use it in the collection's api calls without any reference:
Screenshot 2024-05-06 at 08 53 18

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Incorrect behaviour after updating to 1.16.x

  • Create a collection
  • Create a secret in the Env Variables:
Screenshot 2024-05-06 at 08 50 55 - Reference the env variable in the collection's settings: Screenshot 2024-05-06 at 08 52 06

Use it in the collection's api calls without any reference FAILS - the standard variables works
Screenshot 2024-05-06 at 09 11 56

@gianpo86 gianpo86 added the bug Something isn't working label May 6, 2024
@helloanoop
Copy link
Contributor

Hi @gianpo86 There was a breaking change in v1.16.0 related to how auth inhertiance works

Before 1.16.0, No Auth would inherit the auth credentials by default.
This was a bug and it has been fixed in 1.16.0

In order to inherit the collection auth, you need to explicitly set the Auth option as Inherit in the request.
Screenshot 2024-05-06 at 1 00 44 PM

Can you check if this resolves your issue?

@helloanoop helloanoop self-assigned this May 6, 2024
@gianpo86
Copy link
Contributor Author

gianpo86 commented May 6, 2024

@helloanoop Thanks a lot for the quick reply, I was not aware of this change and it makes a lot of sense. Probably I did not read the release nites in deep. Sorry.

Yes, this solves the issue....However, this is a huge pain for us while using Bruno: now we might have to change every single call of all the collections to Inherit

Could it be then possible to have a flow like this:
If Auth in the collection is set, then automatically set the Inherited option at Api call level?

this would make a lot of sense and streamline the authentication flow very much.

@busy-panda
Copy link
Contributor

@gianpo86 you can string replace "auth: none" by "auth: inherit" directly in the files to make the change.
It should be easy enough

@helloanoop
Copy link
Contributor

helloanoop commented May 6, 2024

@gianpo86 You could also open the collection folder in vscode and do a find and replace to bulk update all requests inside a collection

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants