Skip to content

feat(auth): akamai auth integration - #8199

Merged
sid-bruno merged 14 commits into
usebruno:mainfrom
shubh-bruno:fix/akamaiauth-ui
Jul 3, 2026
Merged

sid-bruno merged 14 commits into
usebruno:mainfrom
shubh-bruno:fix/akamaiauth-ui

Conversation

@shubh-bruno

@shubh-bruno shubh-bruno commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

Description

JIRA

Fixes : #3971

Add Akamai EdgeGrid (EG1-HMAC-SHA256) authentication support for collection, folder & requests

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • New Features

    • Added Akamai EdgeGrid (EG1-HMAC-SHA256) authentication across collections, folders, and requests, including inheritance and advanced settings (access/client tokens, nonce/timestamp, base URL, headers-to-sign, max body size), plus a Beta “Akamai EdgeGrid” option in auth mode dropdowns.
    • EdgeGrid signing is supported in the CLI/Electron request runner, and Bruno language + Postman import/export/serialization now handle EdgeGrid auth.
  • Tests

    • Added unit and end-to-end coverage for signing/interoperability, UI behavior and persistence, and import/export round-trips.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Akamai EdgeGrid authentication across UI, state, signing, serialization, conversion, runtime request preparation, and end-to-end test fixtures.

Changes

EdgeGrid Authentication Support

