dgmid / nextcloud-notes-mac-client

Access and edit your Nextcloud Notes on the Mac
MIT License
73 stars 14 forks source link

Self-signed certificate #7

Closed bendschs closed 4 years ago

bendschs commented 4 years ago

I am using a self-signed certificate on my nextcloud host and have a strong suspicion that this is what prevents me from logging in via the notes-mac client.

The official Nextcloud client opens a window when I log in where I can add the "Security Exception". Would it be possible to do this in notes-mac-client as well?

Cheers Bendsch

dgmid commented 4 years ago

I think you're correct. A self-signed certificate is not going to work as there is currently no way to trust/approve it. I would need to implement a trust dialog ( dialog.showCertificateTrustDialog ).

bendschs commented 4 years ago

that would be great ... after some research i did not find a single way around it on OS-side.

dgmid commented 4 years ago

I set up a test server with a self-signed certificate and got the app to work with it:

First, you need to import the certificate into your Login Keychain in the Keychain Access app (if it's not already installed there).

If the certificate is not in your keychain, you can get it by opening your nextcloud in a web browser and clicking on the lock icon in the address bar. When the dialog open, select 'Show Certificate' and then drag the certificate out of the window.

certificate-dialog

You can then import it into Keychain Access.

Then, click on the certificate in Keychain Access to open it, click on 'Trust' and select 'Always trust' from the first drop-down menu.

keychain-access

You should then be able to use the app as the certificate will be trusted.

bendschs commented 4 years ago

i had added the certificate to my key-chain. i deleted and re-added it but it still does not work for me. when i press login, the blue window appears but without interface to type username or password. i am on 10.14.6. Bildschirmfoto 2019-10-07 um 19 38 56

bendschs commented 4 years ago

so ... i guess i have to look for another notes client?

dgmid commented 4 years ago

Well, I don't know how to resolve this - or rather I can make it work with a self-signed certificate but the solution is not working for you.

You could try using a Let's Encrypt certificate - that's what I use on my server.

Failing that you could try using Joplin which is an excellent notes app. It syncs with Nextcloud - although I'n not sure if it uses the Nextcloud Notes app.

bendschs commented 4 years ago

thank you for the recommendation. i tried Joplin but i (would) prefer your app, becuase oft the simple interface so i am still trying to make it work. in the newest release there is a little log-information about the sign-in process available that i wanted to share:

[error] loginflow window did not load

don't know if this helps troubleshooting the certificate problem.

cheers bendsch