Skip to content

Auth:inherit not fully supported via Bruno CLI #3688

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

Open
2 tasks done
tstavinoha opened this issue Dec 20, 2024 · 7 comments · May be fixed by #4245
Open
2 tasks done

Auth:inherit not fully supported via Bruno CLI #3688

tstavinoha opened this issue Dec 20, 2024 · 7 comments · May be fixed by #4245
Assignees
Labels
bug Something isn't working module-auth module-cli

Comments

@tstavinoha
Copy link

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

It seems that Bruno CLI does not fully support all authentication methods in inherit mode.

In scope of a previous issue support for bearer token was added, alongside basic auth, but the other 5 methods do not seem to be supported. This is evident in the source code modified as part of the aforementioned issue.

I can try to help with the PR, but I was not sure how to migrate the logic from bruno-app module, as it differs significantly, and I'm not sure if it is the relevant part at all. I can try re-implementing it, at least for some cases (i'm mostly interested in API KEY method), but I'd like to find out whether this is a good way to proceed.

.bru file to reproduce the bug

bruno.json

{
  "version": "1",
  "name": "Bruno auth inherit proof",
  "type": "collection",
  "ignore": [
    "node_modules",
    ".git"
  ]
}

collection.bru

auth {
  mode: apikey
}

auth:apikey {
  key: Authorization
  value: Some
  placement: header
}

Proof.bru

meta {
  name: Proof
  type: http
  seq: 2
}

get {
  url: https://bruno-bug-test.free.beeceptor.com
  body: none
  auth: inherit
}

Screenshots/Live demo link

beeceptor set up to return 401 unless there is an Authorization header with any value..

Running via gui - works
Running via CLI

Running Folder Recursively

Proof (401 Unauthorized) - 597 ms
@tstavinoha tstavinoha added the bug Something isn't working label Dec 20, 2024
@ganesh-bruno ganesh-bruno self-assigned this Dec 23, 2024
@ganesh-bruno
Copy link
Collaborator

ganesh-bruno commented Dec 30, 2024

Hey @tstavinoha

Thanks for reporting this issue.
I'm able to reproduce it, and we're working on it.

@abdullahkhilji
Copy link

Do we have any update on this? Facing the same issue while testing.

@anusree-bruno
Copy link
Collaborator

Hi @abdullahkhilji,

We're looking into this. I understand that we need to support a few authentication types in inherit. Could you clarify which one you're blocked on? Is it specifically API key authentication?

@abdullahkhilji
Copy link

Hi @anusree-bruno,

Thanks for the update. It is the AWS Sig V4 authentication I am blocked on.

@anusree-bruno
Copy link
Collaborator

Thanks @abdullahkhilji

We have added this to our backlog. I will keep you updated on the progress

@sanjaikumar-bruno sanjaikumar-bruno linked a pull request Mar 17, 2025 that will close this issue
5 tasks
@gms8994
Copy link

gms8994 commented Apr 8, 2025

We're using OAuth2 token authentication (with no header prefix, in case it matters) and would love to have this support.

@EmiliePouchain
Copy link

EmiliePouchain commented Apr 9, 2025

We use OAuth 2.0 authentication with Client Credentials (Add cred to request body + Add token to Headers with default param), we use autorefresh, but for a test/assert launch, I don't think we'll exceed the token validity time limit. In bruno the OAuth works, on requests as well as on collections. On the other hand, in CLI, the same files don't work (in requests and in collections). The certificates are good, the ClientSecret passed in --var-env is well interpreted.

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

Successfully merging a pull request may close this issue.

6 participants