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?

 Respuesta aceptada

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:

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by