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

Swift: introduce application credential auth support #2156

Merged
merged 1 commit into from
Mar 16, 2019

Conversation

kayrus
Copy link
Contributor

@kayrus kayrus commented Jan 29, 2019

What is the purpose of this change? What does it change?

Add Openstack Auth V3 application credential support.

Was the change discussed in an issue or in the forum before?

#2155

Manual testing could be performed following the steps below:

App cred could be created using the command below (openstack CLI version should be not lower than 3.15):

$ openstack application credential create --secret mysupersecretkey --role swiftoperator --restricted restic

Then, export env variables:

export OS_AUTH_URL="https://keystone/v3"
export OS_APPLICATION_CREDENTIAL_ID=%ID%
export OS_APPLICATION_CREDENTIAL_SECRET=mysupersecretkey

or

export OS_AUTH_URL="https://keystone/v3"
export OS_USERNAME=openstack_username
export OS_USER_DOMAIN_NAME=openstack_domain
export OS_APPLICATION_CREDENTIAL_NAME=restic
export OS_APPLICATION_CREDENTIAL_SECRET=mysupersecretkey

Checklist

  • I have read the Contribution Guidelines
  • I haven't added tests for all changes in this PR, since I don't have a possibility to create an application credential in test env
  • I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

@codecov-io
Copy link

codecov-io commented Jan 29, 2019

Codecov Report

Merging #2156 into master will decrease coverage by 4.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2156      +/-   ##
==========================================
- Coverage   50.76%   46.74%   -4.03%     
==========================================
  Files         176      176              
  Lines       14251    14257       +6     
==========================================
- Hits         7235     6664     -571     
- Misses       5962     6587     +625     
+ Partials     1054     1006      -48
Impacted Files Coverage Δ
internal/backend/swift/config.go 34.69% <0%> (-56.62%) ⬇️
internal/backend/swift/swift.go 0% <0%> (-78.45%) ⬇️
internal/backend/b2/b2.go 0% <0%> (-80.69%) ⬇️
internal/backend/gs/gs.go 0% <0%> (-74%) ⬇️
internal/backend/azure/azure.go 0% <0%> (-69.46%) ⬇️
internal/archiver/blob_saver.go 95.06% <0%> (-4.94%) ⬇️
internal/archiver/file_saver.go 88.59% <0%> (+2.63%) ⬆️
internal/checker/checker.go 68.4% <0%> (+3.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0022926...6ebcfe7. Read the comment docs.

@kayrus
Copy link
Contributor Author

kayrus commented Feb 6, 2019

@fd0, may I ask you to take a look on this PR? Thanks in advance.

@kayrus
Copy link
Contributor Author

kayrus commented Feb 14, 2019

rebased on master

@kayrus
Copy link
Contributor Author

kayrus commented Feb 26, 2019

@fd0 kindly ping

Copy link
Member

@fd0 fd0 left a comment

Choose a reason for hiding this comment

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

LGTM, although I don't have any means to test this change.

@fd0 fd0 merged commit 6ebcfe7 into restic:master Mar 16, 2019
@kayrus kayrus deleted the swift-app-cred branch March 16, 2019 11:33
jochenehret added a commit to sap-contributions/fog-openstack that referenced this pull request Jun 5, 2024
* Swift supports application credentials: restic/restic#2156
* see also fog#533
geemus pushed a commit to fog/fog-openstack that referenced this pull request Jun 12, 2024
* Swift supports application credentials: restic/restic#2156
* see also #533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants