Git Product home page Git Product logo

ocis-reva's Introduction

ownCloud Infinite Scale: Reva

Build Status Gitter chat Codacy Badge Go Doc Go Report

This project is under heavy development, it's not in a working state yet!

Install

You can download prebuilt binaries from the GitHub releases or from our download mirrors. For instructions how to install this on your platform you should take a look at our documentation

Development

Make sure you have a working Go environment, for further reference or a guide take a look at the install instructions.

git clone https://github.com/owncloud/ocis-reva.git
cd ocis-reva

make generate build

./bin/ocis-reva -h

To run a demo installation you can use the preconfigured defaults and start all necessary services:

export REVA_USERS_DRIVER=demo

bin/ocis-reva frontend & \
bin/ocis-reva gateway & \
bin/ocis-reva users & \
bin/ocis-reva auth-basic & \
bin/ocis-reva auth-bearer & \
bin/ocis-reva sharing & \
bin/ocis-reva storage-root & \
bin/ocis-reva storage-home & \
bin/ocis-reva storage-home-data & \
bin/ocis-reva storage-oc & \
bin/ocis-reva storage-oc-data

The root storage serves the available namespaces from disk using the local storage driver. In order to be able to navigate into the /home and /oc storage providers you have to create these directories:

mkdir /var/tmp/reva/root/home
mkdir /var/tmp/reva/root/oc

Note: the owncloud storage driver currently requires a redis server running on the local machine.

You should now be able to get a file listing of a users home using

curl -X PROPFIND http://localhost:9140/remote.php/dav/files/ -v -u einstein:relativity

Users

The default config uses the demo user backend, which contains three users:

einstein:relativity
marie:radioactivty
richard:superfluidity

For details on the json and ldap backends see the documentation

Security

If you find a security issue please contact [email protected] first.

Contributing

Fork -> Patch -> Push -> Pull Request

License

Apache-2.0

Copyright

Copyright (c) 2019 ownCloud GmbH <https://owncloud.com>

ocis-reva's People

Contributors

butonic avatar c0rby avatar deepdiver1975 avatar diocas avatar dpakach avatar haribhandari07 avatar iljan avatar individual-it avatar ishank011 avatar jasson99 avatar jvillafanez avatar kulmann avatar micbar avatar phil-davis avatar refs avatar swoichha avatar xoxys avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocis-reva's Issues

test default capabilities

all capabilities tests are currently skipped on ocis, because settings cannot be set.
But still we could run a simple test as a normal user, to check the default capabilities are correct

PROPFIND does not return file size in drone

doing PROPFIND /remote.php/dav/files/oc/user0/test-file.txt wit data:

<?xml version="1.0"?>
				<d:propfind
				   xmlns:d="DAV:"
				   xmlns:oc="http://owncloud.org/ns"
				   xmlns:ocs="http://open-collaboration-services.org/ns"
				   >
				    <d:prop></d:prop>
				</d:propfind>

locally I receive



<?xml version="1.0" encoding="UTF-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:s="http://sabredav.org/ns">
   <d:response>
      <d:href>/remote.php/dav/files/oc/user0/test-file.txt</d:href>
      <d:propstat>
         <d:prop>
            <oc:id>MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOjI1YTFmNTg0LWU2MjgtNDZjZC04ZWVjLWYzZWJjNTQ1YWIxYQ==</oc:id>
            <oc:fileid>MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOjI1YTFmNTg0LWU2MjgtNDZjZC04ZWVjLWYzZWJjNTQ1YWIxYQ==</oc:fileid>
            <d:getetag>"d6810f479ea04a590891a81f8edef518"</d:getetag>
            <oc:permissions>WCKDNVR</oc:permissions>
            <d:getcontenttype>text/plain; charset=utf-8</d:getcontenttype>
            <d:getcontentlength>19</d:getcontentlength>
            <d:getlastmodified>Thu, 30 Jan 2020 07:02:47 UTC</d:getlastmodified>
            <oc:favorite>0</oc:favorite>
         </d:prop>
         <d:status>HTTP/1.1 200 OK</d:status>
      </d:propstat>
   </d:response>
</d:multistatus>

but on drone



<?xml version="1.0" encoding="UTF-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:s="http://sabredav.org/ns">
   <d:response>
      <d:href>/remote.php/dav/files/oc/user0/test-file.txt</d:href>
      <d:propstat>
         <d:prop>
            <oc:id>MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOjU4MTRhZDdkLTMzZDUtNGE1Yi05OTY3LTc1MzRmNTY0MWE2NA==</oc:id>
            <oc:fileid>MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOjU4MTRhZDdkLTMzZDUtNGE1Yi05OTY3LTc1MzRmNTY0MWE2NA==</oc:fileid>
            <d:getetag>"a00be2b04045160efc6517bdd54b816f"</d:getetag>
            <oc:permissions>WCKDNVR</oc:permissions>
            <d:getlastmodified>Thu, 30 Jan 2020 07:15:29 UTC</d:getlastmodified>
            <oc:favorite>0</oc:favorite>
         </d:prop>
         <d:status>HTTP/1.1 200 OK</d:status>
      </d:propstat>
   </d:response>
</d:multistatus>

share_with field in response after sharing has an extra @localhost attached to the username

sharing a file with a user e.g. curl 'http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares' -u user1:1234 --data 'shareType=0&shareWith=user0&path=%2Fhome%2Ftextfile.txt&permissions=1'
returns this a response with the share_with field having a @localhost postfix attached to the user-name. oC10 reports only the username

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
   <meta>
      <status>ok</status>
      <statuscode>100</statuscode>
      <message>OK</message>
   </meta>
   <data>
      <id>10</id>
      <share_type>0</share_type>
      <uid_owner>user1</uid_owner>
      <displayname_owner>User One</displayname_owner>
      <permissions>1</permissions>
      <stime>1579672511</stime>
      <parent />
      <expiration />
      <token />
      <uid_file_owner>user1</uid_file_owner>
      <displayname_file_owner>User One</displayname_file_owner>
      <path>/home/textfile.txt</path>
      <item_type />
      <mimetype />
      <storage_id />
      <storage>0</storage>
      <item_source />
      <file_source />
      <file_parent />
      <file_target />
      <share_with>user0@localhost</share_with>
      <share_with_displayname>User Zero</share_with_displayname>
      <share_with_additional_info />
      <mail_send />
   </data>
</ocs>

BEHAT_FEATURE not working

Steps

  1. Follow the instructions in https://owncloud.github.io/extensions/ocis_reva/testing/
  2. Run the following as advised to run the tests for the issue 14:
TEST_SERVER_URL=http://localhost:9140 \
TEST_EXTERNAL_USER_BACKENDS=true \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
BEHAT_FILTER_TAGS='~@skipOnOcV10&&~@skipOnLDAP&&@TestAlsoOnExternalUserBackend&&~@local_storage&&@issue-ocis-reva-14' BEHAT_FEATURE=tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature:12

Expected result

Test suite runs.

Actual result

% make test-acceptance-api \
TEST_SERVER_URL=http://localhost:9140 \
TEST_EXTERNAL_USER_BACKENDS=true \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
BEHAT_FILTER_TAGS='~@skipOnOcV10&&~@skipOnLDAP&&@TestAlsoOnExternalUserBackend&&~@local_storage&&@issue-ocis-reva-14' BEHAT_FEATURE=tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature:12     
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.                                                                                                                                 
Generating optimized autoload files
Composer cleaner: Removed 5 files or directories.
composer bin behat install --no-progress
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Package zendframework/zend-ldap is abandoned, you should avoid using it. Use laminas/laminas-ldap instead.
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
./tests/acceptance/run.sh --type api
Script path: /home/vincent/Private/Work/workspace/owncloud/tests/acceptance
Not using php inbuilt server for running scenario ...
Updating .htaccess for proper rewrites
"maxDuration":"3600"
{"extensions" : {"Behat\\MinkExtension" : {"browser_name": "chrome", "base_url" : "http://localhost:9140", "selenium2":{"capabilities": {"marionette":null, "browser": "chrome", "name": "ownCloud non-CI", "extra_capabilities": {"maxDuration":"3600"}}, "wd_host":"http://localhost:4445/wd/hub"}}, "SensioLabs\\Behat\\PageObjectExtension" : {}}}
Running webUIMoveFilesFolders tests tagged ~@skipOnOcV&&~@skipOnOcV&&~@skipOnOcV&&~@skipOnOcV10&&~@skipOnLDAP&&@TestAlsoOnExternalUserBackend&&~@local_storage&&@issue-ocis-reva-14&&@webUI&&~@skip on browser 'chrome' 
No scenarios
No steps
0m0.14s (16.22Mb)

In ExerciseController.php line 111:
                                                                                                                                                                                       
  [Behat\Testwork\Tester\Exception\WrongPathsException]                                                                                                                                
  No specifications found at path(s) `tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature:12`. This might be because of incorrect paths configuration in your `suites`.  
                                                                                                                                                                                       

Exception trace:
  at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:111
 Behat\Testwork\Tester\Cli\ExerciseController->execute() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Cli/Command.php:63
 Behat\Testwork\Cli\Command->execute() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/symfony/console/Application.php:912
 Symfony\Component\Console\Application->doRunCommand() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/symfony/console/Application.php:264
 Symfony\Component\Console\Application->doRun() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:124
 Behat\Testwork\Cli\Application->doRun() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/symfony/console/Application.php:140
 Symfony\Component\Console\Application->run() at /srv/www/htdocs/owncloud/vendor-bin/behat/vendor/behat/behat/bin/behat:34

behat [-s|--suite SUITE] [-f|--format FORMAT] [-o|--out OUT] [--format-settings FORMAT-SETTINGS] [--init] [--lang LANG] [--name NAME] [--tags TAGS] [--role ROLE] [--story-syntax] [-d|--definitions DEFINITIONS] [--snippets-for [SNIPPETS-FOR]] [--snippets-type SNIPPETS-TYPE] [--append-snippets] [--no-snippets] [--strict] [--order ORDER] [--rerun] [--stop-on-failure] [--dry-run] [--] [<paths>]

Information: no matching scenarios were found.
runsh: Exit code of main run: 0

@individual-it

not sure if my setup is wrong, the docs are wrong or I misunderstood the docs

create & delete permissions are applied to files when shared

sharing a file with permission 31 should return 19
sharing a file with permission 29 should return 17
etc.

  Scenario Outline: Creating a share of a file with a user and asking for various permission combinations
    Given using OCS API version "<ocs_api_version>"
    And user "user1" has been created with default attributes and without skeleton files
    When user "user0" shares file "textfile0.txt" with user "user1" with permissions <requested_permissions> using the sharing API
    Then the OCS status code should be "<ocs_status_code>"
    And the HTTP status code should be "200"
    And the fields of the last response should include
      | share_with             | user1                 |
      | share_with_displayname | User One              |
      | file_target            | /textfile0.txt        |
      | path                   | /textfile0.txt        |
      | permissions            | <granted_permissions> |
      | uid_owner              | user0                 |
      | displayname_owner      | User Zero             |
      | item_type              | file                  |
      | mimetype               | text/plain            |
      | storage_id             | ANY_VALUE             |
      | share_type             | user                  |
    Examples:
      | ocs_api_version | requested_permissions | granted_permissions | ocs_status_code |
      # Ask for full permissions. You get share plus read plus update. create and delete do not apply to shares of a file
      | 1               | 31                    | 19                  | 100             |
      | 2               | 31                    | 19                  | 200             |
      # Ask for read, share (17), create and delete. You get share plus read
      | 1               | 29                    | 17                  | 100             |
      | 2               | 29                    | 17                  | 200             |
      # Ask for read, update, create, delete. You get read plus update.
      | 1               | 15                    | 3                   | 100             |
      | 2               | 15                    | 3                   | 200             |
      # Ask for just update. You get exactly update (you do not get read or anything else)
      | 1               | 2                     | 2                   | 100             |
      | 2               | 2                     | 2                   | 200             |

File list doesn't loads when a file contains &

Steps to reproduce

  1. Setup ocis-phoenix with ocis-reva backend
  2. upload some files eg .lorem.txt and new-lorem.txt
  3. Create a new file that contains & character in its name eg. &#

Result

The file gets created in the data folder but the file list is empty

description

The reason for this error seems to be because phoenix cannot parse the xml response from the webdav api when it contains such files.
If we have such file in the middle of the file list then some files show up in the list (the files that come before the one containing &) while the other files (the files that are after the one containing & in the list) are not shown.

This might be the problem with server as well since the server sent correct and parseable response before.

add desktop & mobile client ids for the oidc provider

eg for the desktop:

[http.services.oidcprovider.clients.xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69]
#http://localhost:20080/oauth2/auth?response_type=code&client_id=xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69&redirect_uri=http://localhost:56122&code_challenge=6TU6waVV6PbI3tw1vrUnECiYiKnTdrpK8hLFlcwfiVo&code_challenge_method=S256&scope=openid%20offline_access&prompt=consent
#http://localhost:56122/?error=invalid_state&error_description=The+state+is+missing+or+has+less+than+8+characters+and+is+therefore+considered+too+weak&error_hint=Request+parameter+%22state%22+must+be+at+least+be+8+characters+long+to+ensure+sufficient+entropy.&state=
id = "xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69"
redirect_uris = ["http://localhost:56122"]
grant_types = ["implicit", "refresh_token", "authorization_code", "password", "client_credentials"]
response_types = ["code"] # use authorization code flow, see https://developer.okta.com/blog/2019/05/01/is-the-oauth-implicit-flow-dead for details
scopes = ["openid", "profile", "email", "offline", "offline_access"]
#public = true # force PKCS for public clients
client_secret = "$2y$12$pKsCQPp8e/UOL1QDQhT3g.1J.KK8oMJACbEXIqRD0LiOxvgey.TtS"

but the desktop has no fixed port for the redirect_uris ... so how do we preregister it? @DeepDiver1975 care to investigate?

file path in trashbin response is absolute

When we get the trashbin files from the server the oc:trashbin-original-location property gives the absolute path.

<oc:trashbin-original-location>/lorem.txt</oc:trashbin-original-location>

As opposed to OC10 which doesn't gives the absolute path

<oc:trashbin-original-location>lorem.txt</oc:trashbin-original-location>

I'm not sure which is the correct behavior but just noticed the difference

Http GET on dav path of a folder gives 501

sending http GET on dav path of a folder gives 501 response even if the folder exists

