Skip to content

fix: DomainValidationStatus.FAILED_TO_VERIFY, DevicePostureChecks.include typing, ApplicationGrantsIT CI fix - #1700

Merged
prachi-okta merged 2 commits into
masterfrom
fix/oig-domain-validation-and-device-posture
Jul 21, 2026
Merged

fix: DomainValidationStatus.FAILED_TO_VERIFY, DevicePostureChecks.include typing, ApplicationGrantsIT CI fix#1700
prachi-okta merged 2 commits into
masterfrom
fix/oig-domain-validation-and-device-posture

Conversation

@prachi-okta

@prachi-okta prachi-okta commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Issue(s)

  • OKTA-1226428 - DomainValidationStatus missing FAILED_TO_VERIFY enum constant
  • OKTA-1221543 - DevicePostureChecks.include typed List<String> instead of a proper structured type

Description

1. DomainValidationStatus missing FAILED_TO_VERIFY (P0)

The Okta API returns "validationStatus": "FAILED_TO_VERIFY" in domain responses (e.g. GET /api/v1/domains/{domainId}), but the SDK enum only declared COMPLETED, IN_PROGRESS, NOT_STARTED, VERIFIED. Jackson deserialization fell through to UNKNOWN_DEFAULT_OPEN_API via READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, silently losing the original value. Added the missing constant to src/swagger/api.yaml.

2. DevicePostureChecks.include typed as List<String> (P0)

DevicePostureChecks.include had no items type in the spec - just an example - so the generator defaulted to List<String>, while the real API shape is a list of {variableName, value} pairs. Added a new DevicePostureCheckMapping schema and typed include as List<DevicePostureCheckMapping>.

3. CI fix: ApplicationGrantsIT non-existent-grant tests

Observed on master post-merge (unrelated to #1699's actual changes - a pre-existing latent test bug that CI happened to hit): testGetNonExistentGrantError/testRevokeNonExistentGrantError already acknowledge a 500/501 response as "OAuth grants not available" via an outer catch block, but that only covers exceptions thrown outside the inner try/catch. When getScopeConsentGrant/revokeScopeConsentGrant themselves returned 500, the exception was caught into the local exception variable and then failed the "should return 404" assertion instead of being recognized as the same acknowledged case. Applied the same 500/501 check to that inner exception in both tests.

Category

  • Bugfix
  • Enhancement
  • New Feature
  • Library Upgrade
  • Configuration Change
  • Versioning Change
  • Unit or Integration Test(s)
  • Documentation

Signoff

  • I have submitted a CLA for this PR (N/A - internal Okta contributor)
  • Each commit message explains what the commit does
  • I have updated documentation to explain what my PR does
  • My code is covered by tests if required
  • I did not edit any automatically generated files

…cePostureChecks.include typing

- DomainValidationStatus was missing FAILED_TO_VERIFY, a real value the
  Okta API returns for domain validation responses. Without it,
  Jackson fell back to UNKNOWN_DEFAULT_OPEN_API and the original value
  was lost. (OKTA-1226428)
- DevicePostureChecks.include had no items type in the spec, so the
  generator defaulted to List<String> while the real shape is a list
  of {variableName, value} pairs. Added a DevicePostureCheckMapping
  schema and typed include as List<DevicePostureCheckMapping>.
  (OKTA-1221543)

Co-Authored-By: Claude Code
…ant as feature-unavailable

testGetNonExistentGrantError / testRevokeNonExistentGrantError already
had an outer catch acknowledging 500/501 as "OAuth grants not
available", but that only covered exceptions thrown outside the inner
try/catch. When the grant call itself returned 500 (observed in CI on
master post-merge, ApplicationGrantsIT.testGetNonExistentGrantError),
it was caught into the local `exception` variable and then failed the
"should return 404" assertion instead of being recognized as the same
acknowledged case. Apply the same 500/501 check to that inner
exception.

Co-Authored-By: Claude Code
@prachi-okta
prachi-okta requested a review from aniket-okta July 21, 2026 08:36

@aniket-okta aniket-okta left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 🚀

@prachi-okta
prachi-okta merged commit 2dee8e4 into master Jul 21, 2026
8 checks passed
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.

2 participants