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

Warning should be shown when Keychain cannot be used due to Cleartext plugin being enabled #285

Closed
wrmoon opened this issue Aug 7, 2020 · 13 comments
Labels
Feature Request New feature or request PR Welcome Issues and fixes available for wide community to help us move forward by creating a PR with solution

Comments

@wrmoon
Copy link

wrmoon commented Aug 7, 2020

Passwords are not getting saved at all. No entries in keychain for Sequel Ace.

Sequel Ace version 2.1.5
MacOs 10.15.5 (19F101)
MacBook Pro (15-inch, 2019)

Would appreciate any suggestions to help debug this

@Jason-Morcos
Copy link
Member

Can you provide more detail as to what the issue is as you are experiencing it? When do you expect a password to be saved and it's not being saved?

@wrmoon
Copy link
Author

wrmoon commented Aug 12, 2020

Steps to recreate:

  1. File | New Connection Tab
  2. Click on + button to create a new connection
  3. Fill out Host, Username, Password
  4. Click on "Save changes" button
  5. Notice that the connection has been stored as a new favorite in your list
  6. Click on a different connection, then the one that just got saved.
  7. Notice that the password field is now empty. If you try to connect to this database, it will fail if it requires a password. (I get an Access denied popup)

I noticed that there are NO entries in my keychain for passwords for Sequel Ace (though there were for Sequel Pro)

@Jason-Morcos
Copy link
Member

This is a very strange issue. I definitely cannot reproduce.
Perhaps this is not a Sequel Ace issue per say and more a Mac-specific issue? Have you tried repairing the keychain (or any of these other tips)? https://discussions.apple.com/thread/2716932

@stychos
Copy link
Contributor

stychos commented Aug 13, 2020

Hm.. can this be relevant?

NSString *cleartext = [NSProcessInfo processInfo].environment[@"LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN"];
if (cleartext != nil) {
NSLog(@"LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN is set. Disabling keychain access. See Issue #2437");
[self release];
return nil;

@stychos
Copy link
Contributor

stychos commented Aug 13, 2020

Yes, looks like the possible source of trouble. I tried with this env var set and lost Keychain access:

 % LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1 /Applications/Sequel\ Ace.app/Contents/MacOS/Sequel\ Ace
2020-08-14 01:19:31.277 Sequel Ace[44057:10824358] Failed to set (systemColorOfName) user defined inspected property on (SPButtonBar): [<SPButtonBar 0x7f85b5e35070> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key systemColorOfName.
2020-08-14 01:19:31.497 Sequel Ace[44057:10824358] LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN is set. Disabling keychain access. See Issue #2437

@wrmoon what your output of the console command echo $LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN? Or try to launch via terminal as in my example but without LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1 part, please.

@wrmoon
Copy link
Author

wrmoon commented Aug 16, 2020

@stychos That's the culprit alright!

When I launch SA from a terminal window, passwords are saved correctly. When I launch from spotlight search (cmd-space) it doesn't work.

I opened SA from the spotlight search, and checked the environment variables (ps eww <pid>). Sure enough, I see LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=yes

@stychos
Copy link
Contributor

stychos commented Aug 16, 2020

I think it maybe hidden in your .bash_profile, .zshrc or in mysqld launcher. Try to verify that places.

@wrmoon
Copy link
Author

wrmoon commented Aug 16, 2020

But now I wonder why keychain access is disabled when the cleartext plugin is enabled. Couldn't the password be intercepted even if the password isn't stored in the keychain?

@stychos
Copy link
Contributor

stychos commented Aug 16, 2020

Sorry, I can't answer you this question. You can try to read related issues in Sequel Pro tracker to have more vision: sequelpro/sequelpro#2437 and sequelpro/sequelpro#2247
By the nature of "cleartext" word - probably means yes, because anything transferring in cleartext can be intercepted in the middle.

@Jason-Morcos
Copy link
Member

At the very least, it might be good if we popped up a one-time alert indicating to the user that keychain cannot be used because MySQL clear text is enabled? It is confusing that the end user can't tell what's going on!

@stychos
Copy link
Contributor

stychos commented Aug 16, 2020

At the very least, it might be good if we popped up a one-time alert indicating to the user that keychain cannot be used because MySQL clear text is enabled? It is confusing that the end user can't tell what's going on!

Thought about that too. Maybe we need to change the issue title and/or description appropriately and keep this open for a while?

@Jason-Morcos Jason-Morcos changed the title Passwords are not getting saved at all. No entries in keychain for Sequel Ace. No Warning when Keychain cannot be used due to Cleartext plugin being enabled Aug 16, 2020
@Jason-Morcos Jason-Morcos changed the title No Warning when Keychain cannot be used due to Cleartext plugin being enabled Warning should be shown when Keychain cannot be used due to Cleartext plugin being enabled Aug 16, 2020
@Jason-Morcos Jason-Morcos added Feature Request New feature or request good first issue PR Welcome Issues and fixes available for wide community to help us move forward by creating a PR with solution and removed Need More Info labels Aug 16, 2020
@wrmoon
Copy link
Author

wrmoon commented Aug 17, 2020

In case someone has the same issue and reads this thread, I fixed my problem by moving ~/Library/LaunchAgents\mysql.plist elsewhere, and rebooting. Not sure what program put that there, but it looks like I didn't need it anyway.

@Kaspik
Copy link
Member

Kaspik commented Jan 8, 2021

I'm gonna close this for now, as we haven't seen any other issues really and it's solved afaik. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request PR Welcome Issues and fixes available for wide community to help us move forward by creating a PR with solution
Projects
None yet
Development

No branches or pull requests

4 participants