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

Feature: Autolock #274

Closed
overheadhunter opened this issue May 26, 2016 · 22 comments · Fixed by #1603
Closed

Feature: Autolock #274

overheadhunter opened this issue May 26, 2016 · 22 comments · Fixed by #1603
Assignees
Labels
good first issue Issues easy to implement or with a narrow scope of changes type:feature-request New feature or request
Milestone

Comments

@overheadhunter
Copy link
Member

In the unlock screen, there should be the option to unlock a vault only for a certain amount of time. E.g. by using a SplitMenuButton (same as the "Lock" button) and offer some predefined time periods such as "Unlock for 30 Minutes".

@overheadhunter overheadhunter added the type:feature-request New feature or request label May 26, 2016
@overheadhunter overheadhunter added this to the Backlog milestone May 26, 2016
@tobihagemann
Copy link
Member

Is it feasible to offer this only with inactivity? Similar to a screen saver. Not sure how this will impact performance, but activity could be measured by "is the filesystem accessing the drive".

@overheadhunter
Copy link
Member Author

Ack. Filesystem I/O activity is measured anyway and doesn't influence performance.

@RiseT
Copy link

RiseT commented Jul 9, 2016

I'd like to add:

Optional vault auto-locking when...

  • the OS's lock screen comes up
  • system switches into Sleep or Hibernate mode

@markuskreusch markuskreusch changed the title Autolock Feature: Autolock Oct 7, 2016
@overheadhunter
Copy link
Member Author

Might be of interest: com.apple.eawt.AppEvent.ScreenSleepEvent.

@Riajyuu
Copy link

Riajyuu commented Sep 4, 2018

I want #6 a bit more: auto lock after certain time of inactivity.
But for this app, it is not a password manager or sth like that.
So this feature is not that urgent tough useful in some cases.

@pascalandy
Copy link

+1
I keep forgetting about it.

This will be the perfect setup along using Bitwarden :-p

@Quameda
Copy link

Quameda commented Apr 13, 2020

+1

@DimiTech
Copy link

DimiTech commented May 1, 2020

This would be an awesome thing to have 👍

@t4087
Copy link

t4087 commented May 18, 2020

I really would like to see this. Or even closing the app via powershell script without force closing it would be nice (for the purpose of locking). Tbh, even having the "lock" button seems archaic. Ppl be lazy. Where the app is a security tool, it really would be amazing. If you prefer to add it as a "donate to use" feature like dark mode? I'm on board. As long as it isn't recurring. :) I've been looking to donate anyhow. Not that not having this feature will stop me from doing so, but I mean.... might happen sooner than later. Amazing app, thank you!

@samsaraswheel
Copy link

samsaraswheel commented May 27, 2020

Was about to log a new one on this but saw this already open. Also for supporting this option.

Running Linux Mint 19.3
Cryptomator 1.5.4 appimage

My question is in the meantime...is there currently a command line option available to do a graceful unmount/shutdown of Cryptomator?

e.g. the similarity of ... cryptomator -shutdown -force or cryptomator -dismount

For the user purposes of doing a custom scheduled cron script or init.d graceful shutdown script in the interim.
Reason being I currently have lots of hs_err_pidxxxx error logs when normally shutting down the pc with a Cryptomator mount still open. But no problems with a manual unmount before hand. Will log later if needed on further investigation, could be just my system at this stage.

@infeo
Copy link
Member

infeo commented May 29, 2020

is there currently a command line option available to do a graceful unmount/shutdown of Cryptomator?

No. If you want to use the command line, look at cryptomator/cli.

@infeo infeo modified the milestones: Backlog, 1.x May 29, 2020
@shaiguitar
Copy link

shaiguitar commented Jun 7, 2020

Bumping this one again too. If there's a PR in the works, and/or any direction of how this would be implemented, happy to take a stab at it. Specifically, I think on-sleep/hibernate is a good use-case of auto locking and one that I would definitely use.

@visnetje
Copy link

visnetje commented Jan 3, 2021

+1

