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

[FEATURE] Add support for custom authorization headers in chapters section of the tests. #485

Closed
DarshitChanpura opened this issue Aug 9, 2024 · 1 comment · Fixed by #488
Assignees
Labels
enhancement New feature or request

Comments

@DarshitChanpura
Copy link
Member

DarshitChanpura commented Aug 9, 2024

Is your feature request related to a problem?

As of now, there are two ways http_client sets the authorization (see here):

  1. Default username and password (admin and myStrongPassword123!)
  2. A username and password supplied through CLI (process.env.OPENSEARCH_USERNAME and process.env.OPENSEARCH_PASSWORD)

This will apply to all tests and there is no option to apply it to a specific chapter or test file.

What solution would you like?

This issue requests addition of another way of passing custom authorization headers in request block of chapters. This will then be used by http_client to execute requests. It should look something like this:

  - synopsis: ...
    path: ...
    method: ...
    request:
      headers:
        authorization: Basic <base64-encoded-creds>
      payload:
        ...
    response:
      ...

What alternatives have you considered?

NA

Do you have any additional context?

@DarshitChanpura DarshitChanpura added enhancement New feature or request untriaged labels Aug 9, 2024
@DarshitChanpura DarshitChanpura changed the title [FEATURE] Add support for custom authorization headers when running tests. [FEATURE] Add support for custom authorization headers in chapters section of the tests. Aug 9, 2024
@dblock dblock removed the untriaged label Aug 9, 2024
@dblock
Copy link
Member

dblock commented Aug 9, 2024

#488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants