RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1631336 - Upload and download case attachment using AWS SDK and temp access and secret key in redhat-support-tool
Summary: Upload and download case attachment using AWS SDK and temp access and secret ...
Keywords:
Status: CLOSED DUPLICATE of bug 1653573
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: redhat-support-lib-python
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: A.P. Rajshekhar
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-20 11:20 UTC by Vikas Rathee
Modified: 2019-01-23 16:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-23 16:55:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vikas Rathee 2018-09-20 11:20:33 UTC
As per [new case attachment flow|https://docs.engineering.redhat.com/pages/viewpage.action?spaceKey=~abhiskum&title=Case+Attachment+Flow], We are planning to leverage AWS SDK at client side to upload and download the attachment directly from S3. PCM and Ascension, need to change attachment upload and download flow.

*High-level flow:*
 For upload:
 # Fetch temp credentials from Hydra.
 # Use AWS SDK and temp credentials and upload the attachment to S3.
 # Use status REST endpoint to check metadata creation status.

For download:
 # Fetch attachment metadata from SFDC.
 # If attachment link belongs to Strata then follow existing process.
 # If attachment link belongs to Hydra, then fetch temp credentials from hydra and get file stream from S3 using AWS SDK and temp credentials.

*API details:*
 *Fetch upload credentials:*


curl -X POST https://access.redhat.com/hydra/rest/cases/<case_number>/attachments/upload/credentials -H 'Content-Type: application/json' -d '{  "fileName" : "<file_name>",  "size": "<file_size>", "isPrivate": <true/false>}'


*Refresh upload credentials:*

 curl -X GET [https://access.redhat.com/hydra/rest/cases/]<case_number>/attachments/<attachment_id>/upload/credentials/refresh

*Fetch download credentials:*

curl -X GET https://access.redhat.com/hydra/rest/cases/<case_number>/attachments/<attachment_id>/download/credentials

*Fetch attachment metadata creation status:*

curl -X GET https://access.redhat.com/hydra/rest/cases/<case_number>/attachments/<attachment_id>/status

I have created sample java client library to perform attachment related operations. Same can be downloaded from [https://gitlab.cee.redhat.com/abhiskum/case-attachment-client-java].

*Note*: Please also provide a visual cue to the users in PCM which states "Now accepting large files", so that the end users are aware that large files can be uploaded via the upload functionality in PCM once this goes live

Comment 4 Chris Williams 2019-01-23 16:55:01 UTC

*** This bug has been marked as a duplicate of bug 1653573 ***


Note You need to log in before you can comment on or make changes to this bug.