Skip to content

[keystore_cli] parse values as JSON before adding to keystore#80848

Merged
spalger merged 1 commit intoelastic:masterfrom
spalger:implement/keystore-json-support
Oct 16, 2020
Merged

[keystore_cli] parse values as JSON before adding to keystore#80848
spalger merged 1 commit intoelastic:masterfrom
spalger:implement/keystore-json-support

Conversation

@spalger
Copy link
Copy Markdown
Contributor

@spalger spalger commented Oct 16, 2020

Fixes #80840

We realized kinda late that we've been recommending people set the rotation keys for saved object encrypted attributes in the keystore, but the keystore CLI doesn't actually support setting non-string values. This adds a step to the keystore CLI that tries to parse values as JSON and sets the parsed value in the keystore if it parses successfully. This is the same strategy we use on the Kibana CLI so I expect it will be expected by users, and if anyone wants to force a value as a string they just need to double wrap it in quotes so it parses as a JSON representation of a string.

@spalger spalger added Team:Operations Kibana-Operations Team release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v7.11.0 labels Oct 16, 2020
@spalger spalger requested a review from a team as a code owner October 16, 2020 15:27
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger requested a review from marius-dr October 16, 2020 15:29
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

@spalger spalger merged commit 7adfcd8 into elastic:master Oct 16, 2020
@spalger spalger deleted the implement/keystore-json-support branch October 16, 2020 20:41
spalger added a commit to spalger/kibana that referenced this pull request Oct 16, 2020
…c#80848)

Co-authored-by: spalger <spalger@users.noreply.github.com>
spalger added a commit to spalger/kibana that referenced this pull request Oct 16, 2020
…c#80848)

Co-authored-by: spalger <spalger@users.noreply.github.com>
spalger added a commit that referenced this pull request Oct 16, 2020
#80917)

Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
spalger added a commit that referenced this pull request Oct 16, 2020
#80916)

Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 19, 2020
* master: (43 commits)
  [ML] Transforms: Fix tab ids for expanded row. (elastic#80666)
  server logs config paths to use for runner (elastic#52980)
  Fix audit logger logging to console even when disabled (elastic#80928)
  skip flaky suite (elastic#80929)
  Added Enterprise Search config to kibana-docker (elastic#80872)
  skip flaky suite (elastic#80914)
  [keystore_cli] parse values as JSON before adding to keystore (elastic#80848)
  [Ingest Manager] Fix for comparing versions with -SNAPSHOT suffix (elastic#80742)
  ECS audit logging (elastic#74640)
  [Uptime] Add client-side unit tests for remaining synthetics code (elastic#80215)
  [Security_Solution][Resolver] Promote z-index on node labels (elastic#80854)
  Move renderHeaderActions back into mount useEffect + update tests (elastic#80861)
  [Reporting] Document Network Policy configuration (elastic#80431)
  [Reporting] Add contextual documentation for CSV Max Bytes setting (elastic#80782)
  Add catch for Enterprise Search sending back a 401 response instead of redirect (elastic#80757)
  [Actions] Back Button on Add Connector Flyout (elastic#80160)
  removing `kibana_datatable` in favor of `datatable`  (elastic#80548)
  [Alerting UI] Updating 'Add new' wording (elastic#80509)
  [Docs] Document Encrypted Saved Objects functionality. (elastic#80183)
  [Discover] fix auto-refresh (elastic#80635)
  ...
@marius-dr
Copy link
Copy Markdown
Member

Finally figured out what I was doing wrong on my side. LGTM on windows.

gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 19, 2020
* master: (23 commits)
  [ML] Transforms: Fix tab ids for expanded row. (elastic#80666)
  server logs config paths to use for runner (elastic#52980)
  Fix audit logger logging to console even when disabled (elastic#80928)
  skip flaky suite (elastic#80929)
  Added Enterprise Search config to kibana-docker (elastic#80872)
  skip flaky suite (elastic#80914)
  [keystore_cli] parse values as JSON before adding to keystore (elastic#80848)
  [Ingest Manager] Fix for comparing versions with -SNAPSHOT suffix (elastic#80742)
  ECS audit logging (elastic#74640)
  [Uptime] Add client-side unit tests for remaining synthetics code (elastic#80215)
  [Security_Solution][Resolver] Promote z-index on node labels (elastic#80854)
  Move renderHeaderActions back into mount useEffect + update tests (elastic#80861)
  [Reporting] Document Network Policy configuration (elastic#80431)
  [Reporting] Add contextual documentation for CSV Max Bytes setting (elastic#80782)
  Add catch for Enterprise Search sending back a 401 response instead of redirect (elastic#80757)
  [Actions] Back Button on Add Connector Flyout (elastic#80160)
  removing `kibana_datatable` in favor of `datatable`  (elastic#80548)
  [Alerting UI] Updating 'Add new' wording (elastic#80509)
  [Docs] Document Encrypted Saved Objects functionality. (elastic#80183)
  [Discover] fix auto-refresh (elastic#80635)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v7.10.0 v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kibana-keystore doesn't support Array fields

5 participants