I have a django template which contains a link to a file stored on amazon s3. This template is an email to be sent automatically from the system. I want this link to be password protected. on clicking this link, the file on s3 in opened in browser without any authentication. I want the user to first log in to my django website and then the file is opened in the website.
How can I achieve this?
Thanks,
Ammara
You would need to have the link in the email use a URL that goes to a view in your site, setup auth normally there, then have the s3 link available from some landing page behind auth on your site.
Just FYI tho: This is a really bad idea if any level of actual security is needed.
Related
I read all similar questions without arriving to the point.
I have a node instance and it runs on my "index.js" only in my local machine.
I have to take a cvs and put on new google sheet.
I have "credentials.json" in my project. Google say me "incorrect redirect_urls". But I cannot put a redirect url since it's a node script.
And I do not want to pass in a browser for a login. This because maybe tomorrow I will put the same script on a real server.
If you are trying to use the Google Sheep API I'm pretty sure you are not getting the results you want. ;)
Assuming you have enabled the Sheets API in you project, and you plan to use a server to deploy the application, then you need to configure you consent screen accordingly.
During development you can use localhost as a redirect URL, which will enable you to test the app.
You should have a read through this help article to correctly set up your OAuth credentials and consent screen for each type of project.
I have a bunch of html/css/js files. I have one index.html file. I would like to create some predefined users in cognito so that they can browse my website in s3. I don't want to create a login page by myself. I want only s3 and cognito, nothing else. is there any way to achieve this?
You will have to do a lot of your coding to achieve something like this. You can use the inbuilt cognito GUI to take care of registration and login but after that you need to write some code to use the generated tokens to grant user access to s3 hosted resorces which you will have to fetch and show on a webpage.
So, no you cannot do this simply with s3 and cognito.
I am trying to download (backup) images that customers upload for products that take custom logos (these are typically JPG, PNG, PDF, etc.) These customer files are downloadable by clicking on a hyperlink in the BigCommerce admin page for the order in question. The link is not a link to the image path but instead, a link to a service that sends the file to the browser. In other words, you have to be authenticated into the admin site to download the file. The URL looks like this:
https://mystore.com/internalapi/v1/orders/383945/products/251438/attributes/561518/download
https://mystore.com/internalapi/v1/orders/{order id}/products/{lineItem id}/attributes/{option id}/download
These are easily constructed in the API itself for a given order. If I use the link in a browser tab while I'm logged into the admin site, the file downloads.
But what I am trying to write an app to automatically download all the files (there are thousands). When I try to use this URL in an app, I get a authentication error. I tried at first using my regular API credentials but then used the credentials to log into the admin site. Both give me an authentication error.
I could not find anything documented on this so-called "internalapi." Anyone ever try to use this "internal" API that is used by the admin site?
I believe authentication is cookie based for that internal API, but there could be problems with using our non-publicly documented internal APIs in production, i.e. we may make future updates that would be breaking changes.
Images attached to orders through a file upload option also get copied to WebDAV, in the dav/product_images/configured_products folder. Another way to do this could be to use a WebDAV client library like easywebdav to connect and download the files.
I am trying to integrate splunk inside my web app (javascript, Aria templates) using iframe. The app already has a login module so I need to use the same credentials (say username: admin, password: pass) to login to splunk. For testing, I have created the same user and password in splunk also.
I have no Idea how to proceed further.
To integrate Splunk into your own web app, add the SplunkJS Stack libraries to it:
Download SplunkJS Stack.
Extract the files.
Copy the contents of the SplunkJS_Stack/static/ directory to your web site's static directory.
You can visit http://dev.splunk.com/view/webframework-developapps/SP-CAAAEW5 and https://answers.splunk.com/topics/iframe.html for further and more detailed usage and questions.
I'm currently working on an application that interacts with OneDrive. I've read RESTful API manual and the only option available is to share document.
My questions are:
Is there any way to remove or regenerate file sharing link?
Is there any way to specify user emails to give an access to them?
Is there any way to control this UI option "Recipients need to sign in with Microsoft Account"?
The sharing links that are created do not expire. If you create a sharing link for a file that already shared, a HTTP 200 code will be returned. At this time, createLink is only available but the user can remove the sharing permission from the OneDrive website. Specific user access isn't currently supported. Like the OneDrive website, any created link will not require sign-in. I hope that helps.
The only way to regenerate link to a file is to:
Copy file "foo.docx" to "(Copy) foo.docx"
Remove file "foo.docx"
Rename "(Copy) foo.docx" to "foo.docx"
Generate link for "foo.docx"
There is no way to specify emails for document access
There is no way to control this UI option "Recipients need to sign in with Microsoft Account"