Home > other >  How to prevent S3-hosted website from being peeped
How to prevent S3-hosted website from being peeped

Time:12-26

I am trying to host a static website by AWS S3 (written in HTML and Javascript).

Then I am concerned that everyone can see the source code(ex:developer tools in chrome), in which I will write S3 information as well as credentials (like Identity Pool Id) because I will have access to S3 bucket.

I dont want to show up these information. Then, are there any ways to hide the source code so that no one can see it?

CodePudding user response:

You can use Javascript Obfuscator (https://obfuscator.io/) or similar tool to make Javascript source code unreadable (is not answer to your question, but helps protecting your intellectual property by preventing people to steal your code). Revealing account ID, user pool ID etc. is not a big issue. However, you should never include passwords etc. in the source code because obfuscation is not encrypting and text strings are not obfuscated. If you want that people are not able to see directly the different id values, you can include them in the code as base64 binary strings and decode them on runtime. This is not, however, encryption technique.

  • Related