Skip to content

Conditional access host bypass - #38542

Merged
dantecatalfamo merged 23 commits into
mainfrom
37280-cond-access-host-snooze
Jan 26, 2026
Merged

Conditional access host bypass#38542
dantecatalfamo merged 23 commits into
mainfrom
37280-cond-access-host-snooze

Conversation

@dantecatalfamo

@dantecatalfamo dantecatalfamo commented Jan 20, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #37280

Also included a fix for the conditional_access_enabled policy info because it's required for the upcoming frontend.

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Database migrations

  • Checked schema for all modified table for columns that will auto-update timestamps during migration.
  • Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects.
  • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).

Summary by CodeRabbit

Release Notes

  • New Features
    • Added conditional access bypass functionality, enabling administrators to bypass conditional access policies for specific devices when needed.
    • Introduced bypass management system that automatically clears previous bypass entries when authentication settings are updated.
    • Extended device authentication endpoints to support bypass requests through a new API route.

✏️ Tip: You can customize this high-level summary in your review settings.

@codecov

codecov Bot commented Jan 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.29630% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.08%. Comparing base (98ba7ce) to head (ab65085).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...erver/datastore/mysql/conditional_access_bypass.go 79.16% 6 Missing and 4 partials ⚠️
ee/server/service/devices.go 61.90% 4 Missing and 4 partials ⚠️
server/service/devices.go 57.14% 5 Missing and 1 partial ⚠️
...20260126210724_CreateHostConditionalAccessTable.go 77.77% 3 Missing and 1 partial ⚠️
server/fleet/hosts.go 75.00% 1 Missing and 1 partial ⚠️
server/service/appconfig.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #38542    +/-   ##
========================================
  Coverage   66.07%   66.08%            
========================================
  Files        2415     2417     +2     
  Lines      192800   192932   +132     
  Branches     8536     8431   -105     
========================================
+ Hits       127399   127504   +105     
- Misses      53832    53850    +18     
- Partials    11569    11578     +9     
Flag Coverage Δ
backend 67.93% <76.29%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dantecatalfamo
dantecatalfamo marked this pull request as ready for review January 20, 2026 22:17
@dantecatalfamo
dantecatalfamo requested a review from a team as a code owner January 20, 2026 22:17
@dantecatalfamo
dantecatalfamo marked this pull request as draft January 20, 2026 22:17
@dantecatalfamo

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@dantecatalfamo
dantecatalfamo marked this pull request as ready for review January 21, 2026 21:16
@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Implements a host conditional access bypass mechanism enabling devices to request temporary bypass of failing policies, stored in a new database table. The bypass is checked and consumed during IDP session establishment, allowing sessions to proceed if a valid bypass exists.

Changes

Cohort / File(s) Summary
Database Schema & Migrations
server/datastore/mysql/schema.sql, server/datastore/mysql/migrations/tables/20260119220029_CreateHostConditionalAccessTable.go
New host_conditional_access table with host_id (unique), bypassed_at timestamp, and audit timestamps; migration registers the table creation.
Datastore Implementation
server/datastore/mysql/conditional_access_bypass.go, server/datastore/mysql/conditional_access_bypass_test.go
Implements ConditionalAccessBypassDevice (insert/upsert), ConditionalAccessConsumeBypass (atomic read-delete with FOR UPDATE), and ConditionalAccessClearBypasses; includes transactional safety and comprehensive test coverage.
Datastore Interface & Mocks
server/fleet/datastore.go, server/mock/datastore_mock.go
Adds three new datastore interface methods and corresponding mock implementations with invocation tracking.
IDP Session & Bypass Logic
ee/server/service/condaccess/idp.go, ee/server/service/condaccess/idp_test.go
GetSession now checks ConditionalAccessConsumeBypass when device fails policies; bypasses gate remediation redirect if bypass exists and is consumed; includes test coverage for bypass presence/absence scenarios and error conditions.
Service Bypass Endpoint
server/service/devices.go (non-EE), server/service/handler.go, server/fleet/service.go, server/mock/service/service_mock.go
New device-authenticated POST endpoint and service method BypassConditionalAccess; OSS implementation returns ErrMissingLicense.
EE Service Implementation
ee/server/service/devices.go
Records bypass, enforces bypass-disabled config check, logs activity via ConditionalAccessBypassDevice, retrieves IdP info for activity context.
AppConfig & Bypass Clearing
server/service/appconfig.go
Clears all bypasses via ConditionalAccessClearBypasses when Okta bypass configuration changes.
Policy & Host Queries
server/datastore/mysql/hosts.go, server/datastore/mysql/policies_test.go
Adds ConditionalAccessEnabled column to policy queries and adds field to PolicyPayload for conditional access enablement tracking.
Integration Tests
server/service/integration_enterprise_test.go
Comprehensive test suite for conditional access flows including device authentication, certificate handling, policy management, and bypass scenarios.

Sequence Diagram(s)

sequenceDiagram
    participant Device
    participant Service as EE Service
    participant Datastore
    participant IDP
    participant Session

    rect rgba(100, 150, 200, 0.5)
    Note over Device,IDP: Bypass Request Flow
    Device->>Service: POST /bypass_conditional_access
    Service->>Datastore: ConditionalAccessBypassDevice(hostID)
    Datastore->>Datastore: INSERT/UPSERT bypass timestamp
    Service->>Service: Log activity (HostBypassedConditionalAccess)
    Service-->>Device: 200 OK
    end

    rect rgba(100, 200, 150, 0.5)
    Note over IDP,Session: Policy Failure & Bypass Consumption
    Device->>IDP: Authenticate (GetSession)
    IDP->>IDP: Evaluate conditional access policies
    alt Policy Fails
        IDP->>Datastore: ConditionalAccessConsumeBypass(hostID)
        alt Bypass Exists
            Datastore->>Datastore: DELETE bypass (transaction)
            Datastore-->>IDP: Returns bypassed_at timestamp
            IDP->>Session: Allow session (bypass consumed)
            Session-->>Device: Session established
        else No Bypass
            Datastore-->>IDP: Returns nil
            IDP-->>Device: Redirect to remediation URL
        end
    else Policy Passes
        IDP->>Session: Allow session
        Session-->>Device: Session established
    end
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • getvictor
  • mostlikelee
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description addresses key aspects but is incomplete: it references issue #37280, confirms input validation and SQL injection prevention, marks automated tests as added, confirms database migration checks, but does not mention changes files, does not document the new API endpoint, and does not address clearing bypasses on policy modification. Complete the checklist by addressing whether a changes file was added for user-visible features, and document the new device-authenticated API endpoint implementation details.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Conditional access host bypass' directly aligns with the primary change: implementing a host bypass mechanism for conditional access policies, as detailed in linked issue #37280.
Linked Issues check ✅ Passed The PR implements all core coding requirements from issue #37280: creates host_conditional_access table with migrations, adds device-authenticated endpoint for bypass control, checks/consumes bypass during IdP login, and clears bypasses on AppConfig changes and when hosts are deleted.
Out of Scope Changes check ✅ Passed The PR includes comprehensive changes tightly scoped to issue #37280 (bypass table, endpoints, bypass consumption logic), plus an in-scope fix for conditional_access_enabled policy field needed for upcoming frontend, with no unrelated changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 37280-cond-access-host-snooze

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 and usage tips.

@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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
server/service/appconfig.go (1)

1072-1110: Guard bypass-change detection against unset input.

oktaBypassChanged uses newAppConfig.ConditionalAccess.BypassDisabled.Value even when that field isn’t set, which can flip from true → false by zero-value and cause unnecessary bypass clears and activity spam. Consider checking .Set or comparing against the final appConfig value instead.

🛠️ Suggested fix
-    oktaBypassChanged = oldAppConfig.ConditionalAccess.BypassDisabled.Value != newAppConfig.ConditionalAccess.BypassDisabled.Value
+    if newAppConfig.ConditionalAccess.BypassDisabled.Set {
+        oktaBypassChanged = oldAppConfig.ConditionalAccess.BypassDisabled.Value != appConfig.ConditionalAccess.BypassDisabled.Value
+    }
🤖 Fix all issues with AI agents
In `@ee/server/service/condaccess/idp.go`:
- Around line 392-415: The bypass consumption block must be gated by the same
bypass-enabled flag used by BypassConditionalAccess so disabled bypasses are
never honored; update the code around the ConditionalAccessConsumeBypass call to
first check the bypass feature flag (i.e. call the same function or config check
used by BypassConditionalAccess) and only call
p.ds.ConditionalAccessConsumeBypass(ctx, host.ID) and allow access when
bypassedAt != nil if that flag is true, otherwise skip consumption and redirect
to hostRemediationUrl as the non-bypass path does now.

In `@server/service/devices.go`:
- Around line 500-505: In bypassConditionalAccessEndpoint, the error branch
currently returns listDevicePoliciesResponse but should return
bypassConditionalAccessResponse; change the return to
bypassConditionalAccessResponse{Err: err}, nil so the endpoint always returns
the correct response shape (refer to bypassConditionalAccessEndpoint and the
bypassConditionalAccessResponse type when making the change).

In `@server/service/integration_enterprise_test.go`:
- Around line 23408-23413: The test is not asserting the response body because
s.DoRawNoAuth is used and does not unmarshal into bypassResp, so
require.Nil(bypassResp.Err) is ineffective; change the call to use s.DoJSON (or
otherwise decode the HTTP response) when calling the POST to
"/api/v1/fleet/device/test-conditional-access-bypass-token/bypass_conditional_access"
so the response is unmarshaled into the bypassConditionalAccessResponse variable
(bypassResp) and then assert on bypassResp.Err; apply the same replacement for
the other occurrence around lines 23466-23469.
- Around line 23395-23406: The cleanup function leaves Okta's bypass_disabled
flag set, causing state leakage into other tests; update
clearOktaConditionalAccess (or the TestConditionalAccessBypass cleanup) to reset
bypass_disabled to its default. Locate clearOktaConditionalAccess and modify the
request body sent there to include bypass_disabled: nil (or explicitly
bypass_disabled: false) so the flag is cleared, or alternatively capture the
original bypass_disabled value at test start in TestConditionalAccessBypass and
restore it in the t.Cleanup closure to ensure test isolation.
🧹 Nitpick comments (3)
ee/server/service/devices.go (1)

118-126: Optional: keep a non-empty IdP name in activities.

If IdpFullName is empty, the activity ends up blank. Consider falling back to IdpUserName or the default label.

♻️ Suggested tweak
-	idpFullName := "An end user"
-	endUsers, err := fleet.GetEndUsers(ctx, svc.ds, host.ID)
+	idpFullName := "An end user"
+	endUsers, err := fleet.GetEndUsers(ctx, svc.ds, host.ID)
 	if err != nil {
 		return ctxerr.Wrap(ctx, err, "getting end users for bypass activity")
 	}
 
-	if len(endUsers) > 0 {
-		idpFullName = endUsers[0].IdpFullName
-	}
+	if len(endUsers) > 0 {
+		if endUsers[0].IdpFullName != "" {
+			idpFullName = endUsers[0].IdpFullName
+		} else if endUsers[0].IdpUserName != "" {
+			idpFullName = endUsers[0].IdpUserName
+		}
+	}
server/fleet/datastore.go (1)

828-836: LGTM! Interface methods for conditional access bypass are well-defined.

The three new methods properly scope operations:

  • ConditionalAccessBypassDevice and ConditionalAccessConsumeBypass correctly use hostID to target specific hosts
  • ConditionalAccessClearBypasses intentionally clears all bypasses (for the policy modification use case per PR objectives)

The (*time.Time, error) return type appropriately distinguishes between "no bypass exists" (nil) and "bypass was created at this time".

Minor nit: The comment on line 830-831 has slightly redundant wording ("consumes the bypass checks and consumes"). Consider rewording for clarity:

📝 Suggested comment clarification (optional)
-	// ConditionalAccessConsumeBypass consumes the bypass checks and consumes any conditional access
-	// bypass a device has. If a bypass is present, it will return the time the bypass was enabled.
+	// ConditionalAccessConsumeBypass checks for and consumes any conditional access bypass a device
+	// has. If a bypass is present, it deletes it and returns the time the bypass was enabled.
 	// If a bypass is not present, it will return nil.
server/datastore/mysql/schema.sql (1)

563-571: App-level cleanup for host_conditional_access.host_id already exists; add FK constraint as defense-in-depth enhancement.

App-level cleanup is already in place—host_conditional_access records are explicitly deleted during host deletion (verified in the hosts deletion flow and tested in testConditionalAccessBypassDeletedWithHost). However, adding a FOREIGN KEY ... ON DELETE CASCADE constraint would provide database-level enforcement and protect against deletion paths that bypass app-level cleanup.

