[Saved Objects] Allow saved object owners to set encrypted fields during creation without a fake request #209413
Labels
Feature:Saved Objects
Feature:Security/Encrypted Saved Objects
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
The savedObjectsRepository does not currently support field encryption when creating saved objects using a scoped client
The workaround, using a fakeRequest, is the only alternative, for example:
kibana/x-pack/platform/plugins/shared/fleet/server/services/agent_policy_watch.ts
Lines 49 to 59 in 092c2cd
kibana/x-pack/solutions/security/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts
Lines 56 to 66 in 092c2cd
kibana/x-pack/solutions/security/plugins/security_solution/server/endpoint/lib/policy/telemetry_watch.ts
Lines 52 to 62 in 092c2cd
Ideally, there should be a way for a third party to access the SO service's extensions to pass in (currently private without accessors).
Alternatives:
soStart.getInternalClient
function to the start contractsavedObjects.createInternalRepository({ withExtensions: true })
orsavedObjects.createInternalRepository({ withExtensions: ['encryptedSavedObjects'] })
The text was updated successfully, but these errors were encountered: