{"record":{"id":"478f5b278aadfeaa","repo":"passbolt/passbolt_api","slug":"invalid-provider-data-expected-pingone-settings","errorCode":null,"errorMessage":"Invalid provider data. Expected PingOne settings.","messagePattern":"Invalid provider data\\. Expected PingOne settings\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"plugins/PassboltEe/Sso/src/Service/Sso/PingOne/SsoPingOneService.php","lineNumber":69,"sourceCode":"                'environmentId' => $data->environment_id,\n                'emailClaim' => $data->email_claim,\n            ],\n            ['httpClient' => $this->getCustomHttpClient()]\n        );\n    }\n\n    /**\n     * @return \\Passbolt\\Sso\\Model\\Dto\\SsoSettingsDto\n     */\n    protected function assertAndGetSsoSettings(): SsoSettingsDto\n    {\n        try {\n            $ssoSettings = (new SsoSettingsGetService())->getActiveOrFail(true);\n            if ($ssoSettings->provider !== SsoSetting::PROVIDER_PINGONE) {\n                throw new BadRequestException(__('Invalid provider. Expected PingOne.'));\n            }\n            if (!($ssoSettings->data instanceof SsoSettingsPingOneDataDto)) {\n                throw new BadRequestException(__('Invalid provider data. Expected PingOne settings.'));\n            }\n        } catch (Exception $exception) {\n            throw new BadRequestException(__('No valid SSO settings found.'), 400, $exception);\n        }\n\n        return $ssoSettings;\n    }\n}\n","sourceCodeStart":51,"sourceCodeEnd":78,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/Sso/src/Service/Sso/PingOne/SsoPingOneService.php#L51-L78","documentation":"Thrown by SsoPingOneService::assertAndGetSsoSettings when provider is pingone but settings `data` is not a SsoSettingsPingOneDataDto, i.e. the stored payload lacks valid PingOne fields (environment id, client id/secret, etc.).","triggerScenarios":"sso_settings provider='pingone' whose data hydrates to a different provider's DTO, caused by inconsistent updates changing provider without the matching data, corrupt entries, or legacy data not mapping to the PingOne DTO.","commonSituations":"Partial migration where only the provider field was changed; database restore combining mismatched provider/data; manual row edit; upgrade changed DTO hydration and old payloads no longer instantiate SsoSettingsPingOneDataDto.","solutions":["Re-save PingOne SSO settings via the admin UI/API to rebuild the data payload as PingOne settings","Inspect the sso_settings data column for PingOne keys (environment_id, client_id, client_secret) and repair corrupt rows","Check provider-to-DTO mapping in the settings hydration service after version upgrades","Change provider and data payload together in one settings update"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"$settings = (new SsoSettingsGetService())->getActiveOrFail(true);\nif (!($settings->data instanceof SsoSettingsPingOneDataDto)) {\n    throw new BadRequestException(__('PingOne settings data is invalid; re-save the settings.'));\n}","typeGuard":"if (!($ssoSettings->data instanceof SsoSettingsPingOneDataDto)) {\n    return null;\n}","tryCatchPattern":"try {\n    $settings = $pingOneService->assertAndGetSsoSettings();\n} catch (BadRequestException $e) {\n    // prompt re-save of PingOne settings to rebuild the payload\n}","preventionTips":["Update provider and PingOne data payload in a single settings submission","Verify DTO hydration mapping after upgrades","Do not modify sso_settings rows by hand"],"tags":["sso","pingone","settings-data","type-mismatch"],"backgroundTag":"type-mismatch","analyzedSha":"31c1bbc10f32808a607fa9bd81891e898779c0bc","analyzedAt":"2026-09-17T00:04:38.960Z","contentChangedAt":"2026-09-17T00:04:38.960Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}