Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keychain prompt opening after idling #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blarfoon
Copy link

After leaving the connection unused for 5 minutes (presumably that's the OS default for new keychains) the keychain locks and prompts the user to unlock, however there is a random password set and it can never be unlocked. To fix this we set the keychain to never lock.

After leaving the connection unused for 5 minutes (presumably that's the OS default for new keychains) the keychain locks and prompts the user to unlock, however there is a random password set and it can never be unlocked.
To fix this we set the keychain to never lock.
.password(&random_password()?)
.create(dir.path().join("identity.keychain"))?;

keychain.set_settings(&KeychainSettings::default())?;
Copy link
Owner

Choose a reason for hiding this comment

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

Is the keychain not initialized with default settings?

Copy link
Author

Choose a reason for hiding this comment

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

Apparently not, not on my macbook v. 14.3, but I also got reports from my users using all different kind of macOS versions

Copy link
Owner

Choose a reason for hiding this comment

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

Can you put together a test that shows the bad behavior? It's fine if it needs to sleep for 5 minutes or whatever - I just want to do some investigating.

Copy link
Author

Choose a reason for hiding this comment

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

We have an internal test for this, give me a few days to put together a public one

@Rigidity
Copy link

Running into this as well. Is there any workaround? On MacOS my app will prompt for the "Identity keychain" after a while idling, and it's not even the user password.

@blarfoon
Copy link
Author

blarfoon commented Sep 3, 2024

We temporarily fixed it by using our own fork and patching it ourselves.

gorilla-devs@3060300

Sadly I don't have the time currently to dig further into the issue or add tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants