7. BayunS3

BayunS3 is a sample application that uses overridden methods from S3Wrapper SDK for secure storage onto AWS S3. The app itself works exactly similar to the case of an app using the original AWS S3 SDK directly. However, the wrapper SDK automatically encrypts a file before uploading it to the S3 bucket and decrypts it after downloading it, without the application having to deal with encryption keys, etc.

AWS Credentials

The AWS Access Key and Secret Key serve as ID and Password to access Amazon S3. Developer needs to use the AWS Access Key and Secret Key in the BayunS3 sample app to make use of SecureAWSS3 Wrapper methods.

Replace aws_access_key and aws_secret_key in strings.xml file with the your AWS Access Key and AWS Secret Key.

You will find the following code snippet in the AWSS3Manager class in the sample app.

AWSCredentials credentialsProvider = new AWSCredentials() { @Override public String getAWSAccessKeyId() { return getString(R.string.aws_access_key); } @Override public String getAWSSecretKey() { return getString(R.string.aws_secret_key); } }; SecureAmazonS3Client secureAWSS3Client = new SecureAmazonS3Client(credentialsProvider, appContext); SecureTransferUtility secureTransferUtility = new SecureTransferUtility(secureAWSS3Client, appContext);

Register and Login

When a user supplies credentials for the first time, it is treated as Registration. A new Company Name and/or Employee Id are used for creation of a new user account (possibly with creation of a new company as well), and the supplied password will be used for future authentication (and encryption/decryption of data) on this newly created account.

Next time user can use the same credentials with valid password to login.

Note -
In the BayunS3 sample app, a new bucket is created for a new company named 
bayun-companyName. You can provide your own bucket name for upload/download operations.

You can find the BayunS3 app on Github

For detailed step-by-step instructions on how to build and run the Android application, see the README file.

results matching ""

    No results matching ""