We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

HubiC2SwiftGate "alpha" using OAuth2 api.hubic.com available at GitHub.


pch
11-20-2015, 03:37 PM
Quote Originally Posted by NicolasC
swift-client cannot upload files in subfolder of a container.
Sure swift-client can upload to a subfolder. Use the --object-name option.

For example to upload the file mydoc.txt in the Documents subfolder:
swift upload --object-name=Documents/mydoc.txt default mydoc.txt

Other example to upload only new or updated files in your ~/Video/News folder use:
swift upload --changed --segment-size=104857600 --object-name=Video/News default ~/Video/News

Axtux
11-15-2015, 06:08 AM
RClone and it now supports Hubic natively

NicolasC
10-31-2015, 02:17 PM
So my hubic2swiftgate is now OK, I can access to my hubiC but I would like to upload large files.
Cyberduck is OK but it cannot upload segments to an other container, swift-client cannot upload files in subfolder of a container.
Does a client to upload directly to a subfolder exist ?
Thank you.

Axtux
10-29-2015, 12:31 AM
I can help you but try to follow guides and explain what you don't understand/which errors you meet.

NicolasC
10-26-2015, 04:21 PM
Hi,
Does anyone could help me to install hubic2swiftgate on a local Ubuntu or Debian ?
Thanks !

szavatar
10-03-2015, 11:24 PM
Use older CyberDuck. For me 4.5.2 is working fine. I think they have changed something that made it broken.

CyrilBoh
09-30-2015, 09:34 AM
I've manage to get Hubic2SwiftGate to work and have mounted a file system through it using s3ql.

But I can't figure out how to connect to it using cyberduck. I keep getting a 204 no content response. I am using the OpenStack Swift v1 protocol as suggested in this thread.

Anyhow can give me details on how to connect using cyberduck?

agauthier51
09-08-2015, 08:50 AM
Hello,

For information: Hubic2SwiftGate works perfectly with the Swift connector from Syncany https://github.com/syncany/syncany

Only issue for me, I can't make Syncany working from a Mac. No problem for other platforms.

Regards,
Arnaud

vulturul
01-23-2015, 03:49 PM
Hello,

I managed to successfully mount my hubic storage via Hubic2SwiftGate and cloudfuse.

What i am trying to do is to achieve a backup destination on hubic.
When i try to rsync a local folder to a hubic mount (/mnt/hubic) i get errors and only folders are created, not single file gets transferred,

Code:
root@hubic:~# rsync -auit --progress /root/VltDS/ /mnt/hubic/default/syno/VltDS/
sending incremental file list
rsync: failed to set times on "/mnt/hubic/default/syno/VltDS/.": Function not implemented (38)
and then nothing else happens

Is there someone who can point out what i am missing?

Or if you have any other solution to automate backups (for 10k files / 200 GB) to hubic via linux other than duplicity. I would like to have direct access to my files, rsync style if possible.

Thank you!

rikkmas
01-01-2015, 01:26 PM
Hallo OderWat,

I'm currently try to deploy HubiC2SwiftGate with no luck :
After fill in my email and password at the Hubic Client Authentication Site, the server answers with 'ubiC api server responded with return code: 0'

Any help appreciated, thanks

seby63
06-16-2014, 01:25 PM
it work !
Thanks you !

gifad
06-16-2014, 12:43 PM
Hi seby,

Did you upgrade Cyberduck to the latest version 4.4.4 ?
Cyberduck is now using the "keystone for context" OpenStack Identity service, with a request url : [site]/v2.0/tokens that HubiC2SwiftGate does not know of...

Fortunately, you can "Download the Openstack Swift (v1) "

Hope this helps...

seby63
06-16-2014, 08:21 AM
hello,
I want use Cyberduck but i don't how to use it. The error is always the same answer : "404 not found"
I'm already connected :
Success: This Server is now registered with HubiC Filestorage!

OderWat
04-09-2014, 11:20 PM
Quote Originally Posted by crucy86
...
Have you managed to transfer large files via the gateway?

Thanks,

Craig
The file transfer and everything besides the first authorization does not run "through" the gateway. From this point there is nothing the gateway can be made responsible of.

I also do not transfer large files at all, just because all the tools and stuff I use keeps it at a limited size for me. I know that there may be problems with the segmenting implementation differences to open stack. I did not evaluate this personally yet. So I can't give an informed response to this topic.