Layer / File(s) Summary
Schema and auth contracts
packages/bruno-schema-types/src/common/auth.ts, packages/bruno-schema/src/collections/index.js
Adds AuthEdgeGrid, extends AuthMode with edgegrid, adds edgegrid on Auth, and validates EdgeGrid fields in the auth schema.
Auth mode selection across scopes
packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js, packages/bruno-app/src/components/FolderSettings/AuthMode/index.js, packages/bruno-app/src/components/RequestPane/Auth/AuthMode/index.js
Adds Akamai EdgeGrid to the auth mode menus with a Beta badge and mode-change handlers.
EdgeGrid editors and persistence wiring
packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/*, packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/*, packages/bruno-app/src/components/CollectionSettings/Auth/index.js, packages/bruno-app/src/components/FolderSettings/Auth/index.js, packages/bruno-app/src/components/RequestPane/Auth/index.js, packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
Adds EdgeGrid auth editors, styling, sensitive-field warnings, scope routing, and reducer handling for request, collection, and folder auth state.
Request preparation and signing hookup
packages/bruno-cli/src/runner/*, packages/bruno-electron/src/ipc/network/*, packages/bruno-requests/src/auth/edgegrid-helper.js, packages/bruno-requests/src/auth/index.ts, packages/bruno-requests/src/index.ts, packages/bruno-requests/src/auth/edgegrid-helper.spec.js
Populates edgeGridConfig, registers the EdgeGrid interceptor, exports signing helpers, and adds signing and helper tests.
Language, filestore, and export serialization
packages/bruno-lang/v2/src/bruToJson.js, packages/bruno-lang/v2/src/collectionBruToJson.js, packages/bruno-lang/v2/src/jsonToBru.js, packages/bruno-lang/v2/src/jsonToCollectionBru.js, packages/bruno-filestore/src/formats/yml/common/auth.ts, packages/bruno-app/src/utils/collections/index.js
Adds parse/emit support for auth:edgegrid and edgegrid auth objects across Bru, YAML, and collection export paths.
Postman conversion and import coverage
packages/bruno-converters/src/postman/bruno-to-postman.js, packages/bruno-converters/src/postman/postman-to-bruno.js, packages/bruno-converters/tests/postman/*, tests/import/postman/*
Maps EdgeGrid auth between Bruno and Postman, and adds conversion tests plus an import fixture/spec for EdgeGrid collections.
Verification server, E2E flows, and fixtures
packages/bruno-tests/src/auth/*, tests/auth/edgegrid/*
Adds an EdgeGrid verification router, request-level and inheritance Playwright specs, collection-runner specs, and BRU/YML fixtures covering success, failure, base URL override, and signed-header cases.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant BrunoApp
  participant ReduxStore
  participant prepareRequest
  participant Axios
  participant EdgeGridHelper
  participant EdgeGridVerifier
  User->>BrunoApp: select EdgeGrid auth and edit fields
  BrunoApp->>ReduxStore: update auth state
  User->>BrunoApp: send request
  BrunoApp->>prepareRequest: build edgeGridConfig
  prepareRequest->>Axios: attach edgeGridConfig
  Axios->>EdgeGridHelper: addEdgeGridInterceptor signs request
  Axios->>EdgeGridVerifier: send signed request
  EdgeGridVerifier->>Axios: return authenticated response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • usebruno/bruno#7646: Both PRs change packages/bruno-converters/src/postman/postman-to-bruno.js in the auth import path, so the EdgeGrid mapping code sits in the same conversion flow.
  • usebruno/bruno#7911: Both PRs touch the Redux auth reducers in packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js, including scope-level auth state updates.

Suggested reviewers

  • lohit-bruno
  • naman-bruno
  • bijin-bruno
  • sid-bruno
  • vijayh-bruno
  • utkarsh-bruno

EdgeGrid fields line up in rows,
A signer hums, the request now goes.
From Bru to Postman, back again,
Fixtures, tests, and routes remain.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding Akamai EdgeGrid authentication integration across auth flows.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (9)
packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/index.tsx (2)

142-144: ⚡ Quick win

Remove unnecessary fragment wrapper.

The fragment on lines 142-144 wrapping ADVANCED_FIELDS.map(renderField) is redundant. Per coding guidelines, avoid unnecessary wrapper elements to minimize diffs and keep code clean.

♻️ Simplify JSX
-      <>
-        {ADVANCED_FIELDS.map(renderField)}
-      </>
+      {ADVANCED_FIELDS.map(renderField)}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/index.tsx`
around lines 142 - 144, Remove the unnecessary fragment wrapping
ADVANCED_FIELDS.map(renderField) in the EdgeGridAuth component; replace the
fragment-wrapped JSX with the expression {ADVANCED_FIELDS.map(renderField)}
directly (locate the fragment around ADVANCED_FIELDS and renderField in
index.tsx) and ensure the surrounding JSX remains valid after the fragment is
removed.

Source: Coding guidelines


100-146: ⚡ Quick win

Add data-testid attributes for Playwright testing.

Per coding guidelines, testable elements should include data-testid attributes. Consider adding test IDs to field containers, the advanced settings toggle, and input wrappers to enable stable E2E test selection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/index.tsx`
around lines 100 - 146, Add data-testid attributes to make elements selectable
for tests: in renderField (EdgeGridFieldConfig) add data-testid on the outer div
(e.g., data-testid={`edgegrid-field-${key}`}) and on the SingleLineEditor
wrapper div (e.g., data-testid={`edgegrid-input-${key}`}); add a data-testid to
the advanced settings header element rendered for ADVANCED_FIELDS (e.g.,
data-testid="edgegrid-advanced-header") and to the advanced fields container
(e.g., data-testid="edgegrid-advanced-fields"); also add a data-testid to the
SensitiveFieldWarning instance (e.g., data-testid={`edgegrid-warning-${key}`})
so Playwright can target the warning. Ensure you update usages around
renderField, BASIC_FIELDS, ADVANCED_FIELDS, SingleLineEditor,
SensitiveFieldWarning and StyledWrapper to include these attributes.

Source: Coding guidelines

packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/index.tsx (2)

106-154: ⚡ Quick win

Add data-testid attributes for Playwright testing.

Per coding guidelines, testable elements should include data-testid attributes for stable E2E test selection. Consider adding test IDs to field containers, the advanced settings section, and input wrappers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/index.tsx`
around lines 106 - 154, Add stable data-testid attributes to the rendered DOM
elements for Playwright: update the renderField function to add data-testid on
the outer field container (use the EdgeGridFieldConfig key e.g.,
data-testid={`edgegrid-field-${key}`}) and on the input wrapper div
(single-line-editor-wrapper) and add a specific id for secret warnings (e.g.,
data-testid={`edgegrid-secret-warning-${key}`}) when rendering
SensitiveFieldWarning; also add a test id to the advanced settings header (the
div with className "advanced-settings-header", e.g.,
data-testid="edgegrid-advanced-settings") so both BASIC_FIELDS and
ADVANCED_FIELDS rendered via renderField are testable.

Source: Coding guidelines


150-152: ⚡ Quick win

Remove unnecessary fragment wrapper.

The fragment on lines 150-152 wrapping ADVANCED_FIELDS.map(renderField) is redundant. Per coding guidelines, avoid unnecessary wrapper elements.

♻️ Simplify JSX
-        <>
-          {ADVANCED_FIELDS.map(renderField)}
-        </>
+        {ADVANCED_FIELDS.map(renderField)}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/index.tsx`
around lines 150 - 152, The JSX fragment wrapping
ADVANCED_FIELDS.map(renderField) is redundant; remove the <>...</> wrapper and
render ADVANCED_FIELDS.map(renderField) directly in the component returned by
the function where ADVANCED_FIELDS and renderField are used (in index.tsx) so
the output is identical but without the unnecessary fragment element.

Source: Coding guidelines

packages/bruno-app/src/components/FolderSettings/Auth/index.js (1)

216-228: ⚡ Quick win

Remove unnecessary fragment wrapper.

The fragment wrapping the single <EdgeGridAuth> component is redundant. Other auth mode cases return the component directly without a fragment (see lines 104-113 for basic auth, etc.). Only the oauth2 case uses a fragment because it renders multiple children.

♻️ Simplify case statement
       case 'edgegrid': {
-        return (
-          <>
-            <EdgeGridAuth
-              collection={collection}
-              item={folder}
-              updateAuth={updateFolderAuth}
-              request={request}
-              save={() => handleSave()}
-            />
-          </>
-        );
+        return (
+          <EdgeGridAuth
+            collection={collection}
+            item={folder}
+            updateAuth={updateFolderAuth}
+            request={request}
+            save={() => handleSave()}
+          />
+        );
       }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-app/src/components/FolderSettings/Auth/index.js` around lines
216 - 228, In the case 'edgegrid' branch remove the unnecessary React fragment
and return the EdgeGridAuth component directly; update the switch case that
renders EdgeGridAuth (currently wrapped in <></>) to simply return <EdgeGridAuth
collection={collection} item={folder} updateAuth={updateFolderAuth}
request={request} save={() => handleSave()} /> preserving all props and handlers
(EdgeGridAuth, updateFolderAuth, handleSave, collection, folder, request).

Source: Coding guidelines

tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid GET 401.yml (1)

15-20: ⚡ Quick win

Strengthen the negative-path assertion.

Add an assertion for res.body.authenticated == "false" so this test verifies behavior, not only status code.

As per coding guidelines, tests should “cover… problematic paths” and “use multiple assertions.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid` GET 401.yml around
lines 15 - 20, Add a second assertion under runtime.assertions to check the
response body for authentication state: add an assertion with expression
"res.body.authenticated" operator "eq" and value "false" so the test verifies
the negative-path response content in addition to the status check; update the
assertions array that currently contains the "res.status eq 401" entry (the
runtime.assertions block) to include this new assertion.

Source: Coding guidelines

tests/auth/edgegrid/edgegrid.spec.ts (1)

60-62: ⚡ Quick win

Use afterEach instead of afterAll for per-test cleanup.

Closing collections after all tests means the cleanup only runs once at the end of the suite. For proper test isolation, use afterEach to clean up after each individual test.

♻️ Proposed fix
-  test.afterAll(async ({ page }) => {
+  test.afterEach(async ({ page }) => {
     await closeAllCollections(page);
   });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/auth/edgegrid/edgegrid.spec.ts` around lines 60 - 62, The test cleanup
currently runs in test.afterAll which only executes once after the whole suite;
change it to test.afterEach so closeAllCollections(page) runs after each test
for proper isolation. Locate the teardown hook using closeAllCollections in the
edgegrid.spec.ts test suite and replace the test.afterAll(async ({ page }) => {
await closeAllCollections(page); }); hook with test.afterEach(async ({ page })
=> { await closeAllCollections(page); }); ensuring the same async signature and
page fixture are preserved.
tests/auth/edgegrid/edgegrid-runner.spec.ts (2)

43-43: ⚡ Quick win

Add type annotation for the page parameter.

Same as the previous helper - add the Page type annotation.

📝 Proposed fix
-const runAndValidate = async (page, collectionName: string) => {
+const runAndValidate = async (page: Page, collectionName: string) => {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/auth/edgegrid/edgegrid-runner.spec.ts` at line 43, The helper function
runAndValidate currently has an untyped first parameter; add the Playwright Page
type by changing the signature to accept page: Page and ensure Page is imported
(e.g., from '`@playwright/test`' or your existing Playwright import) so the helper
matches the other helpers' typings; update any related usages if needed to
satisfy the new type.

31-31: ⚡ Quick win

Add type annotation for the page parameter.

The page parameter is missing a type annotation. For consistency and type safety, add the Playwright Page type.

📝 Proposed fix
-const sendAllRequests = async (page, collectionName: string) => {
+const sendAllRequests = async (page: Page, collectionName: string) => {

And add the import:

import { test, Page } from '../../../playwright';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/auth/edgegrid/edgegrid-runner.spec.ts` at line 31, The sendAllRequests
function is missing a type on its first parameter; update the signature of
sendAllRequests to annotate the page parameter with Playwright's Page type
(e.g., page: Page) and add the corresponding import for Page from your
playwright test harness (as suggested, import Page from '../../../playwright'
alongside test) so the function signature and imports use the Playwright Page
type for proper type safety.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/StyledWrapper.js`:
- Around line 54-83: The styled-component uses hardcoded colors in selectors
.advanced-settings-hint, .field-info svg, and .field-tooltip (background-color
and color); replace those literal color values with theme tokens accessed via
the styled-component props (e.g. props.theme.colors.* or
props.theme.font.color.*) so the styles read from the app theme instead of fixed
hex/rgb values—update the color for .advanced-settings-hint, the svg color
inside .field-info, and both background-color and color inside .field-tooltip to
use the appropriate theme keys.

In
`@packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/StyledWrapper.js`:
- Around line 54-83: The CSS in StyledWrapper.js hardcodes several colors
instead of using the styled-components theme: replace the literal color values
in .advanced-settings-hint (rgb(107 114 128)), .field-info svg (rgb(107 114
128)), and .field-tooltip (background-color: `#374151` and color: `#fff`) with the
appropriate props.theme tokens used across the app (e.g., theme color tokens for
gray/neutral text and tooltip bg/foreground) so the styles read from props.theme
(like the existing font size usage) and thus support theming/dark mode; update
the selectors .advanced-settings-hint, .field-info svg, and .field-tooltip
accordingly.

In `@packages/bruno-requests/src/auth/edgegrid-helper.js`:
- Around line 1-2: The file uses CommonJS and plain JavaScript causing loss of
types for addEdgeGridInterceptor and signEdgeGridRequest; convert it to
TypeScript by renaming to edgegrid-helper.ts, replace require(...) with ES
module imports (e.g., import crypto from 'crypto' and import { URL } from
'node:url'), add exported TypeScript interfaces/types for the EdgeGrid config
and request parameter shapes used by addEdgeGridInterceptor and
signEdgeGridRequest, and update any tests to .ts/.spec.ts accordingly so callers
get strong types instead of any.

In `@packages/bruno-tests/src/auth/edgegrid.js`:
- Around line 97-99: The parsed x-eg-max-body-size header is used directly via
parseInt and can yield NaN or non-positive values that break truncation/hashing;
validate the header value after parseInt in the code that sets maxBodySize (and
before any hashing/truncation) by checking Number.isInteger(parsed) && parsed >
0 (optionally clamp to a sensible MAX_LIMIT) and fallback to
MAX_BODY_SIZE_DEFAULT when invalid, ensuring all uses of maxBodySize
(truncation/hashing routines) rely on this validated value.

In `@tests/auth/edgegrid/edgegrid-runner.spec.ts`:
- Around line 53-79: Tests in edgegrid-runner.spec.ts are using the shared
fixture pageWithUserData (violates parallel-safety); change each test to use the
standard page fixture and create an isolated temp user-data dir per test (use
createTmpDir or equivalent) before launching/visiting the app, then pass that
page into the existing helpers (sendAllRequests and runAndValidate) unchanged;
update the two test.describe blocks so the test signatures use async ({ page })
instead of ({ pageWithUserData: page }) and ensure any setup/teardown that
referenced the shared pageWithUserData (e.g., closeAllCollections) uses the
per-test temp dir or per-test cleanup tied to createTmpDir.

In `@tests/import/postman/import-edgegrid-collection.spec.ts`:
- Around line 88-103: Capture the original dialog.showOpenDialog value by having
test.beforeAll call await electronApp.evaluate(() => dialog.showOpenDialog) and
assign that return value to the outer-scope originalShowOpenDialog variable,
then in test.afterAll restore it by calling await
electronApp.evaluate((original) => { dialog.showOpenDialog = original },
originalShowOpenDialog) (with a null/undefined guard before restoring); keep the
existing closeAllCollections(page) call so cleanup runs, ensuring the stub is
restored in the renderer/main context explicitly and reliably.

---

Nitpick comments:
In
`@packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/index.tsx`:
- Around line 142-144: Remove the unnecessary fragment wrapping
ADVANCED_FIELDS.map(renderField) in the EdgeGridAuth component; replace the
fragment-wrapped JSX with the expression {ADVANCED_FIELDS.map(renderField)}
directly (locate the fragment around ADVANCED_FIELDS and renderField in
index.tsx) and ensure the surrounding JSX remains valid after the fragment is
removed.
- Around line 100-146: Add data-testid attributes to make elements selectable
for tests: in renderField (EdgeGridFieldConfig) add data-testid on the outer div
(e.g., data-testid={`edgegrid-field-${key}`}) and on the SingleLineEditor
wrapper div (e.g., data-testid={`edgegrid-input-${key}`}); add a data-testid to
the advanced settings header element rendered for ADVANCED_FIELDS (e.g.,
data-testid="edgegrid-advanced-header") and to the advanced fields container
(e.g., data-testid="edgegrid-advanced-fields"); also add a data-testid to the
SensitiveFieldWarning instance (e.g., data-testid={`edgegrid-warning-${key}`})
so Playwright can target the warning. Ensure you update usages around
renderField, BASIC_FIELDS, ADVANCED_FIELDS, SingleLineEditor,
SensitiveFieldWarning and StyledWrapper to include these attributes.

In `@packages/bruno-app/src/components/FolderSettings/Auth/index.js`:
- Around line 216-228: In the case 'edgegrid' branch remove the unnecessary
React fragment and return the EdgeGridAuth component directly; update the switch
case that renders EdgeGridAuth (currently wrapped in <></>) to simply return
<EdgeGridAuth collection={collection} item={folder}
updateAuth={updateFolderAuth} request={request} save={() => handleSave()} />
preserving all props and handlers (EdgeGridAuth, updateFolderAuth, handleSave,
collection, folder, request).

In `@packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/index.tsx`:
- Around line 106-154: Add stable data-testid attributes to the rendered DOM
elements for Playwright: update the renderField function to add data-testid on
the outer field container (use the EdgeGridFieldConfig key e.g.,
data-testid={`edgegrid-field-${key}`}) and on the input wrapper div
(single-line-editor-wrapper) and add a specific id for secret warnings (e.g.,
data-testid={`edgegrid-secret-warning-${key}`}) when rendering
SensitiveFieldWarning; also add a test id to the advanced settings header (the
div with className "advanced-settings-header", e.g.,
data-testid="edgegrid-advanced-settings") so both BASIC_FIELDS and
ADVANCED_FIELDS rendered via renderField are testable.
- Around line 150-152: The JSX fragment wrapping
ADVANCED_FIELDS.map(renderField) is redundant; remove the <>...</> wrapper and
render ADVANCED_FIELDS.map(renderField) directly in the component returned by
the function where ADVANCED_FIELDS and renderField are used (in index.tsx) so
the output is identical but without the unnecessary fragment element.

In `@tests/auth/edgegrid/edgegrid-runner.spec.ts`:
- Line 43: The helper function runAndValidate currently has an untyped first
parameter; add the Playwright Page type by changing the signature to accept
page: Page and ensure Page is imported (e.g., from '`@playwright/test`' or your
existing Playwright import) so the helper matches the other helpers' typings;
update any related usages if needed to satisfy the new type.
- Line 31: The sendAllRequests function is missing a type on its first
parameter; update the signature of sendAllRequests to annotate the page
parameter with Playwright's Page type (e.g., page: Page) and add the
corresponding import for Page from your playwright test harness (as suggested,
import Page from '../../../playwright' alongside test) so the function signature
and imports use the Playwright Page type for proper type safety.

In `@tests/auth/edgegrid/edgegrid.spec.ts`:
- Around line 60-62: The test cleanup currently runs in test.afterAll which only
executes once after the whole suite; change it to test.afterEach so
closeAllCollections(page) runs after each test for proper isolation. Locate the
teardown hook using closeAllCollections in the edgegrid.spec.ts test suite and
replace the test.afterAll(async ({ page }) => { await closeAllCollections(page);
}); hook with test.afterEach(async ({ page }) => { await
closeAllCollections(page); }); ensuring the same async signature and page
fixture are preserved.

In `@tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid` GET 401.yml:
- Around line 15-20: Add a second assertion under runtime.assertions to check
the response body for authentication state: add an assertion with expression
"res.body.authenticated" operator "eq" and value "false" so the test verifies
the negative-path response content in addition to the status check; update the
assertions array that currently contains the "res.status eq 401" entry (the
runtime.assertions block) to include this new assertion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c20896bd-8017-40fc-b1b9-59023ce11c2c

📥 Commits

Reviewing files that changed from the base of the PR and between 2d4d4e4 and 395bfc8.

📒 Files selected for processing (58)
  • packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js
  • packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/StyledWrapper.js
  • packages/bruno-app/src/components/CollectionSettings/Auth/EdgeGridAuth/index.tsx
  • packages/bruno-app/src/components/CollectionSettings/Auth/index.js
  • packages/bruno-app/src/components/FolderSettings/Auth/index.js
  • packages/bruno-app/src/components/FolderSettings/AuthMode/index.js
  • packages/bruno-app/src/components/RequestPane/Auth/AuthMode/index.js
  • packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/Auth/EdgeGridAuth/index.tsx
  • packages/bruno-app/src/components/RequestPane/Auth/index.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
  • packages/bruno-app/src/utils/collections/index.js
  • packages/bruno-cli/src/runner/prepare-request.js
  • packages/bruno-cli/src/runner/run-single-request.js
  • packages/bruno-converters/src/postman/bruno-to-postman.js
  • packages/bruno-converters/src/postman/postman-to-bruno.js
  • packages/bruno-converters/tests/postman/edgegrid-auth.spec.js
  • packages/bruno-converters/tests/postman/postman-to-bruno/process-auth.spec.js
  • packages/bruno-electron/src/ipc/network/index.js
  • packages/bruno-electron/src/ipc/network/prepare-request.js
  • packages/bruno-filestore/src/formats/yml/common/auth.ts
  • packages/bruno-lang/v2/src/bruToJson.js
  • packages/bruno-lang/v2/src/collectionBruToJson.js
  • packages/bruno-lang/v2/src/jsonToBru.js
  • packages/bruno-lang/v2/src/jsonToCollectionBru.js
  • packages/bruno-requests/src/auth/edgegrid-helper.js
  • packages/bruno-requests/src/auth/edgegrid-helper.spec.js
  • packages/bruno-requests/src/auth/index.ts
  • packages/bruno-requests/src/index.ts
  • packages/bruno-schema-types/src/common/auth.ts
  • packages/bruno-schema/src/collections/index.js
  • packages/bruno-tests/src/auth/edgegrid.js
  • packages/bruno-tests/src/auth/index.js
  • tests/auth/edgegrid/edgegrid-levels.spec.ts
  • tests/auth/edgegrid/edgegrid-runner.spec.ts
  • tests/auth/edgegrid/edgegrid.spec.ts
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid Base URL Override 200.bru
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid GET 200.bru
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid GET 401.bru
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid Inherit 200.bru
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid POST JSON 200.bru
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid POST Pretty JSON 200.bru
  • tests/auth/edgegrid/fixtures/collections/bru/EdgeGrid Signed Headers 200.bru
  • tests/auth/edgegrid/fixtures/collections/bru/bruno.json
  • tests/auth/edgegrid/fixtures/collections/bru/collection.bru
  • tests/auth/edgegrid/fixtures/collections/bru/environments/Local.bru
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid Base URL Override 200.yml
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid GET 200.yml
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid GET 401.yml
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid Inherit 200.yml
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid POST JSON 200.yml
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid POST Pretty JSON 200.yml
  • tests/auth/edgegrid/fixtures/collections/yml/EdgeGrid Signed Headers 200.yml
  • tests/auth/edgegrid/fixtures/collections/yml/environments/Local.yml
  • tests/auth/edgegrid/fixtures/collections/yml/opencollection.yml
  • tests/auth/edgegrid/init-user-data/preferences.json
  • tests/import/postman/fixtures/postman-edgegrid-collection.json
  • tests/import/postman/import-edgegrid-collection.spec.ts

@sid-bruno

Copy link
Copy Markdown
Collaborator

User has confirmed that the auth works #3971 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auth support for Akamai EdgeGrid

3 participants