curl -X GET http://localhost:9140/remote.php/dav/files/user0/simple -u user0:123456 -v
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9140 (#0)
* Server auth using Basic with user 'user0'
> GET /remote.php/dav/files/user0/simple HTTP/1.1
> Host: localhost:9140
> Authorization: Basic dXNlcjA6MTIzNDU2
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 501 Not Implemented
< Access-Control-Allow-Origin: *
< Vary: Origin
< X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTgzMTMyNzg5LCJpYXQiOjE1ODMxMjkxODksInVzZXIiOnsiaWQiOnsib3BhcXVlX2lkIjoidXNlcjAifSwidXNlcm5hbWUiOiJ1c2VyMCIsIm1haWwiOiJ1c2VyMEBleGFtcGxlLm9yZyIsImRpc3BsYXlfbmFtZSI6IlVzZXIgWmVybyJ9fQ.6zvWT0ndM6H9t8zyrEC9F4XF1Mo6IlmWGzbAao7_gMg
< Date: Mon, 02 Mar 2020 06:06:29 GMT
< Content-Length: 0
< 
* Connection #0 to host localhost left intact 

running instructions in README.md do not work

when running ocis-reva according to the readme https://github.com/owncloud/ocis-reva/#development
I get:

3:40PM WRN home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/services/authprovider/authprovider.go:107 > error authenticating user error="authsvc: error in Authenticate: LDAP Result Code 200 \"Network Error\": dial tcp 127.0.0.1:9126: connect: connection refused" pid=31522 pkg=rgrpc traceid=a49d3a213aec7c7d97e139c1cc10f75f
3:40PM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="09/Apr/2020:15:40:12 +0545" from=tcp://127.0.0.1:32956 pid=31522 pkg=rgrpc start="09/Apr/2020:15:40:12 +0545" time_ns=3672823 traceid=a49d3a213aec7c7d97e139c1cc10f75f uri=/cs3.auth.provider.v1beta1.ProviderAPI/Authenticate user-agent=grpc-go/1.28.0
3:40PM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/services/gateway/authprovider.go:64 > error authenticating credentials to auth provider for type: basic error="gateway: grpc failed with code CODE_UNAUTHENTICATED" pid=31520 pkg=rgrpc traceid=a49d3a213aec7c7d97e139c1cc10f75f
3:40PM WRN home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/services/gateway/authprovider.go:66 >  error="gateway: grpc failed with code CODE_UNAUTHENTICATED" pid=31520 pkg=rgrpc traceid=a49d3a213aec7c7d97e139c1cc10f75f
3:40PM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="09/Apr/2020:15:40:12 +0545" from=tcp://127.0.0.1:48318 pid=31520 pkg=rgrpc start="09/Apr/2020:15:40:12 +0545" time_ns=34340880 traceid=a49d3a213aec7c7d97e139c1cc10f75f uri=/cs3.gateway.v1beta1.GatewayAPI/Authenticate user-agent=grpc-go/1.28.0
3:40PM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/interceptors/auth/auth.go:212 > error generating access token from credentials error="auth: grpc failed with code CODE_UNAUTHENTICATED" pid=31519 pkg=rhttp traceid=a49d3a213aec7c7d97e139c1cc10f75f
3:40PM WRN home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/interceptors/log/log.go:112 > http end="09/Apr/2020:15:40:12 +0545" host=127.0.0.1 method=PROPFIND pid=31519 pkg=rhttp proto=HTTP/1.1 size=0 start="09/Apr/2020:15:40:12 +0545" status=401 time_ns=40030303 traceid=a49d3a213aec7c7d97e139c1cc10f75f uri=/remote.php/dav/files/ url=/remote.php/dav/files/

multiple values missing in response when sharing file

sharing a file does not return the following values:

  • file_target
  • item_type
  • mimetype
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
   <meta>
      <status>ok</status>
      <statuscode>100</statuscode>
      <message>OK</message>
   </meta>
   <data>
      <id>11</id>
      <share_type>0</share_type>
      <uid_owner>user0</uid_owner>
      <displayname_owner>User Zero</displayname_owner>
      <permissions>31</permissions>
      <stime>1580198585</stime>
      <parent />
      <expiration />
      <token />
      <uid_file_owner>user0</uid_file_owner>
      <displayname_file_owner>User Zero</displayname_file_owner>
      <path>/home/textfile0.txt</path>
      <item_type />
      <mimetype />
      <storage_id />
      <storage>0</storage>
      <item_source />
      <file_source />
      <file_parent />
      <file_target />
      <share_with>user1@localhost</share_with>
      <share_with_displayname>User One</share_with_displayname>
      <share_with_additional_info />
      <mail_send />
   </data>
</ocs>

sharing fails with `error searching recipient`

since 11816f7 its impossible to share

to reproduce:

  1. from ocis repo start micro and phoenix0 bin/ocis micro & bin/ocis phoenix
  2. start reva with
bin/ocis-reva gateway & bin/ocis-reva users & bin/ocis-reva auth-basic & bin/ocis-reva auth-bearer & bin/ocis-reva sharing & bin/ocis-reva storage-root & REVA_STORAGE_HOME_EXPOSE_DATA_SERVER=1 bin/ocis-reva storage-home & bin/ocis-reva storage-home-data & REVA_STORAGE_OC_EXPOSE_DATA_SERVER=1 bin/ocis-reva storage-oc & bin/ocis-reva storage-oc-data & bin/ocis-reva frontend
  1. upload a file curl -X PUT http://localhost:9140/remote.php/webdav/home/textfile0.txt -d "123" -u einstein:relativity
  2. make sure the file is uploaded curl -X PROPFIND http://localhost:9140/remote.php/webdav/home -u einstein:relativity
  3. try to share the file curl -X POST http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares -u einstein:relativity -d "permissions=31&path=%2Fhome%2Ftextfile0.txt&shareType=0&shareWith=richard"

result: <ocs><meta><status>error</status><statuscode>996</statuscode><message>error searching recipient</message></meta></ocs>

reva console output

10:48AM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/interceptors/log/log.go:69 > unary code=Unknown end="30/Jan/2020:10:48:49 +0545" from=tcp://127.0.0.1:54230 pid=11904 pkg=rgrpc start="30/Jan/2020:10:48:49 +0545" time_ns=644448 traceid=2a8408e117c0d1ef98524e3db15b7001 uri=/cs3.gateway.v1beta1.GatewayAPI/FindUsers user-agent=grpc-go/1.26.0
10:48AM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/owncloud/ocs/reqres.go:94 > error searching recipient error="rpc error: code = Unknown desc = gateway: error calling GetUser: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9144: connect: connection refused\"" pid=11922 pkg=rhttp traceid=2a8408e117c0d1ef98524e3db15b7001

cannot share with marie

  • in ocis run make eos-start and wait tile eos & ocis are running
  • log in as einstein and share a folder to marie:
curl 'https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares' -u einstein:relativity -d 'shareType=0&shareWith=marie&path=%2Ffrom+einstein&permissions=1' -k

expected:

  • marie should now be a collaborator on the folder from einstein

actual:

Error while sharing.
not found

Log:

2020-03-31T09:11:37+02:00 DBG director found path=/ocs/v1.php/apps/files_sharing/api/v1/shares policy=reva prefix=/ocs/ routeType=prefix service=proxy
9:11AM WRN home/jfd/Repositories/reva/internal/http/interceptors/auth/auth.go:164 > core access token not set pid=12226 pkg=rhttp traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/internal/http/interceptors/auth/auth.go:172 > credentials obtained from credential strategy: &{Type:basic ClientID:einstein ClientSecret:relativity} pid=12226 pkg=rhttp traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/internal/http/interceptors/auth/auth.go:194 > AuthenticateRequest: type:"basic" client_id:"einstein" client_secret:"relativity"  against localhost:9142 pid=12226 pkg=rhttp traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/internal/grpc/interceptors/auth/auth.go:85 > skipping auth method=/cs3.gateway.v1beta1.GatewayAPI/Authenticate pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/internal/grpc/interceptors/auth/auth.go:85 > skipping auth method=/cs3.auth.registry.v1beta1.RegistryAPI/GetAuthProvider pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60640 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=264781 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.auth.registry.v1beta1.RegistryAPI/GetAuthProvider user-agent=grpc-go/1.26.0
9:11AM DBG home/jfd/Repositories/reva/internal/grpc/interceptors/auth/auth.go:85 > skipping auth method=/cs3.auth.provider.v1beta1.ProviderAPI/Authenticate pid=12224 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
2020-03-31T09:11:37+02:00 DBG Bind request basedn=dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49764,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Bind success binddn=cn=reva,ou=sysusers,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49764,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Search request basedn=,dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org filter=(&(objectclass=posixAccount)(cn=einstein)) name=glauth service=glauth src={"IP":"::1","Port":49764,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG AP: Search OK filter=(&(objectclass=posixAccount)(cn=einstein)) name=glauth service=glauth verbosity=6
9:11AM DBG home/jfd/Repositories/reva/pkg/auth/manager/ldap/ldap.go:127 > entries entries=[{"Attributes":[{"ByteValues":["ZWluc3RlaW4="],"Name":"uid","Values":["einstein"]},{"ByteValues":["RWluc3RlaW4="],"Name":"sn","Values":["Einstein"]},{"ByteValues":["ZWluc3RlaW5AZXhhbXBsZS5vcmc="],"Name":"mail","Values":["[email protected]"]}],"DN":"cn=einstein,ou=users,dc=example,dc=org"}] pid=12224 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
2020-03-31T09:11:37+02:00 DBG Bind request basedn=dc=example,dc=org binddn=cn=einstein,ou=users,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49764,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Bind success binddn=cn=einstein,ou=users,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49764,"Zone":""} verbosity=6
9:11AM INF home/jfd/Repositories/reva/internal/grpc/services/authprovider/authprovider.go:112 > user id:<opaque_id:"einstein" > username:"einstein" mail:"[email protected]" display_name:"Einstein"  authenticated pid=12224 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:58390 pid=12224 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=14015531 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.auth.provider.v1beta1.ProviderAPI/Authenticate user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60770 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=229796 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetHome user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/services/gateway/storageprovider.go:135 > gateway: home for user at provider=localhost:9154 pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:07:11:37 +0000" from=tcp://172.18.0.1:37170 pid=12376 pkg=rgrpc start="31/Mar/2020:07:11:37 +0000" time_ns=403722 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.provider.v1beta1.ProviderAPI/GetHome user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60770 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=182064 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider user-agent=grpc-go/1.26.0
7:11AM DBG home/jfd/Repositories/reva/pkg/storage/fs/eos/eos.go:258 > eos: wrap external=/ internal=/eos/dockertest/einstein pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM INF home/jfd/Repositories/reva/pkg/eosclient/eosclient.go:258 > eos cmd args="[/usr/bin/eos -r 0 0 file info /eos/dockertest/einstein -m --comment 524f3871c7fb204e6f2b40a5b6fcfde3]" env=[EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch:1094] err= exit=0 pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM INF home/jfd/Repositories/reva/pkg/eosclient/eosclient.go:258 > eos cmd args="[/usr/bin/eos -r 0 0 file info /eos/.shadow/dockertest/einstein -m --comment 524f3871c7fb204e6f2b40a5b6fcfde3]" env=[EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch:1094] err= exit=0 pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:07:11:37 +0000" from=tcp://172.18.0.1:37170 pid=12376 pkg=rgrpc start="31/Mar/2020:07:11:37 +0000" time_ns=43379833 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.provider.v1beta1.ProviderAPI/CreateHome user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60638 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=65591640 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.gateway.v1beta1.GatewayAPI/Authenticate user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/http/interceptors/auth/auth.go:217 > core access token generated pid=12226 pkg=rhttp traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/pkg/rhttp/rhttp.go:238 > http routing: head=ocs tail=/v1.php/apps/files_sharing/api/v1/shares svc=ocs pid=12226 pkg=rhttp
9:11AM DBG home/jfd/Repositories/reva/internal/http/services/owncloud/ocs/ocs.go:93 > ocs routing head=v1.php pid=12226 pkg=rhttp tail=/apps/files_sharing/api/v1/shares traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/internal/http/services/owncloud/ocs/shares.go:63 > http routing head=shares pid=12226 pkg=rhttp tail=/ traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM DBG home/jfd/Repositories/reva/internal/grpc/interceptors/auth/auth.go:85 > skipping auth method=/cs3.gateway.v1beta1.GatewayAPI/GetHome pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60770 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=88201 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetHome user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/services/gateway/storageprovider.go:135 > gateway: home for user at provider=localhost:9154 pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:07:11:37 +0000" from=tcp://172.18.0.1:37170 pid=12376 pkg=rgrpc start="31/Mar/2020:07:11:37 +0000" time_ns=255846 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.provider.v1beta1.ProviderAPI/GetHome user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60638 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=1410864 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.gateway.v1beta1.GatewayAPI/GetHome user-agent=grpc-go/1.26.0
9:11AM DBG home/jfd/Repositories/reva/internal/grpc/interceptors/auth/auth.go:85 > skipping auth method=/cs3.gateway.v1beta1.GatewayAPI/GetUser pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
2020-03-31T09:11:37+02:00 DBG Bind request basedn=dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49770,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Bind success binddn=cn=reva,ou=sysusers,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49770,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Search request basedn=,dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org filter=(&(objectclass=posixAccount)(cn=marie*)) name=glauth service=glauth src={"IP":"::1","Port":49770,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG AP: Search OK filter=(&(objectclass=posixAccount)(cn=marie*)) name=glauth service=glauth verbosity=6
9:11AM DBG home/jfd/Repositories/reva/pkg/user/manager/ldap/ldap.go:145 > entries entries=[{"Attributes":[{"ByteValues":["bWFyaWU="],"Name":"uid","Values":["marie"]},{"ByteValues":["Q3VyaWU="],"Name":"sn","Values":["Curie"]},{"ByteValues":["bWFyaWVAZXhhbXBsZS5vcmc="],"Name":"mail","Values":["[email protected]"]}],"DN":"cn=marie,ou=users,dc=example,dc=org"}] pid=12233 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
2020-03-31T09:11:37+02:00 DBG Bind request basedn=dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49772,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Bind success binddn=cn=reva,ou=sysusers,dc=example,dc=org name=glauth service=glauth src={"IP":"::1","Port":49772,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG Search request basedn=,dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org filter=(&(objectclass=posixGroup)(cn=marie*)) name=glauth service=glauth src={"IP":"::1","Port":49772,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG AP: Search OK filter=(&(objectclass=posixGroup)(cn=marie*)) name=glauth service=glauth verbosity=6
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:56868 pid=12233 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=7433764 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.identity.user.v1beta1.UserAPI/GetUser user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60638 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=7887467 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.gateway.v1beta1.GatewayAPI/GetUser user-agent=grpc-go/1.26.0
9:11AM DBG home/jfd/Repositories/reva/internal/grpc/interceptors/auth/auth.go:85 > skipping auth method=/cs3.gateway.v1beta1.GatewayAPI/Stat pid=12227 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60770 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=102879 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider user-agent=grpc-go/1.26.0
7:11AM INF home/jfd/Repositories/reva/pkg/storage/fs/eos/eos.go:618 > eos: get md for ref:path:"/dockertest/einstein/from einstein"  pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM DBG home/jfd/Repositories/reva/pkg/storage/fs/eos/eos.go:258 > eos: wrap external=/dockertest/einstein/from einstein internal=/eos/dockertest/einstein/dockertest/einstein/from einstein pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
2020-03-31T09:11:37+02:00 DBG Search request basedn=,dc=example,dc=org binddn=cn=reva,ou=sysusers,dc=example,dc=org filter=(&(objectClass=posixAccount)(uid=einstein)) name=glauth service=glauth src={"IP":"172.18.0.7","Port":41476,"Zone":""} verbosity=6
2020-03-31T09:11:37+02:00 DBG AP: Search OK filter=(&(objectClass=posixAccount)(uid=einstein)) name=glauth service=glauth verbosity=6
7:11AM INF home/jfd/Repositories/reva/pkg/eosclient/eosclient.go:258 > eos cmd args="[/usr/bin/eos -r 20000 30000 file info /eos/dockertest/einstein/dockertest/einstein/from einstein -m --comment 524f3871c7fb204e6f2b40a5b6fcfde3]" env=[EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch:1094] err="error: cannot stat '/eos/dockertest/einstein/dockertest/einstein/from einstein'\n (errc=2) (No such file or directory)\n" exit=2 pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM WRN home/jfd/Repositories/reva/internal/grpc/services/storageprovider/storageprovider.go:426 > file not found pid=12376 pkg=rgrpc traceid=524f3871c7fb204e6f2b40a5b6fcfde3
7:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:07:11:37 +0000" from=tcp://172.18.0.1:37170 pid=12376 pkg=rgrpc start="31/Mar/2020:07:11:37 +0000" time_ns=21450496 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.storage.provider.v1beta1.ProviderAPI/Stat user-agent=grpc-go/1.26.0
9:11AM INF home/jfd/Repositories/reva/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="31/Mar/2020:09:11:37 +0200" from=tcp://[::1]:60638 pid=12227 pkg=rgrpc start="31/Mar/2020:09:11:37 +0200" time_ns=22808333 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/cs3.gateway.v1beta1.GatewayAPI/Stat user-agent=grpc-go/1.26.0
2020-03-31 09:11:37.199780 I | http: superfluous response.WriteHeader call from go.opencensus.io/plugin/ochttp.(*trackingResponseWriter).WriteHeader (server.go:221)
9:11AM WRN home/jfd/Repositories/reva/internal/http/interceptors/log/log.go:112 > http end="31/Mar/2020:09:11:37 +0200" host=::1 method=POST pid=12226 pkg=rhttp proto=HTTP/1.1 size=141 start="31/Mar/2020:09:11:37 +0200" status=404 time_ns=100781741 traceid=524f3871c7fb204e6f2b40a5b6fcfde3 uri=/ocs/v1.php/apps/files_sharing/api/v1/shares url=/ocs/v1.php/apps/files_sharing/api/v1/shares

Document how to run the tests in drone and reenable them

What are the steps for adding new tests or enabling old ones ?
One can already run those locally.

I guess that the steps are as follows:

  1. Submit PR to the owncloud/core repository with the new tests or a commit that removes the @skipOnOCIS tags
  2. ??? PR to ocis-reva to run Drone and link it to the branch in the core repo ???

Context would be to run #67

@individual-it

dav path does not contain user-name anymore

after fbf131c the path for the "new" webdav path does not contain a username anymore
working path now is /remote.php/dav/files/textfile0.txt it used to be /remote.php/dav/files/oc/einstein/textfile0.txt

So it lost oc/einstein but should have only lost oc/

PROPFIND on the root of the /webdav endpoints returns ERROR 500

curl -X PROPFIND http://localhost:9140/remote.php/webdav -u user1:1234 -v
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9140 (#0)
* Server auth using Basic with user 'user1'
> PROPFIND /remote.php/webdav HTTP/1.1
> Host: localhost:9140
> Authorization: Basic dXNlcjE6MTIzNA==
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 500 Internal Server Error

PROPFIND does not return custom file properties

request:

PROPFIND /remote.php/webdav/home/somefile.txt HTTP/1.1

<?xml version="1.0"?>
				<d:propfind
				   xmlns:d="DAV:"
				   xmlns:oc="http://owncloud.org/ns"
				   xmlns:ocs="http://open-collaboration-services.org/ns"
				   >
				    <d:prop><oc:privatelink/></d:prop>
				</d:propfind>

response

HTTP/1.1 207 Multi-Status

<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/webdav/home/somefile.txt</d:href><d:propstat><d:prop></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><oc:privatelink></oc:privatelink></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>

cannot login to Phoenix

since 11816f7 its impossible to login to Phoenix

to reproduce:

  1. from ocis repo start micro and phoenix bin/ocis micro & bin/ocis phoenix
  2. start reva with
bin/ocis-reva gateway & bin/ocis-reva users & bin/ocis-reva auth-basic & bin/ocis-reva auth-bearer & bin/ocis-reva sharing & bin/ocis-reva storage-root & REVA_STORAGE_HOME_EXPOSE_DATA_SERVER=1 bin/ocis-reva storage-home & bin/ocis-reva storage-home-data & REVA_STORAGE_OC_EXPOSE_DATA_SERVER=1 bin/ocis-reva storage-oc & bin/ocis-reva storage-oc-data & bin/ocis-reva frontend

while starting an error is shown:

10:38AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/cmd/revad/runtime/runtime.go:65 > host info: artur-OptiPlex-3050 pid=10443
panic: interface conversion: flag.Value is *flag.stringValue, not *cli.StringSlice

goroutine 1 [running]:
github.com/micro/cli/v2.lookupStringSlice(...)
	10:38AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/cmd/revad/runtime/runtime.go:141 > running on 4 cpus pid=10443
/home/artur/go/pkg/mod/github.com/micro/cli/[email protected]/flag_string_slice.go:152
github.com/micro/cli/v2.(*Context).StringSlice(0xc00049f180, 0x11cb9ad, 0x7, 0xc0005eb440, 0x4, 0x0)
	/home/artur/go/pkg/mod/github.com/micro/cli/[email protected]/flag_string_slice.go:144 +0x104
github.com/owncloud/ocis-reva/pkg/command.Users.func1(0xc00049f180, 0x1d, 0x38)
	/home/artur/www/ocis-reva/pkg/command/users.go:26 +0x4d
github.com/micro/cli/v2.(*Command).Run(0xc0005e212010:38AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/cmd/revad/internal/grace/grace.go:181 > pidfile saved at: /tmp/revad-storage-home-data-24ec9eeb-0ad6-4944-b9d2-d6bfed533214.pid pid=10443 pkg=grace
, 0xc00049e940, 0x0, 0x0)
	/home/artur/go/pkg/mod/github.com/micro/cli/[email protected]/command.go:148 +0x57c
github.com/micro/cli/v2.(*App).RunContext(0xc0005f2000, 0x17db4c0, 0xc0000b8010, 0xc0000be000, 0x2, 0x2, 0x0, 0x0)
	/home/artur/go/pkg/mod/github.com/micro/cli/[email protected]/app.go:302 +0x790
github.com/micro/cli/v2.(*App).Run(...)
	/home/artur/go/pkg/mod/github.com/micro/cli/[email protected]/app.go:210
github.com/owncloud/ocis-reva/pkg/command.Execute(0x9e000, 0xc00009c058)
10:38AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:206 > http service enabled: dataprovider@/data pid=10443 pkg=rhttp
	/home/artur/www/ocis-reva/pkg/command/root.go:102 +0xa12
main.main()
	/home/artur/www/ocis-reva/cmd/ocis-reva/main.go:10 +0x22
10:38AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:107 > http server listening at http://0.0.0.0:9156 pid=10443 pkg=rhttp
{"level":"info","service":"reva","time":"2020-01-30T10:38:37+05:45","message":"Continue without config"}
{"level":"info","service":"reva","transport":"debug","addr":"0.0.0.0:9141","time":"2020-01-30T10:38:37+05:45","message":"Starting server"}
10:38AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/cmd/revad/runtime/runtime.go:65 > host info: artur-OptiPlex-3050 pid=10450

when trying to login to phoenix Login Error Page is shown in Phoenix and this error in the reva log output:

10:39AM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/oidcprovider/oidcprovider.go:169 > oidcprovider routing: head=userinfo tail=/ pid=10450 pkg=rhttp traceid=8ab17023c2f50b7176c14c2fd71e5cb1
internal token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTgwMzYzNjU5LCJpYXQiOjE1ODAzNjAwNTksImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTk5OCIsInVzZXIiOnsiaWQiOnsiaWRwIjoiaHR0cDovL2xvY2FsaG9zdDo5OTk4Iiwib3BhcXVlX2lkIjoiNGM1MTBhZGEtYzg2Yi00ODE1LTg4MjAtNDJjZGY4MmMzZDUxIn0sInVzZXJuYW1lIjoiZWluc3RlaW4iLCJtYWlsIjoiZWluc3RlaW5AZXhhbXBsZS5vcmciLCJkaXNwbGF5X25hbWUiOiJBbGJlcnQgRWluc3RlaW4iLCJncm91cHMiOlsic2FpbGluZy1sb3ZlcnMiLCJ2aW9saW4taGF0ZXJzIiwicGh5c2ljcy1sb3ZlcnMiXX19.JcfMNgHxDndOGuAGI5hKCesTC68pQt6lSJkzwhcHZEE subject: 4c510ada-c86b-4815-8820-42cdf82c3d51 session:&{DefaultSession:0xc000553280 internalToken:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTgwMzYzNjU5LCJpYXQiOjE1ODAzNjAwNTksImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTk5OCIsInVzZXIiOnsiaWQiOnsiaWRwIjoiaHR0cDovL2xvY2FsaG9zdDo5OTk4Iiwib3BhcXVlX2lkIjoiNGM1MTBhZGEtYzg2Yi00ODE1LTg4MjAtNDJjZGY4MmMzZDUxIn0sInVzZXJuYW1lIjoiZWluc3RlaW4iLCJtYWlsIjoiZWluc3RlaW5AZXhhbXBsZS5vcmciLCJkaXNwbGF5X25hbWUiOiJBbGJlcnQgRWluc3RlaW4iLCJncm91cHMiOlsic2FpbGluZy1sb3ZlcnMiLCJ2aW9saW4taGF0ZXJzIiwicGh5c2ljcy1sb3ZlcnMiXX19.JcfMNgHxDndOGuAGI5hKCesTC68pQt6lSJkzwhcHZEE}10:39AM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/interceptors/log/log.go:69 > unary code=Unknown end="30/Jan/2020:10:39:20 +0545" from=tcp://127.0.0.1:52456 pid=10436 pkg=rgrpc start="30/Jan/2020:10:39:20 +0545" time_ns=271492 traceid=8ab17023c2f50b7176c14c2fd71e5cb1 uri=/cs3.gateway.v1beta1.GatewayAPI/GetUser user-agent=grpc-go/1.26.0
10:39AM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/oidcprovider/userinfo.go:99 > error calling GetUser error="rpc error: code = Unknown desc = gateway: error calling GetUser: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9144: connect: connection refused\"" pid=10450 pkg=rhttp traceid=8ab17023c2f50b7176c14c2fd71e5cb1
10:39AM ERR home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/interceptors/log/log.go:112 > http end="30/Jan/2020:10:39:20 +0545" host=127.0.0.1 method=GET pid=10450 pkg=rhttp proto=HTTP/1.1 size=0 start="30/Jan/2020:10:39:20 +0545" status=500 time_ns=1097640 traceid=8ab17023c2f50b7176c14c2fd71e5cb1 uri=/oauth2/userinfo url=/oauth2/userinfo

Run tests in parallel in drone CI

Currently we run all tests in single pipeline in CI.
When the volume of the tests increases it will take longer time to complete.
It would be better to run tests in different pipelines in parallel to reduce CI runtime.

listing received shares does not work

einstein shares a folder to marie

marie should:

  1. see the incoming folder in the list of incoming shares
  2. see the incoming folder in her home folder
  3. be able to navigate into the shared folder
  4. be able to read files from the shared folder

what happens:

  • nothing :(

creating a folder that already exists returns HTTP 405 Method Not Allowed

$ curl -X MKCOL http://localhost:9140/remote.php/dav/files/user1/f1 -u user1:1234 -v 
*   Trying 127.0.0.1:9140...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9140 (#0)
* Server auth using Basic with user 'user1'
> MKCOL /remote.php/dav/files/user1/f1 HTTP/1.1
> Host: localhost:9140
> Authorization: Basic dXNlcjE6MTIzNA==
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Access-Control-Allow-Origin: *
< Vary: Origin
< X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTg4NTc4MzkyLCJpYXQiOjE1ODg1NzQ3OTIsImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJ1c2VyIjp7ImlkIjp7ImlkcCI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJvcGFxdWVfaWQiOiJ1c2VyMSJ9LCJ1c2VybmFtZSI6InVzZXIxIiwibWFpbCI6InVzZXIxQGV4YW1wbGUub3JnIiwiZGlzcGxheV9uYW1lIjoiVXNlciBPbmUifX0.NLsx_jlYgKFKh4PjuP-0ktFAViq2mi5-MjL1ZH9VoKw
< Date: Mon, 04 May 2020 06:46:32 GMT
< Content-Length: 0
< 
* Connection #0 to host localhost left intact

$ curl -X MKCOL http://localhost:9140/remote.php/dav/files/user1/f1 -u user1:1234 -v 
*   Trying 127.0.0.1:9140...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9140 (#0)
* Server auth using Basic with user 'user1'
> MKCOL /remote.php/dav/files/user1/f1 HTTP/1.1
> Host: localhost:9140
> Authorization: Basic dXNlcjE6MTIzNA==
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Access-Control-Allow-Origin: *
< Vary: Origin
< X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTg4NTc4Mzk1LCJpYXQiOjE1ODg1NzQ3OTUsImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJ1c2VyIjp7ImlkIjp7ImlkcCI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJvcGFxdWVfaWQiOiJ1c2VyMSJ9LCJ1c2VybmFtZSI6InVzZXIxIiwibWFpbCI6InVzZXIxQGV4YW1wbGUub3JnIiwiZGlzcGxheV9uYW1lIjoiVXNlciBPbmUifX0.dz76kZ6isrskdiBMIdswzbT8OlmvzAzrpCS2EJQ5AN4
< Date: Mon, 04 May 2020 06:46:35 GMT
< Content-Length: 0
< 
* Connection #0 to host localhost left intact

vs oC10

$ curl -X MKCOL http://localhost/owncloud-core/remote.php/dav/files/uu1/f1 -u uu1:uu1 -v
*   Trying 127.0.0.1:80...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'uu1'
> MKCOL /owncloud-core/remote.php/dav/files/uu1/f1 HTTP/1.1
> Host: localhost
> Authorization: Basic dXUxOnV1MQ==
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Date: Mon, 04 May 2020 06:49:06 GMT
< Server: Apache/2.4.43 (Ubuntu)
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< X-Robots-Tag: none
< X-Frame-Options: SAMEORIGIN
< X-Download-Options: noopen
< X-Permitted-Cross-Domain-Policies: none
< Set-Cookie: oc4kyqahfanl=359lvlh8bm1tspd113v6nfo7mb; path=/owncloud-core; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< Set-Cookie: oc_sessionPassphrase=gKID%2BJjR5cg%2FQm080YjITUU46kXyiXByFZDioCNX%2FFTTA6fARoCV4%2BIQUL21A1ZtQPWiztomF3W2ZbLYT0%2FuOuJObLlgOs0V0%2FE3gX%2BM0g1tZMIVDExXoKYndjDU5rZM; path=/owncloud-core; HttpOnly
< Content-Security-Policy: default-src 'none';
< Set-Cookie: oc4kyqahfanl=patk0csl6ad4qsn91hvjnval22; path=/owncloud-core; HttpOnly
< Set-Cookie: cookie_test=test; expires=Mon, 04-May-2020 07:49:06 GMT; Max-Age=3600
< OC-FileId: 2147535348oc4kyqahfanl
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< 
* Connection #0 to host localhost left intact

$ curl -X MKCOL http://localhost/owncloud-core/remote.php/dav/files/uu1/f1 -u uu1:uu1 -v
*   Trying 127.0.0.1:80...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'uu1'
> MKCOL /owncloud-core/remote.php/dav/files/uu1/f1 HTTP/1.1
> Host: localhost
> Authorization: Basic dXUxOnV1MQ==
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Date: Mon, 04 May 2020 06:49:13 GMT
< Server: Apache/2.4.43 (Ubuntu)
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< X-Robots-Tag: none
< X-Frame-Options: SAMEORIGIN
< X-Download-Options: noopen
< X-Permitted-Cross-Domain-Policies: none
< Set-Cookie: oc4kyqahfanl=33t2jg58bvihkuh8uni0be5dsc; path=/owncloud-core; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< Set-Cookie: oc_sessionPassphrase=M17sap3Lsxy6IpxBAODEQ7JQXhgUZfHcciz6KZjt9jPeDCCGlkDQtu%2B0PiB0cyN%2B4u06sSHjvta9%2Fyivw3Paqgy4pUe42Qf%2BIvMfi6YohA3sL7S2JjCbOBTaSKE4Pxqm; path=/owncloud-core; HttpOnly
< Content-Security-Policy: default-src 'none';
< Set-Cookie: oc4kyqahfanl=8psntuhr14t43f6rndr1449ftg; path=/owncloud-core; HttpOnly
< Set-Cookie: cookie_test=test; expires=Mon, 04-May-2020 07:49:13 GMT; Max-Age=3600
< Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, LOCK, UNLOCK
< Content-Length: 247
< Content-Type: application/xml; charset=utf-8
< 
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\MethodNotAllowed</s:exception>
  <s:message>The resource you tried to create already exists</s:message>
</d:error>
* Connection #0 to host localhost left intact

renaming a resource does not work

trying to rename a file results in an empty reply

curl 'http://localhost:9140/remote.php/webdav/home/welcome.txt' -X MOVE -u user0:123456 -H 'Destination: http://localhost:9140/remote.php/webdav/home/welcome2.txt' 
curl: (52) Empty reply from server
1:13PM INF home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/owncloud/ocdav/move.go:39 > move dst=http://localhost:9140/remote.php/webdav/home/welcome2.txt overwrite= pid=6325 pkg=rhttp src=/home/welcome.txt traceid=93fa45c24cd755393dac52fe88f46f82
2020-01-21 13:13:08.180761 I | http: panic serving 127.0.0.1:54654: interface conversion: interface {} is nil, not string
goroutine 42 [running]:
net/http.(*conn).serve.func1(0xc0007666e0)
	/usr/local/go/src/net/http/server.go:1767 +0x139
panic(0x20be9e0, 0xc0016244e0)
	/usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/cs3org/reva/internal/http/services/owncloud/ocdav.(*svc).doMove(0xc00000ff00, 0x7fb5003c3390, 0xc0007623c0, 0xc00010f400, 0xc0011070a8, 0x1)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/owncloud/ocdav/move.go:71 +0x1b61
github.com/cs3org/reva/internal/http/services/owncloud/ocdav.(*WebDavHandler).Handler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010f400)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/owncloud/ocdav/webdav.go:57 +0x1ec
net/http.HandlerFunc.ServeHTTP(0xc0002d7420, 0x7fb5003c3390, 0xc0007623c0, 0xc00010f400)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/internal/http/services/owncloud/ocdav.(*svc).Handler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010ec00)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/services/owncloud/ocdav/ocdav.go:148 +0x629
net/http.HandlerFunc.ServeHTTP(0xc0015ea290, 0x7fb5003c3390, 0xc0007623c0, 0xc00010ec00)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/pkg/rhttp.traceHandler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010e400)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:300 +0x185
net/http.HandlerFunc.ServeHTTP(0xc0002a1560, 0x7fb5003c3390, 0xc0007623c0, 0xc00010e400)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/pkg/rhttp.(*Server).getHandler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010e400)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:247 +0x46b
net/http.HandlerFunc.ServeHTTP(0xc0015eaaf0, 0x7fb5003c3390, 0xc0007623c0, 0xc00010e400)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/pkg/rhttp.traceHandler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010e300)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:300 +0x185
net/http.HandlerFunc.ServeHTTP(0xc0002a17a0, 0x7fb5003c3390, 0xc0007623c0, 0xc00010e300)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/rs/cors.(*Cors).Handler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010e300)
	/home/artur/go/pkg/mod/github.com/rs/[email protected]/cors.go:219 +0x1b8
net/http.HandlerFunc.ServeHTTP(0xc0000c2840, 0x7fb5003c3390, 0xc0007623c0, 0xc00010e300)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/pkg/rhttp.traceHandler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc00010e100)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:300 +0x185
net/http.HandlerFunc.ServeHTTP(0xc0002a1aa0, 0x7fb5003c3390, 0xc0007623c0, 0xc00010e100)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/internal/http/interceptors/auth.New.func1.1(0x7fb5003c3390, 0xc0007623c0, 0xc000221300)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/interceptors/auth/auth.go:230 +0xdb9
net/http.HandlerFunc.ServeHTTP(0xc0006e8bd0, 0x7fb5003c3390, 0xc0007623c0, 0xc000221300)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/pkg/rhttp.traceHandler.func1(0x7fb5003c3390, 0xc0007623c0, 0xc000221200)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:300 +0x185
net/http.HandlerFunc.ServeHTTP(0xc0002a1ad0, 0x7fb5003c3390, 0xc0007623c0, 0xc000221200)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/internal/http/interceptors/log.loggingHandler.ServeHTTP(0x2a2d7c0, 0xc0002a1ad0, 0x2a65d60, 0xc000550230, 0xc000221200)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/interceptors/log/log.go:57 +0x297
github.com/cs3org/reva/pkg/rhttp.traceHandler.func1(0x2a65d60, 0xc000550230, 0xc000221100)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/pkg/rhttp/rhttp.go:300 +0x185
net/http.HandlerFunc.ServeHTTP(0xc0002a1b30, 0x2a65d60, 0xc000550230, 0xc000221100)
	/usr/local/go/src/net/http/server.go:2007 +0x44
github.com/cs3org/reva/internal/http/interceptors/appctx.handler.func1(0x2a65d60, 0xc000550230, 0xc000221000)
	/home/artur/go/pkg/mod/github.com/cs3org/[email protected]/internal/http/interceptors/appctx/appctx.go:52 +0x5e5
net/http.HandlerFunc.ServeHTTP(0xc00011a4d0, 0x2a65d60, 0xc000550230, 0xc000221000)
	/usr/local/go/src/net/http/server.go:2007 +0x44
go.opencensus.io/plugin/ochttp.(*Handler).ServeHTTP(0xc0000e9270, 0x2a65d60, 0xc000550230, 0xc000220e00)
	/home/artur/go/pkg/mod/[email protected]/plugin/ochttp/server.go:92 +0x2b9
net/http.serverHandler.ServeHTTP(0xc0001182a0, 0x2a644e0, 0xc000118380, 0xc000220e00)
	/usr/local/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc0007666e0, 0x2a6c8e0, 0xc00008a540)
	/usr/local/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2927 +0x38e

security headers not served when downloading a file

expectation:

    When user "user0" downloads file "/welcome.txt" using the WebDAV API
    Then the following headers should be set
      | header                            | value                                                            |
      | Content-Disposition               | attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt" |
      | Content-Security-Policy           | default-src 'none';                                              |
      | X-Content-Type-Options            | nosniff                                                          |
      | X-Download-Options                | noopen                                                           |
      | X-Frame-Options                   | SAMEORIGIN                                                       |
      | X-Permitted-Cross-Domain-Policies | none                                                             |
      | X-Robots-Tag                      | none                                                             |
      | X-XSS-Protection                  | 1; mode=block                                                    |

reality:

GET /remote.php/dav/files/oc/user0/welcome.txt HTTP/1.1
Host: localhost:9140
User-Agent: Guzzle/5.3.1 curl/7.58.0 PHP/7.1.33-4+ubuntu18.04.1+deb.sury.org+1
Authorization: Basic dXNlcjA6MTIzNDU2

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: text/plain; charset=utf-8
Etag: "b2687d94ff8a8246711efd6b69f4f947"
Last-Modified: Thu, 30 Jan 2020 12:05:20 +0545
Oc-Etag: "b2687d94ff8a8246711efd6b69f4f947"
Oc-Fileid: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOmZiYTE5OGViLTRlZjMtNDE4Zi1hYmEyLWEwMmE1YmE5NTA5YQ==
Vary: Origin
X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTgwMzY4ODIwLCJpYXQiOjE1ODAzNjUyMjAsInVzZXIiOnsiaWQiOnsib3BhcXVlX2lkIjoidXNlcjAifSwidXNlcm5hbWUiOiJ1c2VyMCIsIm1haWwiOiJ1c2VyMEBleGFtcGxlLm9yZyIsImRpc3BsYXlfbmFtZSI6IlVzZXIgWmVybyJ9fQ.CEU0b4MyeSGswPARMfimrKOLeExpDRF9BrtJ13vFsEk
Date: Thu, 30 Jan 2020 06:20:20 GMT
Content-Length: 52

Welcome this is just an example file for developers.

micro/cli update broke users and storage-root service

 .\ocis-reva.exe users
{"level":"info","service":"reva","time":"2020-02-04T11:19:34+01:00","message":"Continue without config"}
panic: interface conversion: flag.Value is *flag.stringValue, not *cli.StringSlice

goroutine 1 [running]:
github.com/micro/cli/v2.lookupStringSlice(...)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/flag_string_slice.go:152
github.com/micro/cli/v2.(*Context).StringSlice(0xc000487080, 0x11b383b, 0x7, 0xc0001b8ab0, 0x4, 0x0)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/flag_string_slice.go:144 +0x10b
github.com/owncloud/ocis-reva/pkg/command.Users.func1(0xc000487080, 0x1d, 0x38)
        C:/Users/jfd/test/ocis-reva/pkg/command/users.go:26 +0x54
github.com/micro/cli/v2.(*Command).Run(0xc0001a8360, 0xc000486840, 0x0, 0x0)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/command.go:148 +0x583
github.com/micro/cli/v2.(*App).RunContext(0xc000500300, 0x17ba460, 0xc0000300c0, 0xc000004480, 0x2, 0x2, 0x0, 0x0)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/app.go:302 +0x797
github.com/micro/cli/v2.(*App).Run(...)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/app.go:210
github.com/owncloud/ocis-reva/pkg/command.Execute(0xfa8bc0, 0xc000038118)
        C:/Users/jfd/test/ocis-reva/pkg/command/root.go:102 +0xa19
