Why am I unable to access secrets from a web app with MATLAB Web App Server R2024a?

4 visualizaciones (últimos 30 días)
I developed a MATLAB app that fetches data from a database using the secrets functionality. This works successfully in my local machine. However, running the same app as a web app throws the following errors when trying to access the secret:
2024-09-15 15:26:44 webappSendGetSecretCommand :failure: User is not authorized to access this data 2024-09-15 15:26:44 Error using getSecret (line 10) 2024-09-15 15:26:44 No secret value found for secret name 'mySecret' in the vault.
I have followed the documentation to set up my MATLAB Web App Server with all of the secrets from my local MATLAB session. I have also enabled SSL and authentication (OIDC) on my Web App Server. 
Why am I unable to access secrets through my web app?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 30 de Sept. de 2024
Editada: MathWorks Support Team el 30 de Sept. de 2024
If your server is set up to use authentication, you must create a secrets access control file (webapps_secrets_acc_ctl.json) before you can access secrets within web apps. From the documentation:
        If server authentication is enabled, then secret access control is enabled by default, and an authenticated user will have no access to any secrets unless specified with a policy.
 
You can follow the instructions in the linked documentation above to create the webapps_secrets_acc_ctl.json file to resolve this.

Más respuestas (0)

Categorías

Más información sobre MATLAB Web App Server en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by