Closed LennardF1989 closed 1 year ago
this-device
command shows persistent login status for the account.
My Vault> this-device
Device Name: Commander C#
Client Version: Commander 16.5.0
Data Key Present: True
IP Auto Approve: False
Persistent Login: True
Logout Timeout: 1 hour(s)
Biometric Login: False
Available sub-commands: rename, register, persistent_login, ip_disable_auto_approve, timeout, bio
It shows that persistent login is enabled for the account.
Logout timeout is 1 hour.
`this-device persistent_login on` enables persistent login feature for an account
`this-device register` sets up persistent for device (or config.json)
`this-device timeout 1440` sets logout timeout (in minutes) to 1 day (it is enough to connecting every 12 hours)
Only one device can use persistent login feature. Any attempt to login from the another device automatically cancels existing persistent login connection.
Please use the latest .Net Commander build. https://github.com/Keeper-Security/keeper-sdk-dotnet/releases/tag/v1.0.5-beta07 It has persistent login bug fixed.
I'm running of master, did the commands, this-device shows things as I want them, but every time I restart the Commander, it will ask for a SSO token.
How can I check if my enterprise has persistent login disabled? When I go into the vault I can freely check/uncheck "Remain logged in", the only thing that's required is the logout timer (which has a maximum of 480 minutes, so 8 hours),
Okay, apparently _auth.ResumeSession
has to be set to true in Commander through LoginOptions
, then it works.
So, just to be sure, ResumeSession = true, if used within the Timeout window, will keep the account logged in indefinitely?
@sk-keeper A workaround to start properly is to set last_login
to username@tld.com --resume --alt
in the config.json for example, but it only works once, because after exiting the config.json is updated again without these parameters.
I would like to propose to also persist ResumeSession and AlternatePassword in the config.json, so that information can be used when the login
command is queued in NotConnectedCommands
.
Right now there appears to be no way to start Commander and resume an old session other than canceling to auto-queued login command, and then redo it with the right commands Doesn't work, because the session will get revoked and you will have to re-login.
EDIT:
My current fix is in StoreConfigurationIfChangedV3
in LoginV3Extensions
:
var lastLoginArray = new List<string>
{
auth.Username
};
if (auth.AlternatePassword)
{
lastLoginArray.Add("--alt");
}
if (auth.ResumeSession)
{
lastLoginArray.Add("--resume");
}
var lastLogin = string.Join(" ", lastLoginArray);
if (string.CompareOrdinal(auth.Storage.LastLogin ?? "", lastLogin) != 0)
{
auth.Storage.LastLogin = lastLogin;
}
How the above would then work is that the first time you login you pass the right arguments along (eg. --resume
) and it will be persisted for future runs.
To break out of the last-login cycle is to type cancel
, then username@tld.com --resume --alt
, fill out the information and type q
to quit. Next time you run Commander, it will pass --resume --alt
to the argument parser, and resume the session properly.
I renamed this issue accordingly.
So, just to be sure, ResumeSession = true, if used within the Timeout window, will keep the account logged in indefinitely?
Yes, that is correct
Sorry. The latest changes in release_1.0.5_beta07
branch was not been pushed to master branch.
https://github.com/Keeper-Security/keeper-sdk-dotnet/commit/a6003b81ad6db2d370a8e0ffa3f4f42b30674053
Thank you for pointing it out.
Hello,
I want to use the SDK to automate some administrative tasks. One thing I'm playing with is to allow users to request access to shared folders through an internal web portal. My support team should then be able audit the request and provide access with the press of a button.
Obviously, security for Keeper is tight and you need to jump through some hoops to talk to the API. In order to do the above, I need some sort of persistent login, otherwise my support team will constantly have to re-login the web application, and that kind of defeats the point of the whole idea.
So, in order to achieve persistent login:
Thanks!