paulgessinger / swift-paperless

Native iOS app for interacting with a Paperless-ngx installation to manage documents
https://swift-paperless.gessinger.dev/
MIT License
347 stars 15 forks source link

Self signed certificate not accepted #141

Open apfelnutzer opened 4 hours ago

apfelnutzer commented 4 hours ago

I host paperless ngx locally and use Traefik to provide https access to it. Everything works fine in the browser, but the app does not accept my self signed certificate although I imported and trusted it on my iPhone.

image

apfelnutzer commented 3 hours ago

... a quick workaround could be to allow login in anyway - currently the login button is deactivated.

paulgessinger commented 3 hours ago

Hi!

See https://github.com/paulgessinger/swift-paperless/issues/109 for previous discussion on this topic.

It's possible to work with self signed certificates using the OS trust store.

Certificates ostensibly need to use a CA, rather than using the CA cert directly, their lifetime needs to be short enough, and they need to be properly configured for your domain.

Anything else leads to certificate errors, which I can't really provide better error messaging for.

Safari seems to be slightly more tolerant towards faulty configurations (see the other issue) but it's definitely possible to get this to work with the current version of the app.

Not allowing certificates rejected by the OS networking layer is a security decision, and I currently do not intend to change this.