Skip to content
New issue

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

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

Already on GitHub? # to your account

Failed to decrypt the saved password after update to v9 #8435

Open
yanehi opened this issue Feb 10, 2025 · 5 comments
Open

Failed to decrypt the saved password after update to v9 #8435

yanehi opened this issue Feb 10, 2025 · 5 comments
Labels
Milestone

Comments

@yanehi
Copy link

yanehi commented Feb 10, 2025

Description

As soon as I try to start a saved connection to a server after updating to pgAdmin v9, I get the error message:

Failed to decrypt the saved password.
Error: 'utf-8' codec can't decode byte 0xab in position 0: invalid start byte

When I enter the password, I can log in normally. If I then try to save the password again, the same problem occurs again after logout/# to pgAdmin. We did not have this problem in v8.14.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Servers'
  2. Click on 'Saved Server configuration to connect to the server'
  3. See the error:

Image

Expected behavior

I can connect to the server using access data that has already been saved in pgAdmin.

Error message

Failed to decrypt the saved password.
Error: 'utf-8' codec can't decode byte 0xab in position 0: invalid start byte

Setup:

  • OS: Docker Container based on dpage/pgadmin4
  • Version: 9.0
  • Mode: Server
  • Package type: Docker Container

We use a database to store the user settings.

@yogeshmahajan-1903
Copy link
Contributor

@yanehi
I am not able to reporduce the issue. Can you please share your docker deployment config? What are the authentications sources being used?

@danielabbatt
Copy link

danielabbatt commented Feb 12, 2025

I have the same problem. The servers are all there in the list once I enter my master password, but each instance comes up with that error.
We're running on k8s using dpage/pgadmin4 9.0

Failed to decrypt the saved password.
Error: 'utf-8' codec can't decode byte 0xb7 in position 0: invalid start byte

After downgrading back to 8.14 it works as before, delaying upgrade to 9.0

@yanehi
Copy link
Author

yanehi commented Feb 12, 2025

@yogeshmahajan-1903
We use SSO for the initial login to pgadmin. However, the problem exists when logging in to the DB server when I am already logged in to pgAdmin. After upgrading from v8 to v9, pgAdmin can no longer read or use the password already saved for logging in to the server. It still worked on pgAdmin v8.

We have only set the following environment variables: PGADMIN_DEFAULT_EMAIL, OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, PGADMIN_DEFAULT_PASSWORD, PGADMIN_CONFIG_CONFIG_DATABASE_URI, PGADMIN_LISTEN_PORT.

@yogeshmahajan-1903
Copy link
Contributor

With SSO, I am able to reproduce the issue. Thanks for reporting.

@danielabbatt
Copy link

Ah yes mine was using SSO too. Glad you could reproduce.

yogeshmahajan-1903 added a commit to yogeshmahajan-1903/pgadmin4 that referenced this issue Feb 13, 2025
yogeshmahajan-1903 added a commit to yogeshmahajan-1903/pgadmin4 that referenced this issue Feb 13, 2025
khushboovashi pushed a commit that referenced this issue Feb 18, 2025
…key for external authentication in server mode. #8435
@akshay-joshi akshay-joshi moved this from 🏗 In Progress to In Testing in Current Sprint (187) Feb 18, 2025
@akshay-joshi akshay-joshi added this to the 9.1 milestone Feb 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: In Testing
Development

No branches or pull requests

4 participants