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

Session Refresh does not update StartTime and TimeOfDeath #253

Closed
miked1313 opened this issue Nov 16, 2021 · 2 comments
Closed

Session Refresh does not update StartTime and TimeOfDeath #253

miked1313 opened this issue Nov 16, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@miked1313
Copy link

miked1313 commented Nov 16, 2021

Verified issue does not already exist?

Yes

What error did you receive

Functions that require -TssSession throw error Authentication failed or expired token

Please run the command using -Verbose

N/A you can't run Verbose on $session.SessionRefresh()

Provide a test case or steps to reproduce

$global:session = New-TssSession -SecretServer https://vault.company/SecretServer -Credential $cred
$global:session

Wait 20+ minutes if the Secret Server instance defaults to a 20 minute session timeout

$global:session.SessionRefresh()
$global:session

Observe that StartTime and TimeOfDeath is not updated after you run $global:session.SessionRefresh()

$global:session.IsValidToken() is also $false and should be $true

Expected behavior

StartTime and TimeOfDeath is updated to the new values after refreshing a session token and IsValidToken() should return an accurate $true if the token is valid. The TimeOfDeath timestamp is important for checking for token expiration and being able to renew it prior to it expiring. I have a custom Get-Session function which checks/renews and if needed will create a brand new session and prompt for credentials.

What Edition of Secret Server?

Professional

What version of Secret Server

11.0

What PowerShell host was used when producing this error

PowerShell Core (pwsh)

PowerShell Host Version

Name                           Value
----                           -----
PSVersion                      7.1.5
PSEdition                      Core
GitCommitId                    7.1.5
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@miked1313 miked1313 added bug Something isn't working triage needed new issues that are still in state of triage labels Nov 16, 2021
@wsmelton wsmelton removed the triage needed new issues that are still in state of triage label Nov 17, 2021
@miked1313
Copy link
Author

miked1313 commented Nov 18, 2021

@wsmelton Thank you for fixing this. Do you know when it will be released?

@wsmelton
Copy link
Contributor

Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants