Method Security
You can use the Application Builder to write Java methods that are run from applications, model methods, and add-ins. When you run those methods, the privileges of the methods are controlled by the security settings that you find in the Preferences window under Security in the COMSOL Multiphysics desktop.
The security settings will apply to all applications, model methods, and add-ins that you load in COMSOL Multiphysics.
Note that any MPH file may contain applications, model methods, and add-ins. If you intend to load an MPH file from an unreliable source, you should enable all security features. You can do that by reverting to Factory Settings and clearing all checkboxes under General in the security settings, and finally clicking OK.
Security Settings
If your MPH files come from reliable sources or you make them yourself, you can keep the factory settings for security. If you write methods that require additional system access, you can give methods more privileges, but you should revert to the original settings if the situation changes. Find a general description of the security settings in the section Security Settings in the COMSOL Multiphysics Reference Manual.
Add-In Security
For add-ins that require extended privileges permanently, you can disable all security settings for certain methods in the add-in by using the comsoltrust command. This command makes it possible to maintain restricted security settings for applications generally but allow certain adds-in to operate.
Email Password
When your password to the SMTP email server is stored as preference, the behavior is operating system dependent.
Windows
The password is encrypted using the built-in Windows data protection mechanism for the current user. The encrypted password is stored in the preference files %USERPROFILE%\.comsol\v64\comsol.prefs and %USERPROFILE%\.comsol\v64\comsolserver.prefs.
Mac and Linux
The password is encrypted using an autogenerated password. The encrypted password is stored in the preference files $HOME/.comsol/v64/comsol.prefs and $HOME/.comsol/v64/comsolserver.prefs. The autogenerated password is stored in the read-protected file $HOME/.comsol/v64/prefskeyserver.properties.