| trafficparrot.gui.forwardToVirtualService.enabled |
true |
When enabled, requests made to the GUI port that don't match GUI endpoints will be forwarded to the simulator (virtual service/mock) port.
Use Case: This allows the GUI and simulator (virtual service/mock) to effectively share the same port, simplifying configuration in some scenarios.
Note: In performance profile, this is disabled by default to maximize throughput.
|
| trafficparrot.gui.config.files.allowedFilesToEdit |
.json$, .csv$, .properties$, .hbs$ |
Comma-separated list of regex patterns for the files the GUI configuration files editor (Settings, Current configuration files) lists, loads and saves, matched against each file's path under the Traffic Parrot installation directory and the traffic files directory, as trafficparrot.gui.config.files.notAllowedFilesToEdit below is. A file this list allows and that list matches is not offered.
The shipped list allows .json, .csv and .properties files and .hbs files, so a Handlebars partial that a response template includes (see Template files) can be edited on the page, and the next response that includes it uses the edit, with no restart. Partials also have a page of their own, Tools, Templates, which lists the .hbs files under the traffic files directory and loads and saves them the same way, so this list governs that page too. A partial with another extension is listed only if its suffix is in the list. The editor keeps an LF-only file's line breaks: a file that uses LF alone is saved with LF, and a file with CRLF or mixed line breaks, a file with no line break, and a new file are saved with CRLF. An installation that overrides this property keeps its own list, so add .hbs$ to it to edit partials on either page.
Security: Keeps files the editor has no business with out of it. The credential files are kept out by trafficparrot.gui.config.files.notAllowedFilesToEdit, and loading and saving need traffic-parrot-gui-edit-role when the web user interface login is on.
|
| trafficparrot.gui.config.files.notAllowedFilesToEdit |
^\.,\.git,target, deleted-scenarios, trafficparrot.properties, trafficparrot.performance.properties, trafficparrot.gui.login.properties, .*-connections\.json, sftp-server-users\.json, log4j,lib |
Comma-separated (CSV) list of regex patterns for files and directories that the GUI configuration files editor will neither load nor save. The list gates Load as well as Save, so a file it matches cannot be read through the editor either. Each pattern is matched against the file's path relative to the Traffic Parrot installation directory or the traffic files directory, so a pattern cannot be triggered by a directory name further up the machine's filesystem. Override this property to change the list; an installation that does so keeps its own list, so carry the entries described below into it.
By default, the first pattern ^\. matches a dot-prefixed directory or file in the first path segment below that directory (for example .idea, .vscode, or .claude sitting directly under the traffic files directory), so those hidden entries are blocked from editing in addition to the listed build and system directories (target, deleted-scenarios, trafficparrot.properties, trafficparrot.performance.properties, log4j, lib) and the three credential entries described below. A dot-prefixed directory nested deeper (for example mappings/.hidden) is not matched by this pattern; add /\. to the list if you want dot-entries blocked at any depth. .git has its own entry and so is blocked at any depth. A dot inside a file name is not affected, so report.v1.json stays editable.
Three entries keep files that hold credentials out of the editor. trafficparrot.gui.login.properties is the web user interface's own user store, which holds every user name, password and role when trafficparrot.gui.security.mode=LOGIN_PROPERTIES is set. .*-connections\.json matches database-connections.json, ibm-mq-connections.json, jms-connections.json and any other file whose path contains -connections.json: the files that hold the connection details and passwords for the databases, IBM MQ queue managers and JMS brokers Traffic Parrot connects to. sftp-server-users\.json matches the embedded SFTP server's users file under its default name, which holds each user's password or authorized keys. Each entry keeps the file it names out of the editor and nothing more. Whatever this list says, that users file and the server's host key are also refused under the names trafficparrot.file.sftp.server.usersFile and trafficparrot.file.sftp.server.hostKeyFile give them, whether or not the server is enabled. The list is not a permission check on the user: any other file the editor lists (see trafficparrot.gui.config.files.allowedFilesToEdit) can be loaded and saved by every user who holds traffic-parrot-gui-edit-role, whatever it holds, including a connections file whose path does not contain -connections.json. When trafficparrot.gui.security.mode=LOGIN_PROPERTIES is set, a signed-in user without that role sees the file names only, and the /api/configuration/files endpoints that load or save a file refuse that user with 403; with the default ALLOW_ALL nobody signs in, so every user can load and save.
Security: Blocks access to system-critical files and directories.
|