main.main()
        C:/Users/jfd/test/ocis-reva/cmd/ocis-reva/main.go:10 +0x29

and

.\ocis-reva.exe storage-root
{"level":"info","service":"reva","time":"2020-02-04T11:10:44+01:00","message":"Continue without config"}
panic: interface conversion: flag.Value is *flag.stringValue, not *cli.StringSlice

goroutine 1 [running]:
github.com/micro/cli/v2.lookupStringSlice(...)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/flag_string_slice.go:152
github.com/micro/cli/v2.(*Context).StringSlice(0xc00003bdc0, 0x11b383b, 0x7, 0xc0001c8090, 0x4, 0x0)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/flag_string_slice.go:144 +0x10b
github.com/owncloud/ocis-reva/pkg/command.StorageRoot.func1(0xc00003bdc0, 0x26, 0x50)
        C:/Users/jfd/test/ocis-reva/pkg/command/storageroot.go:26 +0x54
github.com/micro/cli/v2.(*Command).Run(0xc0000b7c20, 0xc00003b2c0, 0x0, 0x0)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/command.go:148 +0x583
github.com/micro/cli/v2.(*App).RunContext(0xc000074780, 0x17ba460, 0xc0000300b8, 0xc000004480, 0x2, 0x2, 0x0, 0x0)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/app.go:302 +0x797
github.com/micro/cli/v2.(*App).Run(...)
        C:/Users/jfd/go/pkg/mod/github.com/micro/cli/[email protected]/app.go:210
github.com/owncloud/ocis-reva/pkg/command.Execute(0xfa8bc0, 0xc000038118)
        C:/Users/jfd/test/ocis-reva/pkg/command/root.go:102 +0xa19
main.main()
        C:/Users/jfd/test/ocis-reva/cmd/ocis-reva/main.go:10 +0x29

@C0rby may already have an idea what is necessary to fix this.

listing shares via ocs API is not possible

  1. upload file textfile.txt into the home folder
  2. create a share with curl 'http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares' -u user1:1234 --data 'shareType=0&shareWith=user0&path=%2Fhome%2Ftextfile.txt&permissions=1'
  3. try to retrieve the share information via ocs api curl -u user1:1234 'http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2Fhome%2Ftextfile.txt&reshares=true' | xmllint --format -

result:

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>
  <data/>
</ocs>

phoenix does not show existing shares

expected result:

something similar like oC10:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message/>
    <totalitems/>
    <itemsperpage/>
  </meta>
  <data>
    <element>
      <id>364</id>
      <share_type>0</share_type>
      <uid_owner>admin</uid_owner>
      <displayname_owner>admin</displayname_owner>
      <permissions>19</permissions>
      <stime>1579672946</stime>
      <parent/>
      <expiration/>
      <token/>
      <uid_file_owner>admin</uid_file_owner>
      <displayname_file_owner>admin</displayname_file_owner>
      <path>/textfile0.txt</path>
      <item_type>file</item_type>
      <mimetype>text/plain</mimetype>
      <storage_id>home::admin</storage_id>
      <storage>1</storage>
      <item_source>48</item_source>
      <file_source>48</file_source>
      <file_parent>9</file_parent>
      <file_target>/textfile0.txt</file_target>
      <share_with>uu1</share_with>
      <share_with_displayname>uu1</share_with_displayname>
      <share_with_additional_info/>
      <mail_send>0</mail_send>
      <attributes/>
    </element>
  </data>