@infeo infeo added the good first issue Issues easy to implement or with a narrow scope of changes label Jan 12, 2021
@BeyerMart
Copy link
Contributor

To summarize the requested Unlock Options:

  1. Same behavior as before. (Do not lock while Cryptomator is running and Lock Vault is not performed)
  2. Lock after x amount of minutes (ToDo decide hard cap 30 Minutes or user input)
  3. Lock when the system goes into Sleep / Hibernate / System Lockscreen (Depending on used OS)

@BeyerMart BeyerMart self-assigned this Feb 23, 2021
@BeyerMart
Copy link
Contributor

I was also thinking about adding these locking functions not just on the unlock (a locked vault) screen, but also at the lock (an unlocked vault) screen.
So another SplitMenuButton like this:
image

@overheadhunter
Copy link
Member Author

Just to discuss alternatives: Instead of "lock in x min", in everyday use "lock when idle for x min" might be more useful?

Also, we should find a better term that describes all of sleep, screen saver, OS lock screen, etc.

@tobihagemann
Copy link
Member

Some inspiration from 1Password:

Screen Shot 2021-02-24 at 10 55 50

I think that auto-lock should be a "passive" setting. Making it an "active" setting (or action), you have to consider a lot more things: Can the "delayed" action be aborted? How do we see in which state the auto-lock is currently in?

@BeyerMart
Copy link
Contributor

BeyerMart commented Feb 24, 2021

Thanks for your input.
With that, I created the following UI as a separate Tab in the Vault Options.
image

Obviously, the last two lines should be in one, as in @tobihagemann 's screenshot. I really like that.

But having the Textfield "in" the checkbox might be quite tricky.
One could put everything into an HBox like:

<HBox>
	<CheckBox text="%vaultOptions.autoLock.lockAfterIdleTime" fx:id="lockAfterIdleTimeCheckbox"/>
	<TextField fx:id="lockIdleTimeInMinutesTextField"/>
	<FormattedLabel format="minutes"/>
</HBox>

But I am not completely happy with this, as clicking on the latter "minutes" does not change the state of the checkbox.
image

Further development takes place in this branch

@overheadhunter
Copy link
Member Author

But I am not completely happy with this, as clicking on the latter "minutes" does not change the state of the checkbox.

Maybe you can use <TextFlow> to encapsulate multiple elements that should be displayed in one line. This has already been used in other places like in the "Welcome" view:

<TextFlow styleClass="text-flow" prefWidth="-Infinity" visible="${controller.noVaultPresent}" managed="${controller.noVaultPresent}">
<Text text="%main.vaultDetail.welcomeOnboarding"/>
<Text text=" "/>
<Hyperlink text="docs.cryptomator.org" styleClass="hyperlink-underline" onAction="#visitGettingStartedGuide"/>
</TextFlow>

Keep in mind though, that this can be tricky during localization:

  • "Lock when idle for [ ] minutes"
  • "Nach [ ] Minuten Inaktivität sperren"

@BeyerMart
Copy link
Contributor

To use the integrations-api correctly I was thinking of the cryptomator code first.
I would like to have one "SystemState" Listener instead of a solution per Vault.

With each change in the SystemState (Enum with ACTIVE, SLEEP, LOCKSCREEN, SCREENSAVER;) I will look at each vault and check if the respective Setting to the newSystemState is True

private void systemInterfaceStateChanged(SystemState systemState) {
vaultListManager.getVaultList().forEach(vault -> {
switch (systemState) {
case SLEEP -> {
if (vault.getVaultSettings().lockOnSleep().get()) {
try {
vault.lock(true);
} catch (Volume.VolumeException e) {
e.printStackTrace();
}
}
}

Does this look like a good approach? @overheadhunter

@BeyerMart
Copy link
Contributor

For the SleepEvent I found this Listener Interface from awt, but do not think of using it.

@zchap26

This comment has been minimized.

@BeyerMart BeyerMart linked a pull request Mar 29, 2021 that will close this issue
@overheadhunter overheadhunter modified the milestones: 1.x, 1.6.0 Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues easy to implement or with a narrow scope of changes type:feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.