webapps-secrets
Syntax
Description
webapps-secrets remove
removes the secret keyName keyValue [--scope scopeValue]keyName from the vault.
webapps-secrets set-attributes --secret-key
sets the attributes of the secret keyName [attrName attrValue] [--scope scopeValue] [--mode Add|Merge|Replace]keyName. Optionally, you can
configure whether to add new attributes to the key, merge the new and existing attributes,
or replace all existing attributes with new ones.
webapps-secrets get-attributes --secret-key
returns the attributes of the secret with name keyName [--scope scopeValue]keyName.
webapps-secrets list [--scope
lists all currently configured secret keys in the scope
scopeValue]scopeValue.
webapps-secrets listAll lists all currently configured secret keys
in all scopes.
webapps-secrets --help displays help text for the command.
webapps-secrets --version displays version information for the
command.
Examples
Set Value for Specific Secret Key
To set a value for a specific secret key, at the system command line, type:
webapps-secrets set mypassword hunter2Vault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
MATLAB Web App Server secrets configuration has been updated.Verify that the secret has been added.
webapps-secrets listAllVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
List of secret keys configured:
scope:<default>, secret key:mypasswordRemove Secret from Server
To remove the existing secret key mypassword from
the server, at the system command line, type:
webapps-secrets remove mypassword Vault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
MATLAB Web App Server secrets configuration has been updated.Set Attributes for Secret Key
An attribute is unencrypted metadata that is stored along with the
secret key and encrypted value in the webapps_secrets XML file.
To set a value for the secret key myusername, at the
system command line, type:
webapps-secrets set myusername mluserVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
MATLAB Web App Server secrets configuration has been updated.To set attributes of the secret key myusername, at the system command
line, type:
webapps-secrets set-attributes --secret-key myusername hostname myhost port 8080Vault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
MATLAB Web App Server secrets configuration has been updated.You can modify existing attributes of a secret key using the --mode
operator.
webapps-secrets set-attributes --secret-key myusername port 422 --mode MergeVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
MATLAB Web App Server secrets configuration has been updated.Get Attributes for Secret Key
To retrieve the attributes for the secret key
myusername, at the system command line, type:
webapps-secrets get-attributes --secret-key myusernameVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
List of secret keys configured:
hostname --->myhost
port --->422List Secrets by Scope
To set a secret with a specific scope, at the system command line, type:
webapps-secrets set mysecret2 97e846a4-a913-4a26 --scope $UserIDVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
MATLAB Web App Server secrets configuration has been updated.To list all currently configured secret keys with the scope $UserID,
at the system command line, type:
webapps-secrets list --scope $UserIDVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
List of secret keys configured:
scope:$UserID, secret key:mysecret2List All Secrets
To list all currently configured secret keys, at the system command line, type:
webapps-secrets listAllVault location:C:\ProgramData\MathWorks\webapps\R2025b\config\webapps_private\webapps_secrets.xml
List of secret keys configured:
scope:<default>, secret key:myusername
scope:$UserID, secret key:mysecret2Display Help Text
To print the webapps-secrets help text, at the
system command line, type:
webapps-secrets -hUsage: webapps-secrets [--help | -h] Display this help message webapps-secrets [--version | -v] Display the version of MATLAB Web App Server webapps-secrets list [--scope <value>] List currently configured secret keys webapps-secrets listAll List all currently configured secret keys in all scopes webapps-secrets set <key> <value> [--scope <value>] [--mode Overwrite|FailIfExists] Set a secret to MATLAB Web App Server webapps-secrets remove <key> [--scope <value>] Remove a secret key from MATLAB Web App Server webapps-secrets set-attributes --secret-key <secret_key> [<attr_key> <attr_value>] [--scope <value>] [--mode Add|Merge|Replace] Set attributes of a secret to MATLAB Web App Server webapps-secrets get-attributes --secret-key <secret_key> [--scope <value>] Get attributes of a secret from MATLAB Web App Server
Display Version
To print the MATLAB® Web App Server™ version information, at the system command line, type:
webapps-secrets -vMATLAB Web App Server (R2025b)Input Arguments
More About
Version History
Introduced in R2024a