Devolutions no longer works with Key and secret after update- not working after updating to latest version of Powershell 2022.1.10

Devolutions no longer works with Key and secret after update- not working after updating to latest version of Powershell 2022.1.10

avatar

Hi all,

Our company uses Devolutions Password Server. Out IT department recently updated from the base October version of DPS to a custom version: 2022.1.9.999

After the update our Secret and key no longer work with the PS module. Instead I just get invalid user errors.

I think it probably has something to do with the update.

Any help would be much appreciated!

Thanks,
Brian Ormond

All Comments (36)

avatar

Oops! looks like this is a duplicate of another thread. I am testing the new code now.

Thanks!

avatar

Okay it looks like the latest version of the Powershell isn't working. I'm still getting the same error as the person in the other thread:

forum image

I may put in a support ticket per our DVLS admin's recommendation

avatar

Hello Brian,

Could you try the following, it should be able to connect?

$DS_URL= 'https://server/dvls'
$appSecret = 'longkey' 
$appKey = 'key' 

[securestring]$Password = ConvertTo-SecureString $appSecret -AsPlainText -Force
[pscredential]$Credential = New-Object System.Management.Automation.PSCredential ($appKey, $Password)
New-DSSession $Credential $DS_URL


Best regards,

Richard Boisvert

avatar

Hi I ran the following commands:
forum image

avatar

okay let me try

avatar

Hi I pasted your commands from above into my test script and changed the appropriate values to be able to access our vault with the result:
forum image

avatar

Seems like maybe it could be due to our custom version of Password Server being 2022.1.9 based, what is your opinion?

avatar

Hello Brian,

It depends on what build your custom version is based upon. If PowerShell module version 2022.1.10.0 doesn't work for you, please try the previous release:

Install-Module -Name Devolutions.Server -RequiredVersion 2021.6.4


I believe your custom version does not include the changes made to login parameters. If that's the case, PowerShell module version 2021.6.4 should work for you.

Thank you,

Alexandre Martigny

avatar

I'll try that previous version thanks!

avatar

No Dice:
forum image

We are using 2022.1.9.999

avatar

Hello Brian,

I just realized we are missing an important parameter for the login to work.

$DS_URL= 'https://server/dvls'
$appSecret = 'longkey' 
$appKey = 'key' 

[securestring]$Password = ConvertTo-SecureString $appSecret -AsPlainText -Force
[pscredential]$Credential = New-Object System.Management.Automation.PSCredential ($appKey, $Password)
New-DSSession $Credential $DS_URL -AsApplication


Notice the "AsApplication" flag parameter. I have no real way of differentiating a user from an application before login, hence this switch parameter.

Please try again with the flag parameter. Since we can't be sure of what build your custom version was based upon (x.x.x.999 is for custom version, not a real build number), you might have to try again on both versions previously mentioned.

Thank you,

Alexandre Martigny

avatar

okay will do!

avatar

Hi,
I tried it with both 2021.16.4 and 2022.1.10

Both are giving me the invalid credentials error.

avatar

Hello Brian,

This issue will need further testing. I'm currently in a meeting, I'll come back to you as soon as possible after testing on various builds.

Meanwhile, you could try with a newly generated application key/secret key and see if the pair works.

Best regards,

Alexandre Martigny

avatar

Hello Brian,

Since we are unable to reproduce your issue, would it be possible to upgrade your Devolutions Server instance to 2022.1.10? The fix in the .9.99 build is integrated in it, and it has quite a few fixes for authentication issues.

For more details: https://devolutions.net/server/release-notes

Best regards,

Richard Boisvert

avatar

That's probably the solution, but I wanted to make sure before I told anyone that.

Thanks!

avatar

Good morning sir,
I convinced them to update our devolutions server to 2022.1.10.0

forum image

I also have that version of the Powershell module installed on my computer and I am still getting the Invalid Username and password error out of the DS-Session:
forum image

So I'm wondering if it's possible that my secret key is somehow locked or expired in the system. Or if maybe it became invalidated when the system updates were performed?

Any help is appreciated!

avatar

Hi Brian,

Your application key could be disabled, but I do not believe this to be the case since it's not the error sent back to the client when logging in with a disabled secret key. It is not likely to have been invalidated after an update, as I am using an older key with no issue on my end. However, let's not rule out this option just yet. Have you tried with a newly generated application key as mentioned previously?

