Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swift v3 authentication #8359

Merged
merged 8 commits into from
Feb 26, 2018
Merged

Support swift v3 authentication #8359

merged 8 commits into from
Feb 26, 2018

Conversation

icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Feb 14, 2018

Add support for using swift v3 authentication for external and primary storage

cc @oparoz

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Feb 14, 2018
@icewind1991 icewind1991 added this to the Nextcloud 14 milestone Feb 14, 2018
@MorrisJobke
Copy link
Member

Conflicts :/

@codecov
Copy link

codecov bot commented Feb 15, 2018

Codecov Report

Merging #8359 into master will decrease coverage by 0.01%.
The diff coverage is 15.68%.

@@             Coverage Diff              @@
##             master    #8359      +/-   ##
============================================
- Coverage     51.81%   51.79%   -0.02%     
- Complexity    25374    25383       +9     
============================================
  Files          1601     1602       +1     
  Lines         95030    95071      +41     
  Branches       1377     1377              
============================================
+ Hits          49238    49243       +5     
- Misses        45792    45828      +36
Impacted Files Coverage Δ Complexity Δ
apps/files_external/lib/Lib/Backend/Swift.php 0% <0%> (ø) 6 <3> (ø) ⬇️
...es_external/lib/Lib/Auth/OpenStack/OpenStackV3.php 0% <0%> (ø) 1 <1> (?)
apps/files_external/lib/Lib/Storage/Swift.php 0% <0%> (ø) 107 <0> (+3) ⬆️
apps/files_external/lib/AppInfo/Application.php 0% <0%> (ø) 4 <0> (ø) ⬇️
config/config.sample.php 0% <0%> (ø) 0 <0> (ø) ⬇️
...es_external/lib/Lib/Auth/OpenStack/OpenStackV2.php 0% <0%> (ø) 1 <0> (?)
lib/private/Files/ObjectStore/SwiftFactory.php 54.02% <61.53%> (-0.41%) 35 <8> (+5)
lib/private/Files/Cache/Propagator.php 94.93% <0%> (-1.27%) 16% <0%> (ø)
lib/private/Server.php 83.18% <0%> (-0.1%) 282% <0%> (ø)
... and 1 more

@rullzer
Copy link
Member

rullzer commented Feb 19, 2018

Rebased on master

@rullzer
Copy link
Member

rullzer commented Feb 19, 2018

@icewind1991 can we please have two CI steps one that tests v2 and one that tests v3.

Also we can probably log a warning if users use V2 right since that has been deprecated since ages?

@rullzer
Copy link
Member

rullzer commented Feb 21, 2018

A lot of my changes can be removed or squased later. It looks like we need a bit smarter way to detect how to find out v2 or v3 is used

@rullzer
Copy link
Member

rullzer commented Feb 21, 2018

I think (tm) this works now. I'm not sure if we maybe should make it explicit which version is used in the config?

I also want CI to pass on this (but the one node running seems to not like swift). But I really don't want to break stuff here (we did that before with object storages so please not again).

@rullzer rullzer force-pushed the swift-v3 branch 3 times, most recently from cc1debd to 065b124 Compare February 22, 2018 20:53
@rullzer
Copy link
Member

rullzer commented Feb 22, 2018

So it seems for some dark reason on some drone hosts this does 💥 on others it works as expected.

@rullzer
Copy link
Member

rullzer commented Feb 22, 2018

One succesfull v3 run! https://drone.nextcloud.com/nextcloud/server/5122/248

icewind1991 and others added 2 commits February 26, 2018 14:54
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer and others added 6 commits February 26, 2018 14:54
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This is more of a hack. But one of the nodes won't properly run this. No
sense in waiting 60 minutes

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
'password' => 'swift',
'domain' => [
'name' => 'default',
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rullzer missing comma?

Copy link
Member

@MorrisJobke MorrisJobke Mar 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is optional for the last element of an array (we usually add it to make the possible diff better readable).

@scysys
Copy link

scysys commented May 9, 2020

Merged this in my installation (18.0.4) and this solved v3 issues on my side too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants