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

[Issue] Amazon S3 plugin (Attachments in S3) #214

Open
vzan2012 opened this issue Oct 14, 2021 · 8 comments
Open

[Issue] Amazon S3 plugin (Attachments in S3) #214

vzan2012 opened this issue Oct 14, 2021 · 8 comments

Comments

@vzan2012
Copy link

vzan2012 commented Oct 14, 2021

Hello,

I have an issue with the Amazon S3 plugin (attachments).

There is no proper information or how to configure the plugin options ?

For example, the S3 Bucket field - in this field we need to enter only the bucket name like

S3 Bucket (field): - bucket-name
(or)
s3://<<bucket-name >>.url_name

If I try to enter only the bucket-name ,
I get an exception of
User does not have access to this bucket: Aws\S3\Exception\AccessDeniedException: AWS Error Code: AccessDenied, Status Code: 403, AWS Request ID: XXXXXXXXXX, AWS Error Type: client, AWS Error Message: 403 Forbidden (Request-ID: XXXXXXXXXX), User-Agent: aws-sdk-php2/2.8.31 Guzzle/3.9.3 curl/7.78.0 PHP/7.2.34

(and)

I tried with s3://<<bucket-name >>.url_name

I get an error of status 500 exception.

Also, I checked in the logs - there is no error information.

Please provide the solution to resolve it.

Thank you.

@vzan2012 vzan2012 changed the title Amazon S3 plugin (Attachments in S3) [Issue] Amazon S3 plugin (Attachments in S3) Oct 14, 2021
@JediKev
Copy link
Contributor

JediKev commented Oct 14, 2021

@vzan2012

Search is your best friend. See our docs on how to install and configure the plugin:

Cheers.

@vzan2012
Copy link
Author

vzan2012 commented Oct 14, 2021

Hello @JediKev

I have already followed the given link above. But the page didn't provide information.

And I previously followed the "Attachments on the File System" plugin - followed the same steps mentioned in the help docs.
https://docs.osticket.com/en/latest/Plugins/Attachments%20on%20the%20Filesystem.html
It worked well.

But for the S3 plugin, I followed the steps as mentioned in the docs but didn't worked well.
Also I have searched for some examples or help (youtube videos). I don't get more information about it.

Please provide any alternate solution.

Thank you

@JediKev
Copy link
Contributor

JediKev commented Oct 14, 2021

@vzan2012

Well, judging by your error of User does not have access to this bucket it means the user credentials you've configured doesn't have access to the bucket you are trying to use.

It'd be worth going through Amazon's S3 docs and ensure you have everything properly configured there. Once you have S3 configured properly then you should be able to pop in the credentials to osTicket and everything should work.

Cheers.

@vzan2012
Copy link
Author

@JediKev

I was able to successfully communicate the S3 buckets in the terminal, but I don't understand what's wrong in the entered config to the OsTicket S3 plugin.

Do you have any example config details for the S3 plugin ?

Because in the help docs, there is no example config information.

For example:
S3 bucket : test_bucket
(or)
S3 bucket : s3://test_bucket
(or)
S3 bucket : s3://test_bucket.url_name
(or)
S3 bucket : Amazon Resource Name (ARN)

If I try to save with s3://test_bucket config, the plugin page crashes and raises status 500 exception.

@JediKev
Copy link
Contributor

JediKev commented Oct 14, 2021

@vzan2012

S3 Bucket is just the literal bucket name. So if the bucket is called amazon.s3.bucket that's what you'd put under S3 Bucket.

Cheers.

@vzan2012
Copy link
Author

vzan2012 commented Oct 16, 2021

Hello @JediKev,

Sorry for the late reply.

After seeing your response, I found the exact issue. Actually we are using a custom domain.

For eg: <<bucket_name>>.<<region_zone>>.custom_domain_name.com

So what happens is, when I give the bucket name

Eg: <<bucket_name>>.s3.amazonus.com

It gives the error exception.

Now I'm looking into the Amazon docs and the S3 plugin codes for the customization.

Thank you so much for your help.

@vzan2012
Copy link
Author

Hello @JediKev

I found that this S3 plugin uses a legacy AWS library (V2).

When the plugin will be updated to the latest version to Version 3 (AWS SDK - V3).

Please let me know.

Thank you.

@JediKev
Copy link
Contributor

JediKev commented Oct 25, 2021

@vzan2012

Thank you for the feedback. We will add this to our bug sheet.

We do not have an expected date/time of when we will get to this.

Cheers.

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

No branches or pull requests

2 participants