Best regards,

Alexandre Martigny

avatar

I have not. I will see about getting a new one and then get back to you

avatar

Hi,
We tried a different access key and no luck
They also have all the access allowed

The guy in charge says to tell you that they are behind a WAF and load balancer.
There are two nodes, and a RDS server in AWS

avatar

Hi Brian,

Could you please send us a copy of your login attempt & data source logs? We will try to find out what's happening from those and get back to you as soon as possible.

To do so, export them via the web interface and fill the form at https://devolutions.sharefile.com/share/filedrop. If possible, please rename the files with my last name so they can be easily redirected to me.

Best regards,

Alexandre Martigny

avatar

will do.

In the meantime I've also had some behavior where I tried to just create a new DS-Session and gotten stuck in some kind of loop where it's trying to open Chrome and opens a bunch of tabs until I CTRL+C on the PowerShell window:
forum image

avatar

Logs have been uploaded for the last 7 days per John

avatar

I turned on verbose so we have this error logging in the console:
forum image

avatar

The test code I am using is:
forum image

EDIT: noticed I had a mistake in my test code and corrected to the above.
Still getting a failure at line 116 of New-DSSession.

Apparently the $NewResponse.isSuccess is still coming back false. We are wondering if something with the Auth works changed in the newer version of the code and the request is getting killed somewhere in our network.

It's got to be something new though because the production code used to work fine before the update and I haven't changed it since I originally got it working

avatar

Hi Brian,

This is hard one for me verify. We were not able to successfully reproduce the issue on our end with a more "streamlined" installation of Devolutions Server, but be assured that we are actively working on the case to fix it for you.

I cannot affirm this with 100% certainty, but I am pretty sure the issue comes from how your Devolutions Server is set up. I will need to investigate deeper with the developers responsible for the authentication part of our code base and come back to you later.

Best regards,

Alexandre Martigny

avatar

okay thanks!

avatar

Hi Brian,

In order to investigate any further, I will need another log from you.

Logs related to token validation are located in your Devolutions Server installation folder under "App_Data". The file should be called "DPS_Main.log". If there's no such file, you need to edit the folder security and give your user write permissions. After that, try to log in again and send us the "DPS_Main" log file using the same link previously given to you.

This log will contain detailed explanations as to why your token was not valid and should help us track down your issue.

Best regards,

Alexandre Martigny

avatar

I will relay to John, thanks

avatar

Hi,
The logs from servers have been uploaded

avatar

Hi Brian,

After going through the authentication part of the code base with the developer who worked on it, we narrowed down the issue to 2 options with the information you gave us.

First thing to check would be that "Cli" and "Scripting" are both allowed in your Devolutions Server settings. Those settings are located under Administration -> System Settings -> Application Access.

After that, check under Administration -> Server Settings -> Security and make sure "Force token public IP validation" and "Use X-Forwarded-For" are unchecked. Also clear the first 4 fields on that page.

If the issue persist after those validations, I'd suggest you schedule a remote session with our support team so they can better investigate your setup. To do so, send an email to service@devolutions.net with a link to this thread attached.

Best regards,

Alexandre Martigny

avatar

Thank you sir!
And thanks to the dev team!

avatar

Hi,
I've set up the support session.
Thanks!

avatar
Was there a fix for this one? - I seem to be running into the same exact issue



Hi Brian,

After going through the authentication part of the code base with the developer who worked on it, we narrowed down the issue to 2 options with the information you gave us.

First thing to check would be that "Cli" and "Scripting" are both allowed in your Devolutions Server settings. Those settings are located under Administration -> System Settings -> Application Access.

After that, check under Administration -> Server Settings -> Security and make sure "Force token public IP validation" and "Use X-Forwarded-For" are unchecked. Also clear the first 4 fields on that page.

If the issue persist after those validations, I'd suggest you schedule a remote session with our support team so they can better investigate your setup. To do so, send an email to service@devolutions.net with a link to this thread attached.

Best regards,
avatar

Hello,

The issue is related to AWS ELB, but we do not have this type of configuration in our environment. We are still waiting for additional logs.

Best regards,

Richard Boisvert

avatar
Thanks @Richard

Hello,

The issue is related to AWS ELB, but we do not have this type of configuration in our environment. We are still waiting for additional logs.

Best regards,