Hi,
Sorry if this is slightly off topic, but I was wondering if it is possible to access the private S3 bucket hosting the SPA, with a jquery .get function from within the SPA?
Background:
I have some theories about this, but wasn't sure who to ask, so hoping someone could point me in the right direction.
- In the list.js, it uses a
$.get(s3_rest_url), however this returns an empty string (from what I can tell), and I think this is due to the list.js not passing in the authentication tokens required to access the S3 bucket (in the same way the user needed to sign in to access the index.html).
If this is the case, would a solution be to download the cookies from the browser post logging by the user, in the list.js file and pass one of the auth tokens in the $.get(s3_rest_url) so that it can access the S3 bucket?
Please let me know if you need any more information, and any advice would be greatly appreciated!
Thank you.
Hi,
Sorry if this is slightly off topic, but I was wondering if it is possible to access the private S3 bucket hosting the SPA, with a jquery
.getfunction from within the SPA?Background:
I'm trying to setup authentication to access a private S3 bucket, and using this open source repository (https://github.com/rufuspollock/s3-bucket-listing) to list all items within the S3 bucket once authenticated. (I have also opened a ticket there Investigating usage with authentication (Cognito) and Cloudfront rufuspollock/s3-bucket-listing#101, where I go through some of the steps I've done).
I've run the cloudformation template, and replaced the react SPA, with the
index.htmlmentioned in the above ticket, and logging in works great, and I can nearly see the entireindex.htmlpage, but it doesn't display anything in the S3 bucket itself.I have some theories about this, but wasn't sure who to ask, so hoping someone could point me in the right direction.
$.get(s3_rest_url), however this returns an empty string (from what I can tell), and I think this is due to thelist.jsnot passing in the authentication tokens required to access the S3 bucket (in the same way the user needed to sign in to access theindex.html).If this is the case, would a solution be to download the cookies from the browser post logging by the user, in the
list.jsfile and pass one of the auth tokens in the$.get(s3_rest_url)so that it can access the S3 bucket?Please let me know if you need any more information, and any advice would be greatly appreciated!
Thank you.