storj icon indicating copy to clipboard operation
storj copied to clipboard

Add support for `PutObjectLockConfiguration` in the UI

Open ferristocrat opened this issue 4 months ago • 9 comments

Summary

We want to give users the ability to view and update object lock settings in the UI after bucket creation. These settings are managed via the PutObjectLockConfiguration S3 action.

Acceptance Criteria

GetObjectLockConfiguration

  • Users can view object lock settings for a bucket, which may or may not have a default mode/retention. These settings can also be removed via PutObjectLockConfiguration. The settings include:
  • Default Mode: Displays if set (e.g., GOVERNANCE or COMPLIANCE)
  • Default Retention Period: Displays the retention period in either days or years

PutObjectLockConfiguration

  • Users can update object lock settings from the UI for a bucket that already has object lock enabled. This includes:
    • Default Mode: Users can select GOVERNANCE or COMPLIANCE
    • Default Retention Period: Users can set the retention period as an integer in either days or years (but not both simultaneously)
  • Users can enable object lock for a bucket that does not currently have object lock enabled.
    • Note: Versioning must be enabled for object lock to be applied. If versioning is not already enabled, users will need to enable it when enabling object lock.

Design

Add object lock option in bucket settings menu, both in the buckets table and the settings menu when viewing the bucket. object-lock

Update Bucket Details dialog to show:

  • Object Lock
  • Default Lock Mode (if not set, use "Not set")
  • Default Retention Period (if not set, use "Not set")
  • Legal Hold details

Update the lock step in the New Bucket dialog to include:

  • Select object lock mode (only show if object lock is enabled and it's optional)
  • If object lock is enabled, show the other options like selecting a default object lock mode and default retention period.
  • Change the alert to explain the chosen type
  • Add optional default retention period (Days, Weeks, Months, Years / parse in the frontend). lock-new

Dialog when enabling object lock on a bucket and/or choosing a default lock mode plus retention period:

set-lock

ferristocrat avatar Sep 26 '24 19:09 ferristocrat