crucy86
03-31-2014, 12:38 PM
Thanks Oderwat (I forgot to reply about the FTP) - ill give it another go.

Im having problems transfering large files (3 - 5 gb) using rsync or cp. It just errors will file does not exist. Very strange.

I thought it related to a timeout on the directory and file listings but whatever I try I cannot get it to work.

Have you managed to transfer large files via the gateway?

Thanks,

Craig

OderWat
03-28-2014, 09:56 PM
Hey @murlock the gateway does some "tricks" to calculate the redirect url so it does not need to be specified in the configuration. This may create problems when not using apache. Probably just hard-code the url port so that the redirect_url which is created in the php code matches the one you registered with the api.

I may find some time at the weekend to create an optional config var for the redirect_url so that one can set it by hand if it does not calculate it right.

murlock
03-28-2014, 04:29 PM
Hi,

I'm currently try to deploy HubiC2SwiftGate alpha with no luck :

First, I was stuck because I use nginx as SSL frontend and in register step, redirect_uri use a wrong scheme and port.

After small fix, I'm now stuck because on register callback, I'm always getting a invalid_request with error description "please verify redirect uri".

Rey
03-20-2014, 02:25 PM
Did anyone manage to download a segmented file (>100Mo or >1Go) ?
With cyberduck, it's juste impossible. No problem with smaller ones.

OderWat
03-12-2014, 06:45 PM
Quote Originally Posted by crucy86
Hi OderWat,

Have you tried to get ftp-cloudfs working with the gateway ? I have installed it and pointed it to gateway URL for auth but I cant seem to authenticate when I try to FTP to cloudfs.

Just wondered if you had tried yourself?
Hi Craig... I did not try that till some minutes ago but was curious.

I did "sudo pip install ftp-cloudfs" on my mac and then started it "in foreground" with:

ftpcloudfs -a https://hsgate.mydomain.dom/auth/v1.0/ -f

2014-03-12 19:31:44,726 - INFO - >>> starting FTP server on 127.0.0.1:2021, pid=14743 <<<
2014-03-12 19:31:44,726 - INFO - poller:
2014-03-12 19:31:44,726 - INFO - masquerade (NAT) address: None
2014-03-12 19:31:44,726 - INFO - passive ports: None
2014-03-12 19:31:44,726 - INFO - use sendfile(2): False
2014-03-12 19:31:44,726 - INFO - dispatcher:

Logging in with my user "hubic" and my pw from the config.php worked. I was using Cyberduck as FTP Client. Getting the following output in the terminal:

2014-03-12 19:32:02,087 - INFO - 127.0.0.1:60370-[] FTP session opened (connect)
2014-03-12 19:32:02,089 - INFO - 127.0.0.1:60370-[] FTP session closed (disconnect).
2014-03-12 19:32:06,742 - INFO - 127.0.0.1:60370-[hubic] Authentication validated for user hubic
2014-03-12 19:32:06,743 - INFO - 127.0.0.1:60370-[hubic] USER 'hubic' logged in.

After this I could browse the swift storage in the FTP client without a problem.

But beware: Hubic services where disrupted today (again) and sometimes problems are because of such incidents! http://status.ovh.net/?do=details&id=6524

crucy86
03-12-2014, 11:06 AM
Hi OderWat,

Have you tried to get ftp-cloudfs working with the gateway ? I have installed it and pointed it to gateway URL for auth but I cant seem to authenticate when I try to FTP to cloudfs.

Just wondered if you had tried yourself?

The reason being is I have a need to rsync to my hubic storage and I found a few issues so was going to try and configure ftp-cloudfs, then use curlftpfs to mount the site as a mount point, then try RSync from there..

Thanks in advance,

Craig

OderWat
03-03-2014, 02:57 PM
I may update the docs slightly to include a more detailed version for the "localhost" without a SSL certificate example.

Currently I am working on a "slack.com" gateway in GoLang, which connects a channel between different Teams (which was a PHP Apache2 script before). When that is finished I may create a cross platform standalone version of the hubic2swiftgate, which does not need Apache2 and can be started as daemon / service out of the box. Stuff is slightly similar

