nextcloud / nextcloud/android

How about nextcloud Android mobile client implement HPKP for user more secure than without.

Open
#11,178 9 comments 1 reaction 0 assignees View on GitHub
connectivity enhancement
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### Is your feature request related to a problem? Please describe.
I'm always frustrated when first install nextcloud server and client which mainly depends on DNS-01 or HTTP-01 challenge of ACME to get server certificate to protect user digital assets, but without check the server's public key(although checked by TLS, but a attacker like a bad operated CA----------------, DNS indeed , can still forge a bad certificate on other host, and change the dns, then he can get user data, the client pass the TLS check). Make user in danger of MITM attack. Most nextcloud data is belong to user only, the HPKP is good at secure user from depends on DNS or HTTP. Just like SSH does, when user first setup server it is a good time to setup HPKP for secure. The server's private key should not leave the server. User mobile client upload data and remember server's public key ( by check server's public key), to make user more secure. Even the bad operated CA and DNS owner CANNOT get user data, if only he can not get the server's private key.

### Describe the solution you'd like
A clear and concise description of what you want to happen.
In the client code, use TrustKit https://github.com/datatheorem/TrustKit-Android may be a selection. When user first link to his own server thought TLS, the client should remember the server' public key and let user known. When later the client access nextcloud server, it should check server's public key. If it's wrong, it should not to continue work.

### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Without HPKP, user self setuped server even in use of TLS, should be in danger.

### Additional context
Add any other context or screenshots about the feature request here.

**NOTE:** Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.