nextcloud / nextcloud/ios

How about implement HPKP in nextcloud iOS client to make user and nextcloud more secure than not.

Open
#2,296 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

Steps to reproduce

1.Currently, the client is not have the HPKP.
2.
3.

Expected behaviour

Like SSH, when user first time setup nextcloud server or first time link with the server, the client should record the server's public key for pinning, and let the user known. Later, when the client access the server, except the currently have process,like TLS and user name password etc, it should also check the server's public key pinning. If the server's public key changed, it should stop work. If the server's public key is changed intentionally, user can pass it, and record the new server's public key for pinning.

Actual behaviour

Tell was what instead happens.

Screenshots

If applicable, add a screenshot showing the issue.

Logs
If applicable, you can post the iOS app or server logs (removing any sensitive information).
Reasoning or why should it be changed/implemented?

Currently, the server certificate is rely on mainly DNS. If a miss operated DNS, it's probably to make a difference host fake as the user self setuped server, but have a certificate can pass TLS check, and the user's client should not even notice if the user is not carefully. Even maybe to continue upload personal digital assets to the fake server . And the origin server is still there but not being connected. Use of server public key pinning is to make it more secure than not.

If we implement the HPKP for nextcloud, our security is not only rely on DNS, but rely on the server's private key. Not mean to perfect, but on security it's a good step.

I have post a comment on Android client too.

Environment data

iOS version: e.g. iOS 14.4.1

Nextcloud iOS app version: see More > Settings

Server operating system:

Web server: Apache, nginx

Database:

PHP version:

Nextcloud version: see Nextcloud admin page

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by reviewing the iOS client's existing server and TLS trust handling, then determine how first-use key recording, changed-key rejection, and intentional user overrides should work. Done means the client supports the requested public-key pinning flow without weakening its existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.