crucy86
03-03-2014, 02:46 PM
Please ignore the below, it was a problem with the firewall not accepting outbound connections from the server, testing the URL's on my desktop worked but not on the server.

I changed the authurl to localhost to stop it going outside and its now working!

Thank you!






Hi All,

wonder if you can help - I have setup the Hubic2SwiftGate ok and linked it to my account /usage brings back the correct info.

I am now trying to use cloudfuse but getting failed to authenticate, im using the following in my cloudfuse config:

username=hubic
api_key=myhubicpassword
authurl=https://myserver/auth/v1.0/
cache_timeout=3600
verify_ssl=false

if I navigate to https://myserver/auth/v1.0/ I receive

"AUTH_USER and/or AUTH_KEY are missing!"

so I know its pointing to the right place etc, its just not authenticating..

any help would be appreciated!

Thanks,

Craig

tjeh
03-03-2014, 02:14 PM
Thanks your Gateway works perfectly !!!

Rey
03-02-2014, 04:35 PM
I works !!!! Thank you very much op !

For now I can't download >1Go file, any tips?

neomikenet
02-24-2014, 12:30 PM
Quote Originally Posted by olivtt
Do you use cloudberry Backup or cloudberry explorer ?
I'm using CloudBerry Explorer. I tried Backup one a few months ago but i haven't succeed to make it working.

EDIT : there's a topic on Cloudberry lab about this; i've posted a word there too. Here's the URL : http://www.cloudberrylab.com/forum/y...C-support.aspx

southy
02-21-2014, 08:27 PM
Quote Originally Posted by OderWat
I updated the code with slightly more meaningful error output in that case. Hopefully that will help!
Yes, indeed :-)
Thanks.

Ok, your help was very helpful: I tried again from scratch and it turned out I had the "client secret" not completely copied - a bit was missing :-)

Works now! Thanks so much!
Now I shall try duplicity :-)


btw: german is correct, but it's not a cool Mac, it's just chrome on windows. No idea why it identifies Macish...

olivtt
02-21-2014, 12:42 PM
Quote Originally Posted by neomikenet
Hi OderWat,

I've followed the instructions on your page and it worked perfectly ! I'm using CloudBerry on Win8.1 as my OpenStack client.
Thanks for the job, i was a bit disappointed when HubicToSwiftGateway suddenly stopped.

Bye !
hi
Do you use cloudberry Backup or cloudberry explorer ?
If it's cloudberry backup, I'm very interessed how you make it works in details.

OderWat
02-21-2014, 11:32 AM
I updated the code with slightly more meaningful error output in that case. Hopefully that will help!

OderWat
02-21-2014, 09:46 AM
Quote Originally Posted by southy
Hi,

I am just trying your hubic2swift, but just can't over come a problem.

Code:
87.142.146.14 - - [20/Feb/2014:17:49:58 +0100] "GET /callback/?code=XXX&scope=usage.r,account.r,getAllLinks.r,credentials.r,links.rw&state=hubic:XXX HTTP/1.0" 401 6081 "https://api.hubic.com/oauth/auth/?client_id=api_hubic_XXX&redirect_uri=https%3A%2F%2Fdomain.de%2Fcallback%2F&scope=usage.r,account.r,getAllLinks.r,credentials.r,activate.w,links.drw&response_type=code&state=hubic:XXX "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"
So if I get this right, hubic redirects me back with a proper response, but the script can't handle it?

Or am I completely off course here?

Any help appreciated, thanks,

southy
Hmm... The log file shows that the callback page returned an 401 error code (Unauthorized) at "99:" ... 99 is the internal call which uses the "OAuth code" to get an auth token for the calling client. The 401 is the "piped through" answer for this request. So actually the hubic api says "Unauthorized" to it's own code.

I can't be 100% sure but I think that this must be a configuration issue. For some reason the API does not like the answer. The only times I had this while development was when the code was to old/missing or when the redirecturl in this answer didn't match.

Later one could be the culprit. Are you sure that the redirect url you have registered this client with matches exactly with the name of the server and does not use ":443" at the end if it runs on the standard port?

P.S.: From what your posted data gives away you are likely a german mac user... like me

southy
02-20-2014, 04:55 PM
Hi,

