Openbravo Issue Tracking System - Modules
View Issue Details
0050309ModulesIntegration with Amazon S3public2022-09-22 10:372022-10-24 18:14
Carlos Sousa 
Triage Platform Conn 
normalminoralways
acknowledgedopen 
30Ubuntu 18.04
 
 
0050309: Cannot upload attachments to S3 in non system clients when the S3 attach configuration is defined at system client
We have noticed that in decathlon-eu-preprod when the module "Integration With Amazon S3"is configured with system administrator role and not at client level, we are not able to upload the attachments to s3 even the Verify Configuration message prints that is ok.

We can't use obas3_configuration neither c_attachment_conf if they are defined with client '0'

The error is the following one:

[http-10] ERROR org.openbravo.service.integration.amazon.s3.attachments.AmazonS3AttachImplementation - Error uploading attachment for record 21DA18CB63EBE60D7D7D1BFB1D99C875: Configuration can not be null

[http-10] ERROR org.openbravo.erpCommon.businessUtility.TabAttachments - Error uploading the file
org.openbravo.base.exception.OBException: It was
 not possible to upload the file. Please ensure that your Amazon S3 configuration is correct.

1- Create a record in "Attachment Configuration" and "Amazon s3 configuration" windows with system administrator role
2- Switch the role to use another client (for example F&B International Group)
3- Try to upload an attachment for any record
AmazonS3AttachImplementation should be able to find if there exists an S3 attachment configuration defined at system level when there is not one for the current client.

See here: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.amazon.s3/-/blob/master/src/org/openbravo/service/integration/amazon/s3/attachments/AmazonS3AttachmentClient.java#L48 [^]
No tags attached.
related to defect 0045329 acknowledged Triage Platform Conn Modules Amazon S3 Migration Process background process does not take into account the configuration done at System level 
related to defect 0039553 closed caristu Openbravo ERP Is not possible to define an specific attachment configuration if there is already one defined at system client 
Issue History
2022-09-22 10:37Carlos SousaNew Issue
2022-09-22 10:37Carlos SousaAssigned To => Triage Platform Conn
2022-09-22 17:59adrianromeroNote Added: 0141307
2022-09-22 17:59adrianromeroStatusnew => feedback
2022-10-24 17:48caristuRelationship addedrelated to 0045329
2022-10-24 17:51caristuRelationship addedrelated to 0039553
2022-10-24 17:57caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24974#r24974
2022-10-24 18:02caristuStatusfeedback => new
2022-10-24 18:06caristuNote Added: 0142502
2022-10-24 18:06caristuStatusnew => acknowledged
2022-10-24 18:06caristuNote Edited: 0142502bug_revision_view_page.php?bugnote_id=0142502#r24976
2022-10-24 18:10caristuNote Edited: 0142502bug_revision_view_page.php?bugnote_id=0142502#r24977
2022-10-24 18:11caristuProposed Solution updated
2022-10-24 18:14caristuSummaryProblem While uploading attachments to S3 when configure module with system administrator role => Cannot upload attachments to S3 in non system clients when the S3 attach configuration is defined at system client

Notes
(0141307)
adrianromero   
2022-09-22 17:59   
As explained in the documentation, the configuration must be done at client level, not system administrator level: http://wiki.openbravo.com/wiki/Module:Integration_With_Amazon_S3 [^]
(0142502)
caristu   
2022-10-24 18:06   
(edited on: 2022-10-24 18:10)
Issue acknowledged as core supports to define attachment configurations at system client level that can be shared by all the clients in the same instance. But the S3 module attachment implementation currently is not handling properly this case.

See here: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.amazon.s3/-/blob/master/src/org/openbravo/service/integration/amazon/s3/attachments/AmazonS3AttachmentClient.java#L48 [^]