Skip to content

feat: expose safestorage backend information on linux - #38873

Merged
codebytere merged 2 commits into
mainfrom
robo/expose_oscrypt_backend
Jul 13, 2023
Merged

feat: expose safestorage backend information on linux#38873
codebytere merged 2 commits into
mainfrom
robo/expose_oscrypt_backend

Conversation

@deepak1556

Copy link
Copy Markdown
Member

Description of Change

It is currently not possible to determine why encryption is not available on Linux at runtime (i-e) which backend was attempted to be initialized. It is possible to get these information via --vmodule="*/components/os_crypt/*=1" but having the information at runtime would be helpful for applications to surface better error to users. The PR introduces two new API

  1. safeStorage.getSelectedStorageBackend() to retrieve the preferred storage backend information
  2. safeStorage.setUsePlainTextEncryption(usePlainText) to allow using the weaker plain text password for the encryption key, can be used as default when no storage backends are available on Linux.

Checklist

Release Notes

Notes: Add safeStorage.setUsePlainTextEncryption and safeStorage.getSelectedStorageBackend api

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Jun 21, 2023
@deepak1556 deepak1556 added api-review/requested 🗳 semver/minor backwards-compatible functionality target/24-x-y PR should also be added to the "24-x-y" branch. target/25-x-y PR should also be added to the "25-x-y" branch. labels Jun 21, 2023

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

API LGTM

@zcbenz zcbenz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

API LGTM

@jkleinsc

jkleinsc commented Jul 5, 2023

Copy link
Copy Markdown
Member

@deepak1556 the Windows test failures seem to be caused by this PR.

@deepak1556

Copy link
Copy Markdown
Member Author

Hmm that should be unlikely since the changes are guarded for linux. Let me rebase on latest main

@deepak1556
deepak1556 force-pushed the robo/expose_oscrypt_backend branch from cfad7bb to 6e1e0ac Compare July 11, 2023 05:05
@codebytere

Copy link
Copy Markdown
Member

@codebytere
codebytere requested a review from jkleinsc July 11, 2023 21:28

@codebytere codebytere left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

API LGTM

@codebytere
codebytere merged commit 34e7c36 into main Jul 13, 2023
@codebytere
codebytere deleted the robo/expose_oscrypt_backend branch July 13, 2023 09:14
@release-clerk

release-clerk Bot commented Jul 13, 2023

Copy link
Copy Markdown

Release Notes Persisted

Add safeStorage.setUsePlainTextEncryption and safeStorage.getSelectedStorageBackend api

@trop

trop Bot commented Jul 13, 2023

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "25-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot removed the target/25-x-y PR should also be added to the "25-x-y" branch. label Jul 13, 2023
@trop

trop Bot commented Jul 13, 2023

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "24-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/25-x-y needs-manual-bp/24-x-y and removed target/24-x-y PR should also be added to the "24-x-y" branch. labels Jul 13, 2023
@miniak

miniak commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

/trop run backport-to 26-x-y

@trop

trop Bot commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

The backport process for this PR has been manually initiated - sending your PR to 26-x-y!

@trop

trop Bot commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "26-x-y", please check out #39107

@trop trop Bot added in-flight/26-x-y merged/26-x-y PR was merged to the "26-x-y" branch. and removed in-flight/26-x-y labels Jul 14, 2023
@codebytere codebytere removed the merged/26-x-y PR was merged to the "26-x-y" branch. label Jul 19, 2023
@codebytere

Copy link
Copy Markdown
Member

/trop run backport-to 26-x-y

@trop

trop Bot commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

The backport process for this PR has been manually initiated - sending your PR to 26-x-y!

@trop

trop Bot commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "26-x-y", please check out #39155

@trop

trop Bot commented Aug 2, 2023

Copy link
Copy Markdown
Contributor

@deepak1556 has manually backported this PR to "25-x-y", please check out #39325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review/approved ✅ merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. semver/minor backwards-compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants