You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user creates individual app passwords, it should be possible to restrict to which data the app should have access to and what kind of access should be allowed.
Example:
App RO RW CREATE DELETE UPLOAD
---------- -- -- ------ ------ ------
Calendar X
Contacts X
Files X
Current behavior
If a user creates individual app passwords, he couldn't restrict to which data the app should have access.
Steps to reproduce
Login as as a user
Choose Personal -> App passwords
Environment
Server Configuration
OS: Linux 3.2.82
Web server: Apache2 2.4.25
Database: MariaDB 5.5.53
PHP version: 5.6.29
Nextcloud version: 10.0.2
Client Configuration
Browser: Mozilla Firefox 50.1.0
Operating system: Windows 7
EDIT by @jospoortvliet : Please see #30331 for a few more details and use cases.
Reacted by KB7777, e-alfred, S.Zander, Till Riedel, InRiPa, sunjam, Johannes Reiff, BluePixel4k, Jerome Charaoui, hypervtechnics and 69 more
Reacted by K0RR, Marcin Wilk, S.Zander, Johnny, John Wuller, saywebsolutions and K0RR
E.g. you wouldn't want your activity reader to do anything right?
But it needs access to all of those to display the related events, get the contact names for displaying and file access for handling of paths in activities.
So while it is nice in theory, we need to make this easily checkable and somehow a way to correctly deal with this for other apps.
@nickvergessen It would seem that to implement this, a permissions framework would need to be built into the core of NC, at which point apps could register the permissions they have available, which would be namespaced with the app name, etc, etc.
A framework I'm using on my own projects is https://github.com/spatie/laravel-permission. While it's deeply integrated with laravel, so not very suitable for this, perhaps a similar model could be used: create a list of permissions - as you mentioned, separate out read vs write permissions in each section, and then assign to users.
Actually it makes sense to go even further. IMHO it would make sense to use the sharing functionality to share a file or subdirectory with an "app password". Particularly if one needs to upload or download data for a longer timeframe in a multiuser environment keeping any password on disk or in memory with such wide permissions does not much lessen the attack surface.
Context: I am currently looking on a good way how to instruct users to include nextcloud files in projects in their HPC project. Registering an extra user for sharing files with yourself seems to be the only good solution.
I'm using Android Apps, which access a specific App from nextcloud (e.g. app for calendar, app for tasks, ..). It would be nice to restrict the access of given "app password account" to the exact purpose.
@My1 That would be really great.
Of course it would not cover all use cases, but it would already make it possible to have one app password per folder. If multiple folders in different locations are needed, it would still be possible to create multiple app passwords.
I strongly prefer the principle of least privilege, meaning each app/password should only have access to what is actually required.
I initially thought I could work around this for my backup/sync apps by using public shares and accessing them via /public.php/dav, but I found that using Basic Auth with different apps triggers the bruteforce protection very quickly.
My current workaround is using separate user accounts. This is not really ideal, but still better than giving an app—which should, for example, only back up to a specific folder—write access to everything the main user can access.
Implementing to at least set a specific root folder per app password would be a significant improvement.
Just to add one comment regarding work arounds: those seem fine for home installations but for large corporate installations (which might even have higher security demands), arbitrary users are not possible. Also weird patterns easily break things or trigger security mechanisms (which result in complicated discussions with the admins about what one is trying to do)
In this time of large data leaks it's a non-sense that this is not yet implemented.
Apps password is a good first step but should not be unfinished as it is.
There are many apps that can connect to Nextcloud and it's a good thing for Nextcloud's popularity and usages.
It's also a good reflex for users to use apps passwords.
But we can't be sure of what these applications can do and even if using other login/password that the principal one, they can do almost everything with our datas.
Adding these options could be a very good point to secure them.
Sorry for my english and thank you for the fantastic job you've done on Nextcloud ❤️
I ran into this today trying to limit the WebDAV access of Keepassium on iOS for access to my password database in Nextcloud. My goal was to avoid giving the app full read/write permission to every folder my Nextcloud user has.
As mentioned by other commenters it appears that using password protected share links is an OK workaround. I found an old reddit thread discussing how to do it here and it's also kind of documented in the Nextcloud docs here and here
Summary of the solution for e.g. a scoped folder:
Create the folder
Create a public password protected share for the folder with e.g. https://cloud.example.com/s/yxcFKRWBJqYYzp4 as the share link
Use e.g. https://cloud.example.com/public.php/webdav as the WebDAV connection URL (could probably change in future versions, the two doc links appear to use different URL paths) enter the part of the previous url after /s/ so in our case yxcFKRWBJqYYzp4 as the username and then the share password as the password for the user.
WebDAV client only has access to the inside of the folder
Reacted by archont00, Felix Eckhofer and saywebsolutions
Thanks a lot - let me re-write since I was struggling a bit with understanding of the steps:
NC: Create a folder.
NC: Create an external share of that folder with e-mail and password.
NC: Display the QR code for the share and scan it with phone camera to find out the direct URL with the token. E.g. https://cloud.example.com/s/yxcFKRWBJqYYzp4.
In WebDAV client app (Keepass2Android in my case), set
URL: https://cloud.example.com/public.php/webdav
Username: yxcFKRWBJqYYzp4
Password: the share password
The WebDAV client should display the shared folder content
Reacted by Felix Eckhofer, saywebsolutions and chaptergy
Reacted by saywebsolutions, Jonathan S and Francesco Yoshi Gobbo
I assume the issue is non-standardised permissions across Nextcloud apps.
But for start it would be nice to limit which Nextcloud apps the app password grants access to.
This is already solved in the Guests app:
We should clearly distinguish apps and users access.
That would be handled through scoped oauth. Currently Nextcloud only grants full access, with zero granularity, to all issued oauth tokens. See the actual Nextcloud documentation, which states:
Nextcloud OAuth2 implementation currently does not support scoped access. This means that every token has full access to the complete account including read and write permission...
OAuth Scopes is a mechanism in OAuth 2.0 to limit an application's
access to a user's account. An application can request one or more scopes,
this information is then presented to the user in the consent screen, and
the access token issued to the application will be limited to the scopes
granted.
App RO RW CREATE DELETE UPLOAD
---------- -- -- ------ ------ ------
Calendar X
Contacts X
Files X
This exact example from the original post here is what Oauth scoped access is for. Please do not take my word for it, and do some research. Hope this helps! You could define all of the following within one single oauth token:
And even add more things like:
list
download
edit metadata
share
delete
manage folders
So instead of one blanket “full access” token, Nextcloud could issue tokens with narrow capabilities for each app and each action, as defined for each specific token.
Thanks a lot - let me re-write since I was struggling a bit with understanding of the steps:
1. NC: Create a folder.
2. NC: Create an external share of that folder with e-mail and password.
3. NC: Display the QR code for the share and scan it with phone camera to find out the direct URL with the token. E.g. `https://cloud.example.com/s/yxcFKRWBJqYYzp4`.
4. In WebDAV client app (Keepass2Android in my case), set
* URL: `https://cloud.example.com/public.php/webdav`
* Username: `yxcFKRWBJqYYzp4`
* Password: the share password
5. The WebDAV client should display the shared folder content
Does this really work?
I always get "401 Unauthorized" in any webdav client I use when i use that "username" and the share password
Activity
MariusBluem commentedon Jan 1, 2017
See: #719
What is the current plan/state? @icewind1991
nickvergessen commentedon Jan 18, 2017
The problem is that this is not really that easy.
E.g. you wouldn't want your activity reader to do anything right?
But it needs access to all of those to display the related events, get the contact names for displaying and file access for handling of paths in activities.
So while it is nice in theory, we need to make this easily checkable and somehow a way to correctly deal with this for other apps.
[-]Feature request: allow to restrict app password data access[/-][+]Allow to restrict app password data access[/+]benyanke commentedon Oct 3, 2017
@nickvergessen It would seem that to implement this, a permissions framework would need to be built into the core of NC, at which point apps could register the permissions they have available, which would be namespaced with the app name, etc, etc.
A framework I'm using on my own projects is https://github.com/spatie/laravel-permission. While it's deeply integrated with laravel, so not very suitable for this, perhaps a similar model could be used: create a list of permissions - as you mentioned, separate out read vs write permissions in each section, and then assign to users.
nickvergessen commentedon Oct 4, 2017
Yeah something similar to the bruteforce protection we added in 12 (or was it 11?).
server/core/Controller/LoginController.php
Line 219 in 0bccd5a
j-ed commentedon Sep 21, 2018
The issue has still not been fixed in Nextcloud v13.0.6.
szaimen commentedon May 26, 2021
j-ed commentedon May 26, 2021
riedel commentedon Feb 8, 2022
Actually it makes sense to go even further. IMHO it would make sense to use the sharing functionality to share a file or subdirectory with an "app password". Particularly if one needs to upload or download data for a longer timeframe in a multiuser environment keeping any password on disk or in memory with such wide permissions does not much lessen the attack surface.
Context: I am currently looking on a good way how to instruct users to include nextcloud files in projects in their HPC project. Registering an extra user for sharing files with yourself seems to be the only good solution.
InRiPa commentedon Feb 10, 2022
I'm using Android Apps, which access a specific App from nextcloud (e.g. app for calendar, app for tasks, ..). It would be nice to restrict the access of given "app password account" to the exact purpose.
15 remaining items
crispyduck00 commentedon Jan 25, 2026
@My1 That would be really great.
Of course it would not cover all use cases, but it would already make it possible to have one app password per folder. If multiple folders in different locations are needed, it would still be possible to create multiple app passwords.
I strongly prefer the principle of least privilege, meaning each app/password should only have access to what is actually required.
I initially thought I could work around this for my backup/sync apps by using public shares and accessing them via /public.php/dav, but I found that using Basic Auth with different apps triggers the bruteforce protection very quickly.
My current workaround is using separate user accounts. This is not really ideal, but still better than giving an app—which should, for example, only back up to a specific folder—write access to everything the main user can access.
Implementing to at least set a specific root folder per app password would be a significant improvement.
riedel commentedon Jan 27, 2026
Just to add one comment regarding work arounds: those seem fine for home installations but for large corporate installations (which might even have higher security demands), arbitrary users are not possible. Also weird patterns easily break things or trigger security mechanisms (which result in complicated discussions with the admins about what one is trying to do)
AceDenghar commentedon Mar 5, 2026
Please,
In this time of large data leaks it's a non-sense that this is not yet implemented.
Apps password is a good first step but should not be unfinished as it is.
There are many apps that can connect to Nextcloud and it's a good thing for Nextcloud's popularity and usages.
It's also a good reflex for users to use apps passwords.
But we can't be sure of what these applications can do and even if using other login/password that the principal one, they can do almost everything with our datas.
Adding these options could be a very good point to secure them.
Sorry for my english and thank you for the fantastic job you've done on Nextcloud ❤️
Ace
makua104 commentedon Apr 11, 2026
I ran into this today trying to limit the WebDAV access of Keepassium on iOS for access to my password database in Nextcloud. My goal was to avoid giving the app full read/write permission to every folder my Nextcloud user has.
As mentioned by other commenters it appears that using password protected share links is an OK workaround. I found an old reddit thread discussing how to do it here and it's also kind of documented in the Nextcloud docs here and here
Summary of the solution for e.g. a scoped folder:
https://cloud.example.com/s/yxcFKRWBJqYYzp4as the share linkhttps://cloud.example.com/public.php/webdavas the WebDAV connection URL (could probably change in future versions, the two doc links appear to use different URL paths) enter the part of the previous url after/s/so in our caseyxcFKRWBJqYYzp4as the username and then the share password as the password for the user.archont00 commentedon Apr 11, 2026
Thanks a lot - let me re-write since I was struggling a bit with understanding of the steps:
https://cloud.example.com/s/yxcFKRWBJqYYzp4.https://cloud.example.com/public.php/webdavyxcFKRWBJqYYzp4AceDenghar commentedon Apr 14, 2026
Thank you for this workaround ! It will be usefull 🥰
But should be centralized in apps password when used by apps...
We should clearly distinguish apps and users access.
But it's good to know !
pmilosev commentedon Aug 18, 2026
I assume the issue is non-standardised permissions across Nextcloud apps.
But for start it would be nice to limit which Nextcloud apps the app password grants access to.
This is already solved in the Guests app:
sunjam commentedon Aug 19, 2026
Sorry to be broken record, three years later...
That would be handled through scoped oauth. Currently Nextcloud only grants full access, with zero granularity, to all issued oauth tokens. See the actual Nextcloud documentation, which states:
OAuth Scopes is a mechanism in OAuth 2.0 to limit an application's
access to a user's account. An application can request one or more scopes,
this information is then presented to the user in the consent screen, and
the access token issued to the application will be limited to the scopes
granted.
Full details at https://oauth.net/2/scope/
This exact example from the original post here is what Oauth scoped access is for. Please do not take my word for it, and do some research. Hope this helps! You could define all of the following within one single oauth token:
Calendar: read-only
Contacts: read/write
Files: upload-only
And even add more things like:
list
download
edit metadata
share
delete
manage folders
So instead of one blanket “full access” token, Nextcloud could issue tokens with narrow capabilities for each app and each action, as defined for each specific token.
pringelmann commentedon Oct 7, 2026
We are working on scoped app passwords for NC36. First PR is open to introduce scope schema and vocabulary: #65268
jsalatiel commentedon Oct 15, 2026
Does this really work?
I always get "401 Unauthorized" in any webdav client I use when i use that "username" and the share password
alexpdp7 commentedon Oct 15, 2026
There's more details at https://docs.nextcloud.com/server/stable/user_manual/en/files/access_webdav.html#accessing-public-shares-over-webdav, but I can't get it to work either :\
alexpdp7 commentedon Oct 15, 2026
Got it working using
cadaver. The documentation had a slight mistake. See nextcloud/documentation#15781.susnux commentedon Nov 10, 2026
@pringelmann matching your current work?
pringelmann commentedon Nov 10, 2026
Yup :) see #2866 (comment)