Skip to content

Encrypted saved-object attributes cause issues for import/export #82086

@kobelb

Description

@kobelb

Encrypted saved-object attributes were originally implemented to store end-user provided secrets that only needed to be consumed by the Kibana server. Since the secrets are only consumed by the Kibana server, we intentionally prevented them from being disclosed to end-users because they contain sensitive information. For example, Alerting's connectors store credentials for third-party services, and even though we allow them to be provided via Kibana's UI, we didn't want to disclose them to other end-users who should only be consuming the configured connector.

Since their original implementation, a change was made to allow the developer to opt-out of this protection and allow the secrets to be retrieved by end-users. In those situations, there aren't any complications with import/export. However, we still have quite a few situations where the attributes are being stripped from the responses.

When the encrypted saved-object attributes are excluded from the responses, this causes complications for import/export. When a user exports one of these saved-objects, the encrypted attributes are excluded from the response and this will cause complications on import.

Potential Solution

Import the saved-objects without these attributes

If we allow the saved-objects to be imported without these attributes, it can cause complications within the consuming code because the code must accommodate for the fact that these attributes are undefined. This can also convey the wrong message to our users, and make them think that the import was completed successfully and there's nothing else that needs to be done. Any functionality that is dependent on the existence of these attributes will continue to fail until the end-user re-provides the secrets. For example, Alerting's actions will fail to execute until the user specifies the credentials for the third-party services.

Prompt the user to provide the secrets on import

During the import process, we can detect when there are encrypted attributes that are missing and prompt the end-user to provide these credentials. However, the import process is already rather complicated, so adding another step potentially makes this process even more confusing.

Include the attributes in the export

We currently exclude the encrypted attributes from all saved-object operation responses. It's possible for us to only include these secrets from the export operation. We already have a "Saved-Object Management" feature that we could use to provide this elevated level of access. However, we'll want to make sure that we aren't violating the end-users expectations of secrecy by doing so.

Use-case specific import/export

It's also possible for us to not try to solve this at that platform level, and require a use-case specific import/export. This would allow the consumers of encrypted saved-object attributes to make this decision and implement one of the aforementioned solutions, or one we haven't outlined yet. This would create a rather fragmented experience, and make it difficult for end-users to import/export all of their saved-objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions