Proto commits in sandialabs/sceptre-phenix

These 35 commits are when the Protocol Buffers files have changed:

Commit:7f42c94
Author:jacdavi
Committer:mgaliar

feat: overhaul logging

The documentation is generated from this commit.

Commit:bb4d18e
Author:jacdavi
Committer:Bryan T. Richardson

feat: user annotation improvements This adds a few features in the UI for making notes and customizing the way a VM appears in the SOH graph. The intent is to make it easier for users to track/manage the status of VMs within an experiment (e.g., a user may mark a node red and add a note "reached by red team"). * Adds a new modal for viewing/editing the labels of a VM * Separate "notes" section that allows multiline, maintains insertion order, and hides key * Available in experiment pages and SOH * Treats minimega tags and phenix labels as one (meaning persistent across experiment runs, and also available in mm cli) * Changes SOH details modal to show notes at the top * Adds buttons to edit labels and override style * New style modal lets user override the fill color, stroke color, and stroke style of a node. This takes precedence over any default styling

Commit:ca1a374
Author:Justin Mott
Committer:Bryan T. Richardson

feat: add UI controls for VM inject partition and disk persistence Makes the following changes: * Adds column in StoppedExperiments for setting inject partition * Adds column in StoppedExperiments for toggling persistence (snapshot) on and off * Fixes issue with disk dropdowns not populating * Removes date in known_policy.go generation so file isn't updated every build * Minor tweaks to column with in StoppedExperiments table Note: I did not directly write all of these changes, but have pulled them up from an internal repo.

Commit:d7f1226
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

feat: new setting for using GRE mesh for experiments * `useGREMesh` option in experiment config * root `--use-gre-mesh` option in CLI (honors server setting) * honors default bridge setting when creating the GRE mesh

Commit:d023308
Author:Bryan T. Richardson

feat: streaming netflow support for experiments Netflow is captured using the netflow capabilities within Open vSwitch. Since OVS only allows netflow to be configured and captured bridge-wide, the netflow feature in phēnix will fail if the default bridge for an experiment is set to the default of `phenix`, to avoid data leakage across experiments. Additionally, the creation or updating of an experiment will fail if a default bridge is used that another experiment is already configured with. A new `defaultBridge` setting has been added to the experiment schema, and when set to something other than `phenix` it will allow experiment-wide netflow capture and will also automatically use GRE tunneling between the OVS bridges on multiple mesh nodes. A new `--default-bridge` flag has been added to the `phenix experiment create` subcommand that will set the default bridge name when creating the experiment. The experiment creation modal in the UI has a new option input for setting the default bridge name when creating experiments via the UI. Bridge names must be 15 characters or less, as dictated by OVS (and Linux interface names). When netflow is activated for an experiment, external applications can connect a websocket to `/api/v1/experiments/{name}/netflow/ws` in order to get streaming netflow data for the experiment.

Commit:796e603
Author:Casey Glatter
Committer:Bryan T. Richardson

feat: new deploy mode option for CLI and UI This commit replaces the previous `runLocal` setting for experiments with a new `deployMode` setting that can be set via the CLI and the UI when creating new experiments. The value of this new setting must be one of `all`, `no-headnode`, or `only-headnode`, with the default being `no-headnode` to preserve the previous default value of `runLocal: false`. The overall goal of this commit is to support the new option of `all`, which allows experiment VMs to run on the head node as well as all the other compute nodes. The previous `runLocal` setting only supported the current `no-headnode` and `only-headnode` options.

Commit:12192c1
Author:Eric Wood
Committer:Bryan T. Richardson

feat(ui): connect ISO file to VM as optical disc Adds button to UI VM modal for adding, changing, and ejecting ISO files to/from VMs. The ISO file to connect to the VM must already be on the phēnix head node in the minimega files directory.

Commit:82f9832
Author:causand22
Committer:Bryan T. Richardson

feat: support disabling of scenario apps when creating experiments By default, all scenario apps are enabled. A new `disabled` field has been added to the scenario app schema, which defaults to `false`. Users can disable apps when creating experiments in the UI by clicking on the app name for a scenario, turning it from green to gray. Users can disable apps when creating experiments via the CLI by providing the `--disabled-apps` flag. Disabled apps are skipped at all stages except for the `RUNNING` stage, allowing for users to still manually trigger disabled apps. Core (default) apps cannot be disabled.

Commit:e0678ad
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

feat: allow users to specify external nodes in topology It may be the case that a user would want to include nodes in the topology that don't necessarily need to be deployed by phenix in minimega. For example, lets say a user app exists to deploy some topology nodes in a cloud provider. Or, lets say the state of health app needs to know about hardware-in-the-loop nodes to do custom connectivity tests against. phenix now supports `external` nodes that are not deployed in minimega, but still show up in the list of nodes in a topology, still show up in the state of health view, etc. A node can be marked as external by adding the top-level `external: true` setting to a node's configuration in the topology configuration file.

Commit:6b5c322
Author:jacdavi
Committer:Bryan T. Richardson

feat: add RBAC checking to UI to support use of fully custom user roles * Implements RBAC checking method in frontend (`roleAllowed`) similar to the `Role.Allowed` method in `web/rbac/role.go`. * User role names are no longer hard-coded into user creation UI and backend role checking. * Adds HTTP method to get roles. * Adds Protobuf type for role. * User Protobuf now includes role. * Entire role policy is now stored in frontend. * Replaces remaining instances of <exp>_<vm> resource names with <exp>/<vm> in calls to Role.Allowed. UI also had functions like `adminUser` or `experimentUser` to determine what to show. These were replaced with calls to `roleAllowed` with the exact values needed.

Commit:191d050
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

Allow users to change their password and create new auth tokens

Commit:f8ede03
Author:jacdavi
Committer:Bryan T. Richardson

Add Ability to Mount VMs and Download/Upload Files When interacting with a VM in a running experiment, users can now access files within the VM directly from the UI by clicking the `mount vm` button within the VM's informational modal. RBAC policies are applied to limit the ability for users to mount and unmount VMs, as well as list, download, and upload files to and from VMs. Note that this feature only works if the miniccc agent is active within the VM. If it's not, the `mount vm` button will be disabled. Also note that this feature is also currently behind a feature flag in the phenix UI named `vm-mount` that is not enabled by default. To enable it, pass the `--features=vm-mount` flag to the `phenix ui` command when starting the UI process. Additional notes and changes: * buefy dependency was upgraded to 0.9.22 * this enabled use of the "breadcrumbs" component in the mount modal * this also required updating all tables due to a breaking change * added flag for "cc active" to the frontend which is visible in the vm info modal * created common vue filter for formatting file sizes * fixed developer jwt signing key and added comment documenting use * generalized ExperimentFile object to File and removed some unused code for ExperimentFiles in protobuf * changed ESLint rules to not warn of unused variables if the variable starts with _

Commit:3e95373
Author:keith
Committer:Bryan T. Richardson

Improve access to experiment files via the UI, to include Scorch files

Commit:90cdc9c
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

Add git workflow support to phenix via REST API See new "Git Workflow Support" section in README for details.

Commit:ad670ba
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

Support option for delaying the start of a VM in the topology config The new top-level topology node option `delay` is now supported. This option has the following schema. ``` delay: user: <bool> timer: <string> (e.g., 5m) c2: - hostname: <string> useUUID: <bool> ```

Commit:aecfd6f
Author:Eric Wood
Committer:Bryan T. Richardson

Add functions to start/stop packet captures via subnet

Commit:37ce543
Author:eric-c-wood
Committer:GitHub

Added checkboxes and a multi-selection boot flag to stopped experiment view (#46) * Added checkboxes to stopped experiment view * Restore deleted table key * Summarized DNB status toasts

Commit:515aa6e
Author:eric-c-wood
Committer:GitHub

Search experiment files for running/stopped views (#58) * Search experiment files for running/stopped views * Fixed issue with searching between values of the same type

Commit:d694fc0
Author:Eric Wood
Committer:Bryan T. Richardson

Add ELF memory snapshot function

Commit:3f225c3
Author:Eric Wood
Committer:Bryan T. Richardson

Extend VM search fields * Extended VM search fields * Added keyword escape and fixed keyword exact match

Commit:8fc08ba
Author:Eric Wood
Committer:Bryan T. Richardson

Add support for operating on multiple VMs in the UI

Commit:596acdf
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

Refactor codebase and add Docker stuff

Commit:4ae5bce
Author:Bryan T. Richardson

Return map of scenario names --> app list for topology scenario endpoint

Commit:dde050a
Author:Bryan T. Richardson

Fix VM tile issues

Commit:0acfc9a
Author:Bryan T. Richardson

Add support for updating users

Commit:563b4f7
Author:Bryan T. Richardson

Support updating experiment VMs

Commit:971c626
Author:Bryan T. Richardson

Fix JSON names in web Protobuf to match previously used names

Commit:88283ee
Author:Bryan T. Richardson

Finish out some additional user-related UI handlers Still don't support updating a user or signing up via the UI.

Commit:67f4f0b
Author:Bryan T. Richardson

Ensure websocket client uses protobuf format for VM list

Commit:747305d
Author:Bryan T. Richardson

Get some more user auth stuff working correctly

Commit:4344e30
Author:Bryan T. Richardson

You can now log in... yay

Commit:e1b0f8b
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

Update web handlers to use Protobuf structs Code compiles now, but still needs cleanup. Can't login yet.

Commit:57a0a57
Author:Bryan T. Richardson
Committer:Bryan T. Richardson

Add tooling around Protobuf

Commit:04d0d4b
Author:keith

Replaced Return with Response

Commit:4288d8b
Author:Keith

Replaced structs with protobuf messages.