Can I encrypt the credentials.json file for AWS authentication using MATLAB Compiler?

I have some MATLAB code that accesses an AWS S3 bucket, and I'm compiling it to distribute to end users. I would like to encrypt the credentials.json file which provides authentication so that the user does not have access to this information. I noticed that in the MCR cache, this file is not encrypted like MATLAB files are.
Is there any way I can encrypt this file?

 Réponse acceptée

Only MATLAB code will be encrypted into the MCR cache, so unfortunately you cannot encrypt this JSON file. However, you can use the authentication approach which involves setting environment variables using the "setenv" function in MATLAB. This will allow the environment variable values (i.e. your AWS secrets) to be encrypted in the MCR cache because the values are stored in the MATLAB file.
For more information about this approach, please see the following documentation page:

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange

Produits

Version

R2021a

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by