-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow updating Object Storage Details #10551
base: main
Are you sure you want to change the base?
Conversation
Currently, when an administrator edits an Object Storage Pool, only the name or url can be updated. This change allows the other `details` of the object store to be updated. The object store details contains the credentials used to connect to the object store as well as other information provided when it was added to the system. Only updated information is updated. The connection is tested using a new method verifyServiceConnectivity(). If no information has changed, the existing connection is also tested.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10551 +/- ##
==========================================
Coverage 16.26% 16.27%
- Complexity 13389 13401 +12
==========================================
Files 5674 5675 +1
Lines 498927 499038 +111
Branches 60337 60349 +12
==========================================
+ Hits 81157 81222 +65
- Misses 408729 408768 +39
- Partials 9041 9048 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@blueorangutan package |
@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12769 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Just a couple of observations.
-
Should we allow the url of the object store to be updated? Because to me it looks similar to deleting an object store and adding a new one. Currently we don't allow deleting an object store if there are buckets associated with it. But, there is no such check now.
-
Does list resuorce details really need to return the api key - secret key? Because the secret key is visible in the logs due to it.
4c67291214e3&resourcetype=objectstore&command=listResourceDetails&response=json&s essionkey=fgciL-5RSPf9wCWGKfoz9Don-4s 200 {"listresourcedetailsresponse":{"count":2,"resourcedetail":[{"resourceid":"e866b845-01de-4dc6-b832-4c67291214e3","resourcetype":"ObjectStore","key":"accesskey","value":"o617Z8rHaaXlcK9bLfOz","fordisplay":true},{"resourceid":"e866b845-01de-4dc6-b832-4c67291214e3","resour cetype":"ObjectStore","key":"secretkey","value":"aFqnmvXSS6DtgRptyrxdGTlO0SX1UiEgVx9EMT68","fordisplay":true}]}}
Thanks @abh1sar for the review and your questions.
I believe this is desirable. This allows the admin to update the protocol from
My observation is that secret keys seem to be in the logs a lot more than just for this. That is no excuse of course and I think that logging in general with regards to object storage at least needs looking at in order to remove all the places where keys are logged. Back to this PR, when any value is updated the UI also sends credentials back with any new details and the connection is validated. The credentials it sends could be the existing credentials untouched by the admin or new credentials. It is desirable to be able to set new credentials as permanent credentials are often rotated for security reasons. I don't think it is too bad currently as it is except for the logging as this UI is just for administrators. However, I guess it is not 100% necessary for the server to send the old credentials to the UI and that if the UI didn't specify credentials, the server could merge the existing credential details back into any new details the UI did change. This would make the credentials non-mandatory on the UI side and a merge would be needed as well as stripping out the credentials from the details in the initial response. A little complex perhaps. Another approach could be to leave the credentials as mandatory in the UI and have the administrator provide them (without the UI pre-filling them out) such that any update to the cloud storage always required credentials. This is preferable to me I think but it is more hassle for the administrator perhaps. Another issue with this is that I'm also not sure how to filter out the credentials from the details as the API that is used for getting the details is generic. Thanks again for looking at this and let me know what you think. |
You are right.
I would prefer this if it's not too much hassle. |
Description
Currently, when an administrator edits an Object Storage Pool, only the name or url can be updated.
This change allows the other
details
of the object store to be updated. The object store details contains the credentials used to connect to the object store as well as other information provided when it was added to the system.Only updated information is updated. The connection is tested using a new method verifyServiceConnectivity(). If no information has changed, the existing connection is also tested.
In the general case (MinIO/Ceph and Simulator), this change allows you to edit the name and URL of the object storage as before in addition to the credentials used to connect to the object storage. Previously it was not possible to edit them after creation using the GUI. In the case of Cloudian HyperStore Object Storage, this allows you to additionally edit the service URL/ports.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Before this change:

After the change: General case (editing MinIO is shown):

After the change: Cloudian HyperStore case:

How Has This Been Tested?
How did you try to break this feature and the system with this change?
Tested as above.