</ocs>

trying to share the same file with the same user again results in
<?xml version="1.0" encoding="UTF-8"?> <ocs><meta><status>error</status><statuscode>996</statuscode><message>grpc create share request failed</message></meta></ocs>

versions survive the deletion of a file

  1. upload multiple versions of a file
  2. delete the file
  3. upload a file with the same name again
  4. check the versions

the versions before the deletion are all listed

ocs v2 endpoint still returns ocs v1 status codes

compare results of ocs/v1.php and ocs/v2.php endpoint
e.g. curl http://localhost:9140/ocs/v1.php/config -u user0:123456 | xmllint --format -

both endpoints return

 <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>

but the v2 endpoint should return status-code 200 that is the same as the HTTP status code

litmus tests fail

docker run -e LITMUS_URL="http://172.17.0.1:9140/remote.php/webdav" -e LITMUS_USERNAME="einstein" -e LITMUS_PASSWORD="relativity" -e TESTS="<test-scope>" owncloud/litmus:latest

basic

-> running `basic':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. put_get............... pass
 4. put_get_utf8_segment.. pass
 5. put_no_parent......... pass
 6. mkcol_over_plain...... pass
 7. delete................ pass
 8. delete_null........... pass
 9. delete_fragment....... pass
10. mkcol................. pass
11. mkcol_again........... pass
12. delete_coll........... pass
13. mkcol_no_parent....... pass
14. mkcol_with_body....... pass
15. finish................ pass
<- summary for `basic': of 16 tests run: 16 passed, 0 failed. 100.0%

copymove

-> running `copymove':
 0. init.................. pass
 1. begin................. pass
 2. copy_init............. pass
 3. copy_simple........... pass
 4. copy_overwrite........ pass
 5. copy_nodestcoll....... pass
 6. copy_cleanup.......... pass
 7. copy_coll............. pass
 8. copy_shallow.......... WARNING: Could not delete csrc
WARNING: Could not clean up cdest
    ...................... pass (with 2 warnings)
 9. move.................. FAIL (MOVE `/remote.php/webdav/litmus/move' to `/remote.php/webdav/litmus/movedest': 500 Internal Server Error)
10. move_coll............. FAIL (collection MOVE `/remote.php/webdav/litmus/mvsrc/' to `/remote.php/webdav/litmus/mvdest/': 500 Internal Server Error)
11. move_cleanup.......... pass
12. finish................ pass
<- summary for `copymove': of 13 tests run: 11 passed, 2 failed. 84.6%
-> 2 warnings were issued.

props

-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... pass
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. FAIL (MOVE `/remote.php/webdav/litmus/prop' to `/remote.php/webdav/litmus/prop2': 500 Internal Server Error)
10. propget............... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop': 404 Not Found)
11. propdeletes........... FAIL (PROPPATCH on `/remote.php/webdav/litmus/prop': 404 Not Found)
12. propget............... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop': 404 Not Found)
13. propreplace........... FAIL (PROPPATCH on `/remote.php/webdav/litmus/prop': 404 Not Found)
14. propget............... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop': 404 Not Found)
15. propnullns............ FAIL (PROPPATCH of property with null namespace (see FAQ))
16. propget............... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop': 404 Not Found)
17. propremoveset......... FAIL (PROPPATCH remove then set)
18. propget............... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop': 404 Not Found)
19. propsetremove......... FAIL (PROPPATCH remove then set)
20. propget............... FAIL (PROPFIND on `/remote.php/webdav/litmus/prop': 404 Not Found)
21. propvalnspace......... FAIL (PROPPATCH of property with value defining namespace)
22. propwformed........... pass
23. propinit.............. pass
24. propmanyns............ pass
25. propget............... pass
26. propcleanup........... pass
27. finish................ pass
<- summary for `props': of 28 tests run: 15 passed, 13 failed. 53.6%
See debug.log for network/debug traces.

locks

-> running `locks':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. precond............... pass
 4. init_locks............ pass
 5. put................... pass
 6. lock_excl............. pass
 7. discover.............. pass
 8. refresh............... pass
 9. notowner_modify....... FAIL (DELETE of locked resource should fail)
10. notowner_lock......... FAIL (LOCK on locked resource)
11. owner_modify.......... FAIL (PROPPATCH on locked resouce on `/remote.php/webdav/litmus/lockme': 207 Multi-Status)
12. notowner_modify....... FAIL (DELETE of locked resource should fail)
13. notowner_lock......... FAIL (LOCK on locked resource)
14. copy.................. FAIL (could not COPY locked resource:
404 Not Found)
15. cond_put.............. SKIPPED
16. fail_cond_put......... SKIPPED
17. cond_put_with_not..... pass
18. cond_put_corrupt_token FAIL (conditional PUT with invalid lock-token should fail: 204 No Content)
19. complex_cond_put...... pass
20. unlock................ FAIL (UNLOCK on `/remote.php/webdav/litmus/lockme': 501 Not Implemented)
21. fail_cond_put_unlocked FAIL (conditional PUT with invalid lock-token should fail: 204 No Content)
22. lock_shared........... FAIL (requested lockscope not satisfied!  got shared, wanted exclusive)
23. notowner_modify....... SKIPPED
24. notowner_lock......... SKIPPED
25. owner_modify.......... SKIPPED
26. double_sharedlock..... SKIPPED
27. notowner_modify....... SKIPPED
28. notowner_lock......... SKIPPED
29. unlock................ SKIPPED
30. prep_collection....... pass
31. lock_collection....... pass
32. owner_modify.......... FAIL (PROPPATCH on locked resouce on `/remote.php/webdav/litmus/lockcoll/lockme.txt': 207 Multi-Status)
33. notowner_modify....... FAIL (DELETE of locked resource should fail)
34. refresh............... pass
35. indirect_refresh...... pass
36. unlock................ FAIL (UNLOCK on `/remote.php/webdav/litmus/lockcoll/': 501 Not Implemented)
37. unmapped_lock......... See debug.log for network/debug traces.
Segmentation fault (core dumped)

http

-> running `http':
 0. init.................. pass
 1. begin................. pass
 2. expect100............. pass
 3. finish................ pass
<- summary for `http': of 4 tests run: 4 passed, 0 failed. 100.0%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.