related: https://github.com/owncloud/ocis/pull/9755 docs task: #10605 >[!Note] > > Creatiing app token: > `POST https://localhost:9200/auth-app/tokens?expiry=24h` > - this returns the actual token (save to use it later - cannot be accessed later on) > > List app tokens: > `GET https://localhost:9200/auth-app/tokens` > - this returns list of tokens with id (NOT actual token value) we need to have api tests for that and cli test ## Bugs - https://github.com/owncloud/ocis/issues/10815 - https://github.com/owncloud/ocis/issues/10921 - https://github.com/owncloud/ocis/issues/11063 - https://github.com/owncloud/ocis/issues/10675 ## Test Cases ### API - [x] create with expiry https://github.com/owncloud/ocis/pull/10662 - [x] create with user-id https://github.com/owncloud/ocis/pull/10987 - [x] try to create with user-id no expiration @prashant-gurung899 - [x] by admin user, non-admin user and non-existent user: https://github.com/owncloud/ocis/pull/11169 - [x] by normal user: https://github.com/owncloud/ocis/pull/11159 - [x] try to create with user-id by non-existing user @prashant-gurung899 https://github.com/owncloud/ocis/pull/11174 - [x] try to create without expiry https://github.com/owncloud/ocis/pull/10981 - [x] list https://github.com/owncloud/ocis/pull/10662 - [x] delete https://github.com/owncloud/ocis/pull/10814 - https://github.com/owncloud/ocis/issues/10675 ### Impersonation - [x] create with expiry and username https://github.com/owncloud/ocis/pull/10733 - [x] create with expiry and user-id https://github.com/owncloud/ocis/pull/10987 - [x] create with expiry and user-id by normal user https://github.com/owncloud/ocis/pull/10987 - [x] create without expiry (user-id) https://github.com/owncloud/ocis/pull/11159 - [x] try to create without expiry https://github.com/owncloud/ocis/pull/10981 - [x] list https://github.com/owncloud/ocis/pull/10733 - [x] check impersonation works only with `AUTH_APP_ENABLE_IMPERSONATION=true` https://github.com/owncloud/ocis/pull/10983 - [x] create token by user https://github.com/owncloud/ocis/pull/10985 - [x] try to create token for non-existing user https://github.com/owncloud/ocis/pull/10993 - [x] try to delete token by a different user (admin and brian) https://github.com/owncloud/ocis/pull/10993 ### CLI - [x] create https://github.com/owncloud/ocis/pull/10660 - [x] try to create without expiry https://github.com/owncloud/ocis/pull/10988 - [x] create with expiry and user-id (we cannot use user-id to create auth-app token using cli) - [x] check impersonation works only with `AUTH_APP_ENABLE_IMPERSONATION=true` - `AUTH_APP_ENABLE_IMPERSONATION` is for API only ### Use of Token Enable with `PROXY_ENABLE_APP_AUTH=true` (https://owncloud.dev/services/auth-app/#service-startup) - [x] resource access using own app token https://github.com/owncloud/ocis/pull/11166 - [x] resource access using own app token impersonation token https://github.com/owncloud/ocis/pull/11262 - [x] access resource of another user by admin and non-admin user @prashant-gurung899 - [x] using auth-app and impersonation token https://github.com/owncloud/ocis/pull/11185 - [x] check if token expires https://github.com/owncloud/ocis/pull/11168 ### Refactor - [x] split scenarios: https://github.com/owncloud/ocis/pull/11179 cc @saw-jan
related: #9755
docs task: #10605
Note
Creatiing app token:
POST https://localhost:9200/auth-app/tokens?expiry=24hList app tokens:
GET https://localhost:9200/auth-app/tokenswe need to have api tests for that and cli test
Bugs
Test Cases
API
Impersonation
AUTH_APP_ENABLE_IMPERSONATION=true[tests-only][full-ci] adding test for trying to create auth app-token for other user without impersonation env #10983CLI
AUTH_APP_ENABLE_IMPERSONATION=trueAUTH_APP_ENABLE_IMPERSONATIONis for API onlyUse of Token
Enable with
PROXY_ENABLE_APP_AUTH=true(https://owncloud.dev/services/auth-app/#service-startup)Refactor
cc @saw-jan