🔧 Proposed FK (apply via migration, then regenerate schema)
 CREATE TABLE `host_conditional_access` (
   `id` int unsigned NOT NULL AUTO_INCREMENT,
   `host_id` int unsigned NOT NULL,
   `bypassed_at` timestamp NULL DEFAULT NULL,
   `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   PRIMARY KEY (`id`),
-  UNIQUE KEY `idx_host_conditional_access_host_id` (`host_id`)
+  UNIQUE KEY `idx_host_conditional_access_host_id` (`host_id`),
+  CONSTRAINT `fk_host_conditional_access_host_id` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`id`) ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Comment thread ee/server/service/condaccess/idp.go
Comment thread server/service/devices.go
Comment thread server/service/integration_enterprise_test.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated
@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request implements a conditional access bypass feature for hosts. It introduces a new host_conditional_access database table with datastore operations to create and consume bypasses, adds a device-authenticated API endpoint to trigger bypasses, modifies the IdP authentication flow to check and consume stored bypasses instead of immediately redirecting, and includes comprehensive test coverage across datastore, service, and integration layers.

Changes

Cohort / File(s) Summary
Database Schema & Migrations
server/datastore/mysql/migrations/tables/20260119220029_CreateHostConditionalAccessTable.go, server/datastore/mysql/schema.sql
New host_conditional_access table with host_id (unique), bypassed_at timestamp, and standard audit timestamps; migration registration and schema DDL
Datastore Conditional Access Bypass
server/datastore/mysql/conditional_access_bypass.go, server/datastore/mysql/conditional_access_bypass_test.go
Three new operations: ConditionalAccessBypassDevice (insert/update), ConditionalAccessConsumeBypass (read+delete via transaction), ConditionalAccessClearBypasses; comprehensive test coverage for lifecycle, idempotency, and cascading deletes
Host Datastore Updates
server/datastore/mysql/hosts.go, server/datastore/mysql/policies_test.go
Host cleanup now references host_conditional_access table; ListPoliciesForHost now includes conditional_access_enabled column in returned policies
Fleet Interface Definitions
server/fleet/datastore.go, server/fleet/service.go
Three new datastore interface methods and one new service interface method: BypassConditionalAccess(ctx, host) error
Service Endpoint Implementation
server/service/devices.go, server/service/handler.go
New BypassConditionalAccess endpoint under /api/_version_/fleet/device/{token} path; handles bypass request and routes through service authorization checks
Enterprise Service Implementation
ee/server/service/devices.go
New BypassConditionalAccess method on Service that validates license, loads app config, sets bypass via datastore, and logs activity
IdP Session Flow
ee/server/service/condaccess/idp.go, ee/server/service/condaccess/idp_test.go
GetSession path now calls ConditionalAccessConsumeBypass before redirect decision; tracks bypass vs. no-bypass scenarios; test cases for bypass present/absent, consumption failures, and policy check interactions
App Configuration
server/service/appconfig.go
When Okta bypass settings change, ConditionalAccessClearBypasses is invoked to reset existing bypasses before recording the configuration update activity
Mock Infrastructure
server/mock/datastore_mock.go, server/mock/service/service_mock.go
Added mock function types and invocation tracking fields for all three datastore bypass methods and the service bypass method
Test Infrastructure
server/service/testing_client.go, server/service/integration_enterprise_test.go
Teardown now cleans up host_conditional_access table; integration tests validate bypass endpoint, IDP consumption flow, and policy interactions across enterprise scenarios

Sequence Diagram(s)

sequenceDiagram
    participant Device as Device<br/>(Enrolled Host)
    participant Service as Service<br/>(Devices Endpoint)
    participant DS as Datastore
    participant IdP as IdP<br/>(Okta/Azure)
    participant Session as Session<br/>Generator

    Device->>Service: POST /bypass_conditional_access<br/>(device token)
    Service->>Service: Extract host from token
    Service->>Service: Validate license
    Service->>DS: ConditionalAccessBypassDevice(host_id)
    DS->>DS: INSERT/UPDATE bypass timestamp
    DS-->>Service: OK
    Service->>Service: Create activity log
    Service-->>Device: 200 OK

    Note over Device,Session: Later: Device authenticates via IdP

    Device->>IdP: SAML authentication request
    IdP->>IdP: Verify credentials
    IdP->>Service: GetSession request (post-auth)
    Service->>DS: ConditionalAccessConsumeBypass(host_id)
    DS->>DS: BEGIN transaction
    DS->>DS: SELECT bypass timestamp<br/>(FOR UPDATE SKIP LOCKED)
    DS->>DS: DELETE bypass record
    DS-->>DS: COMMIT
    DS-->>Service: timestamp (or nil)

    alt Bypass exists
        Service->>Service: Log: bypass consumed
        Service->>Session: Proceed to session generation
        Session-->>IdP: Valid session
    else No bypass
        Service->>Service: Redirect to remediation
        Service-->>IdP: Remediation URL
    end

    IdP-->>Device: SAML response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • #35143 — Modifies conditional-access IdP implementation and device-health SSO session flow with bypass handling logic
  • #38453 — Adds bypass-disabled config field, related activity types, and appconfig handling for the conditional access bypass domain

Suggested reviewers

  • getvictor
  • mostlikelee
  • MagnusHJensen
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% 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 clearly summarizes the main change: implementing conditional access host bypass functionality.
Description check ✅ Passed The description addresses the main objective and includes checked boxes for validation, SQL safety, tests, and database migration verification requirements.
Linked Issues check ✅ Passed All objectives from #37280 are met: storage table created, device-authenticated endpoint added, bypass check/clear implemented during login, and bypass cleared on policy modification.
Out of Scope Changes check ✅ Passed All changes directly support the conditional access host bypass feature and the required fix for conditional_access_enabled in host policies, with no out-of-scope additions detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 37280-cond-access-host-snooze

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 and usage tips.

@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: 3

🤖 Fix all issues with AI agents
In `@server/service/devices.go`:
- Around line 500-512: In bypassConditionalAccessEndpoint, the error branch
returns the wrong response type (listDevicePoliciesResponse) which causes an
incorrect JSON structure; change the returned value in the missing-host error
case to bypassConditionalAccessResponse{Err: err} so both error branches in
bypassConditionalAccessEndpoint consistently return
bypassConditionalAccessResponse, keeping the function signature and existing
ctxerr.Wrap usage unchanged.

In `@server/service/integration_enterprise_test.go`:
- Around line 23409-23412: The test declares bypassResp and then calls
s.DoRawNoAuth(...) which does not unmarshal into bypassResp, so require.Nil(t,
bypassResp.Err) is meaningless; change the call to use s.DoJSON("POST",
"/api/v1/fleet/device/test-conditional-access-bypass-token/bypass_conditional_access",
nil, http.StatusOK, &bypassResp) so the response is decoded into bypassResp
before asserting require.Nil(t, bypassResp.Err), or alternatively remove the
require.Nil assertion and keep only the status-code check if you don't need to
inspect bypassResp.
- Around line 23486-23489: The test resets bypassResp to its zero value and then
calls s.DoRawNoAuth which does not populate it, so require.Nil(t,
bypassResp.Err) merely checks the zero value; change the test to let the HTTP
helper populate bypassResp and then assert on it: call s.DoRawNoAuth (or s.DoRaw
if that supports a destination) with &bypassResp as the response destination so
the JSON body from the POST to
"/api/v1/fleet/device/test-conditional-access-bypass-token/bypass_conditional_access"
is unmarshaled into bypassResp, then assert require.Nil(t, bypassResp.Err);
alternatively, if DoRawNoAuth cannot accept a destination, capture the response
body from s.DoRawNoAuth and json.Unmarshal into bypassResp before asserting.
🧹 Nitpick comments (1)
server/service/integration_enterprise_test.go (1)

23467-23468: Same issue: DoRawNoAuth doesn't verify response content.

This call also uses DoRawNoAuth without decoding the response. If the intent is to only verify the HTTP status code (200 OK), this is fine. However, for consistency with other bypass calls in this test (e.g., line 23522), consider using DoJSON to decode and verify the response.

Comment thread server/service/devices.go
Comment thread server/service/integration_enterprise_test.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated

@getvictor getvictor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a decent size change. Thanks for getting it working.

I made several comments. Some of the code feels AI-generated, since it doesn't follow our conventions. If so, please make sure to review the code carefully. Putting some of our conventions into agents.md or CLAUDE.md may help.

Comment thread ee/server/service/condaccess/idp.go Outdated
Comment thread ee/server/service/condaccess/idp.go Outdated
Comment thread ee/server/service/devices.go Outdated
Comment thread ee/server/service/devices.go Outdated
Comment thread ee/server/service/devices.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated
Comment thread server/service/integration_enterprise_test.go Outdated
@dantecatalfamo

Copy link
Copy Markdown
Member Author

Accidentally included a little bit of js from another branch

@dantecatalfamo

Copy link
Copy Markdown
Member Author

@getvictor Should be good to go now

@dantecatalfamo
dantecatalfamo merged commit a7dd392 into main Jan 26, 2026
48 checks passed
@dantecatalfamo
dantecatalfamo deleted the 37280-cond-access-host-snooze branch January 26, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Okta cond access: host snooze backend + activity

3 participants