Piwigo / piwigo-flutter-app

Piwigo mobile application for Android
GNU General Public License v2.0
83 stars 26 forks source link

[FR] Support TLS client certificates (so port forwarding gets less risky) #148

Open Catfriend1 opened 1 year ago

Catfriend1 commented 1 year ago

Hi,

If I may tell a wish it would be client authentication on https-tls layer level. Because I could then load a personal certificate into my client and wouldn't have to worry about everyone worldwide being able to connect to my Piwigo web application instance.

The easyness of client cert usage is demonstrated here: https://www.youtube.com/watch?v=5lYQRuzdZr0&t=671s

Thank you.

remi-martin commented 1 year ago

I'll check this after 2.0 beta ends

remi-martin commented 1 year ago

I don't understand how you'd be abled to get the certificate on your client (phone). I found some ways to give this certificate on request but not to acquire it...

(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate  = (client) {
    SecurityContext sc = new SecurityContext();
    //file is the path of certificate
    sc.setTrustedCertificates(file);
    HttpClient httpClient = new HttpClient(context: sc);
    return httpClient;
};

tls-ssl-connection-using-self-signed-certificates-with-dart-and-flutter How to make https (ssl/tls) request with dio package in flutter?

Catfriend1 commented 2 weeks ago

In another app, I just selected it from android user cert store. So my import of the client cert was done by the Android settings screen, not in-app.