pydio / pydio-core

Pydio 8 official repository
https://pydio.com
GNU Affero General Public License v3.0
867 stars 289 forks source link

Issue when using a S3 repo with AJXP_USER variable. #1365

Closed smichelet closed 6 years ago

smichelet commented 7 years ago

Hello.

Some informations about my installation :

I'd like to use a LDAP authentication and users directory on a AWS S3 repository. When the configuration of my container is mybucket for example, everything works fine. But when I configure my container as mybucket/AJXP_USER I get an error message when I try to browse my repo.

It worked on version 6.0.8 but it seems not to work anymore since the version 7. I've got the same problem mentionned on this post on the Pydio Forum and I can't find an answer to solve this issue : https://pydio.com/forum/f/topic/same-s3-workspace-no-more-working-on-pydio-7/

Here are some screenshots so you can see my configuration and the error message. If you want more informations, please ask me.

001

002

cdujeu commented 7 years ago

hi, we really prefer that you use forum threads instead of GitHub until the bug is fully qualified... But well, you got enough screenshots, ok for this time :-) Did you try to swith the "Signature Version" of the access.s3 plugin to many values. -c

smichelet commented 7 years ago

Hmm sorry about the way to open tickets :) Yes I already tried to switch between version 2 and version 4 without success :/ I did it in the web configuration of my repository.

Is my "/" well interpretated in my container URL ? If you see the error of the screenshot, it's converted into a %2F character. I know it means a "/" but I don't know if the conversion is normal here. I'm wondering this because it works fine when I don't use the AJXP_USER variable.

Thanks for your quick answer by the way.

piranhaphish commented 7 years ago

This is affecting me as well on 8.0.1.

I upgraded from 6.0.8, then configured an S3 repository in bootstrap_repositories.php using ".../AJXP_USER". I receive the same SignatureDoesNotMatch error.

In my case, the usernames are email address, so both the forward-slash (from the config setting) and the at-sign (from the username) are both URL-encoded.

Do you have any ideas for a workaround for the moment, as I'm eager to upgrade from v6.

piranhaphish commented 7 years ago

Okay, I found a workaround for my particular use case.

Because I'm using bootstrap_repositories.php and AJXP_USER is in the path portion, I was able to set this:

"CONTAINER"    => "<bucket name>",
"PATH"         => "/AJXP_USER",

I'm not sure if there's a way to configure a PATH for a normal workspace using the settings GUI or not. And I don't suppose this would work if the username needed to be part of the bucket name itself and that username contained symbols that get urlescape'd.

smichelet commented 7 years ago

Hi.

Hmm, when configuring a workspace using the GUI it doesn't add lines in the /etc/pydio/bootstrap_repositories.php How did you to use bootstrap repositories to configure your workspaces, please ? You simply add configuration lines in the file ? Can you share the whole "template" ?

By the way, on the GUI, when configuring the workspace, it seems the field "Alias" is used to determinate the path of the remote storage space. But there is others issues, it seems it doesn't use the macro like "AJXP_USER" and we can reach a parent directory modifying the URL.

piranhaphish commented 7 years ago

bootstrap_repositories.php is for "hard-coded" repositories (i.e. My Files, Common Files). They cannot be created or editing using the GUI and, thus, are really for system administrators to define and not Pydio administrators.

I used the Pydio S3 Documentation to update/add the following parameters to the "My Files" section:

…
"API_KEY"     => "<my api key>",
"SECRET_KEY"  => "<my secret>",
"CONTAINER"   => "<my container>",
"REGION"      => "us-east-1",
"API_VERSION" => "latest",
"PATH"        => "/AJXP_USER",
…
smichelet commented 7 years ago

I confirm, it works just well like this. Thanks for your help. It's an alternative to make it work instead of using the GUI.