I am just trying your hubic2swift, but just can't over come a problem.
Via
Code:
https://XXX.XXX.de/register/?client=hubic&password=XXX
I do grant access to my hubic account, however after this the "redirect" back doesn't work: I end up with
Code:
ERROR 99:
What's that supposed to mean?
In my Apache log I do find:

Code:
87.142.146.14 - - [20/Feb/2014:17:49:58 +0100] "GET /callback/?code=XXX&scope=usage.r,account.r,getAllLinks.r,credentials.r,links.rw&state=hubic:XXX HTTP/1.0" 401 6081 "https://api.hubic.com/oauth/auth/?client_id=api_hubic_XXX&redirect_uri=https%3A%2F%2Fdomain.de%2Fcallback%2F&scope=usage.r,account.r,getAllLinks.r,credentials.r,activate.w,links.drw&response_type=code&state=hubic:XXX "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"
So if I get this right, hubic redirects me back with a proper response, but the script can't handle it?

Or am I completely off course here?

Any help appreciated, thanks,

southy

neomikenet
02-20-2014, 01:55 AM
Hi OderWat,

I've followed the instructions on your page and it worked perfectly ! I'm using CloudBerry on Win8.1 as my OpenStack client.
Thanks for the job, i was a bit disappointed when HubicToSwiftGateway suddenly stopped.

Bye !

maxIdf
02-19-2014, 09:44 PM
Hello OderWat,

Great ! It's good job

I have implemented HubiC2swiftGate to replace HubicToSwiftGateway and it's work perfectly. The access to my Hubic files with it and cloufuse is more fast than first one.

Information for other dummies as me : the URL https://yourserver.com/..... could be reacheable in local only (LAN).

Thanks a lot

OderWat
02-15-2014, 03:22 PM
Thank you! I already fixed the ReadMe (got somebody else reporting it too in GitHub directly). I also added support for non standard ports.

I think the cache timeout is related to you "own prefs" because I think this will only affect the filesystem "refresh" and not any authorisation.

Coincidently I just added cloudfuse to my documentation but the OSX version I compiled is pretty unstable. I prefer ExpanDrive2 which works very well already.

darthmaul0181
02-15-2014, 10:47 AM
Hey! Thank you VERY MUCH for you job OderWat!
I tried to do the same the last days but without success :/

I just mounted my hubiC account with cloudfuse and your gateway and it works

But you made a mistake in your documentation. I was unable to register. And after reading your code I saw the right parameter to register is not "user" but "client":
https://yourserver.com/register/?cli...ord=mypassword

HTML Code:
...
To register the gateway with hubic visit:

https://yourserver.com/register/?user=hubic&password=mypassword
...
Code:
if($mode=='register') {
        if(!isset($_GET['client']) || $_GET['client']!=$client ||
                !isset($_GET['password']) || $_GET['password']!=$clients[$client]['password']) {
                header('HTTP/1.0 403 Access Denied');
                nocache();
                print("ERROR : Access Denied! Wrong Client or Password - $actual_link");
                die();
        }
For those using cloudfuse:
Here is the content of your .cloudfuse file when using Hubic2SwiftGate:

username=hubic
api_key=
authurl=https://yourserver.com/auth/v1.0/
cache_timeout=3600
verify_ssl=false

Maybe cache_timeout must be adapted...but I dont know yet...

OderWat
02-13-2014, 08:32 PM
After two days ago the "HubicToSwiftGateway" I used stopped working (because it was using deprecated code / reverse engineered auth) I decided to create a new gateway because I am still playing with different swift clients and the possibilities you have.

I spent yesterday night and some hours today in hacking something together which runs pretty reliable on my systems so far.

This is an "connector / gateway" to allow the usage of Swift Clients with HubiC by making a "pseudo swift auth server".

If you can configure an apache2 server and know hot to make it run a virtual server with PHP and use SSL you may wanna try it out:

https://github.com/oderwat/hubic2swiftgate

As I wrote it is merely an "alpha" prototype but it has full functionality. The "alpha" is from the fact that it does not handle some error situations very well and currently supports only one ClientID and uses a fixed configuration for that. I may enhance it later so it can handle multiple ClientIDs (which would mean it can be used for multiple accounts).

I am not sure of how much use it is for "you" but I run a lot of different clients with it (Duplicity, ExpanDrive2, CyberDuck, Dulwich with Swift-Backend).