[PR #4694] [MERGED] feat: add support for HAWK authentication #4903

Closed
opened 2026-03-17 02:23:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4694
Author: @anwarulislam
Created: 1/24/2025
Status: Merged
Merged: 4/29/2025
Merged by: @jamesgeorge007

Base: nextHead: feat/hawk


📝 Commits (10+)

  • edb3173 feat: added hawk auth
  • 6f3d77b fix: hmac sign generator
  • 0b0d4dd feat: added hawk npm package
  • d996443 feat: added hawk authentication
  • 9c3a591 feat: hawk added to cli
  • a854c74 feat: hawk auth test files added to cli
  • 5b243e5 feat: akamai edge grid auth types and ui added
  • f7e86f3 feat: akamai edgegrid auth added
  • 360ea7a feat: hawk and akamai utils function
  • 91fea3b feat: akamai eg cli fixtures added

📊 Changes

24 files changed (+709 additions, -50 deletions)

View changed files

📝 packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts (+18 -0)
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/hawk-auth-success-coll.json (+43 -0)
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/environments/hawk-auth-envs.json (+47 -0)
📝 packages/hoppscotch-cli/src/__tests__/unit/fixtures/workspace-access.mock.ts (+13 -13)
📝 packages/hoppscotch-cli/src/utils/pre-request.ts (+40 -0)
📝 packages/hoppscotch-common/locales/en.json (+2 -1)
📝 packages/hoppscotch-common/package.json (+2 -0)
📝 packages/hoppscotch-common/src/components/http/Authorization.vue (+18 -0)
📝 packages/hoppscotch-common/src/components/http/authorization/AkamaiEG.vue (+1 -1)
📝 packages/hoppscotch-common/src/components/http/authorization/HAWK.vue (+14 -6)
📝 packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts (+38 -1)
📝 packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts (+16 -0)
📝 packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts (+2 -2)
📝 packages/hoppscotch-data/src/collection/index.ts (+4 -2)
packages/hoppscotch-data/src/collection/v/7.ts (+37 -0)
📝 packages/hoppscotch-data/src/index.ts (+2 -0)
📝 packages/hoppscotch-data/src/rest/index.ts (+9 -5)
packages/hoppscotch-data/src/rest/v/12.ts (+85 -0)
packages/hoppscotch-data/src/utils/akamai-eg.ts (+65 -0)
packages/hoppscotch-data/src/utils/hawk.ts (+146 -0)

...and 4 more files

📄 Description

Closes HFE-715

This pull request introduces support for HAWK authentication in the Hoppscotch CLI and web application, alongside related updates to the codebase. Key changes include the addition of HAWK authentication handling in request processing, updates to the schema and UI, and the inclusion of new utilities for advanced configurations.

Note to Reviewer

  • If you are testing from the web application, please ensure that the agent is activated, as HAWK authentication is not intended for use in the web environment.
  • The Akamai configurations in the schema file have intentionally not been removed. (We will explore how we can resolve the Akamai authentication issue as well.)

To test in the CLI, run this command.

hopp test src/__tests__/e2e/fixtures/collections/hawk-auth-success-coll.json -e src/__tests__/e2e/fixtures/environments/hawk-auth-envs.json

Request attempts with a payload supplied (for instance, application/json with raw data) where the server expects the payload to be hashed aren't supported at the moment.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4694 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 1/24/2025 **Status:** ✅ Merged **Merged:** 4/29/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `feat/hawk` --- ### 📝 Commits (10+) - [`edb3173`](https://github.com/hoppscotch/hoppscotch/commit/edb3173bb542e5bfdf867a9262c6e8215c42d1e5) feat: added hawk auth - [`6f3d77b`](https://github.com/hoppscotch/hoppscotch/commit/6f3d77b453bf9c0300780c17d2576ba87d5d296b) fix: hmac sign generator - [`0b0d4dd`](https://github.com/hoppscotch/hoppscotch/commit/0b0d4ddf1289f4c4501fd25d913f53fc0f162e59) feat: added hawk npm package - [`d996443`](https://github.com/hoppscotch/hoppscotch/commit/d996443de1b44def2b419969b8b48e184ce018c2) feat: added hawk authentication - [`9c3a591`](https://github.com/hoppscotch/hoppscotch/commit/9c3a59102ec4e604abcc494e6d1f15daf58e0336) feat: hawk added to cli - [`a854c74`](https://github.com/hoppscotch/hoppscotch/commit/a854c7421a416c3687a3ac4a4dc4cfd05210ac55) feat: hawk auth test files added to cli - [`5b243e5`](https://github.com/hoppscotch/hoppscotch/commit/5b243e5b23c2ad457ecfaa606b5114e1633c9ce6) feat: akamai edge grid auth types and ui added - [`f7e86f3`](https://github.com/hoppscotch/hoppscotch/commit/f7e86f3bf5a225b4008ffbfc75024a2833cfc785) feat: akamai edgegrid auth added - [`360ea7a`](https://github.com/hoppscotch/hoppscotch/commit/360ea7a62091976b1811c08c6a18d61dacc49803) feat: hawk and akamai utils function - [`91fea3b`](https://github.com/hoppscotch/hoppscotch/commit/91fea3b3322bfd6a73a21994d035e1d0297d4f0d) feat: akamai eg cli fixtures added ### 📊 Changes **24 files changed** (+709 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts` (+18 -0) ➕ `packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/hawk-auth-success-coll.json` (+43 -0) ➕ `packages/hoppscotch-cli/src/__tests__/e2e/fixtures/environments/hawk-auth-envs.json` (+47 -0) 📝 `packages/hoppscotch-cli/src/__tests__/unit/fixtures/workspace-access.mock.ts` (+13 -13) 📝 `packages/hoppscotch-cli/src/utils/pre-request.ts` (+40 -0) 📝 `packages/hoppscotch-common/locales/en.json` (+2 -1) 📝 `packages/hoppscotch-common/package.json` (+2 -0) 📝 `packages/hoppscotch-common/src/components/http/Authorization.vue` (+18 -0) 📝 `packages/hoppscotch-common/src/components/http/authorization/AkamaiEG.vue` (+1 -1) 📝 `packages/hoppscotch-common/src/components/http/authorization/HAWK.vue` (+14 -6) 📝 `packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts` (+38 -1) 📝 `packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts` (+16 -0) 📝 `packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts` (+2 -2) 📝 `packages/hoppscotch-data/src/collection/index.ts` (+4 -2) ➕ `packages/hoppscotch-data/src/collection/v/7.ts` (+37 -0) 📝 `packages/hoppscotch-data/src/index.ts` (+2 -0) 📝 `packages/hoppscotch-data/src/rest/index.ts` (+9 -5) ➕ `packages/hoppscotch-data/src/rest/v/12.ts` (+85 -0) ➕ `packages/hoppscotch-data/src/utils/akamai-eg.ts` (+65 -0) ➕ `packages/hoppscotch-data/src/utils/hawk.ts` (+146 -0) _...and 4 more files_ </details> ### 📄 Description Closes HFE-715 This pull request introduces support for HAWK authentication in the Hoppscotch CLI and web application, alongside related updates to the codebase. Key changes include the addition of HAWK authentication handling in request processing, updates to the schema and UI, and the inclusion of new utilities for advanced configurations. ### Note to Reviewer - If you are testing from the web application, please ensure that the **agent** is activated, as HAWK authentication is not intended for use in the web environment. - The Akamai configurations in the schema file have intentionally not been removed. (We will explore how we can resolve the Akamai authentication issue as well.) #### To test in the CLI, run this command. ```bash hopp test src/__tests__/e2e/fixtures/collections/hawk-auth-success-coll.json -e src/__tests__/e2e/fixtures/environments/hawk-auth-envs.json ``` > Request attempts with a payload supplied (for instance, `application/json` with raw data) where the server expects the payload to be hashed aren't supported at the moment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:23:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4903
No description provided.