Skip to content

Commit

Permalink
Merge pull request #100 from CybercentreCanada/feature/update-plugin-doc
Browse files Browse the repository at this point in the history
* add documentation for new method to supply secret keys.
* fix yaml formatting.
  • Loading branch information
cccs-ml authored Nov 1, 2023
2 parents d3d221f + 91a4e71 commit b57de2c
Showing 1 changed file with 84 additions and 79 deletions.
163 changes: 84 additions & 79 deletions docs/installation/configuration/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,91 +5,96 @@ The plugin configuration section (`uiPlugins:`) of the `values.yaml` allows you
Since this section is quite simple, we will list the default configuration at the same time as we describe the different values.

???+ example "UI plugin section configuration example"

````yaml
...
uiPlugins: # configure/setup external lookup type plugins.
lookup:
# Enable lookup plugins
# These are disabed by default. Set to `true` to enable them (note: individual plugins must still be enabled).
enabled: false

# Mapping of plugins to setup.
# You can add your own custom plugins to this mapping as long as they implement the correct interface.
plugins:

<lookupName>: # The name of the lookup plugin (eg. virustotal). This will be used in the deployment definitions.

# Enable or disable this particular plugin.
# Note: to enable, the upper level `uiPlugins.lookup.enabled` must also be `true`.
```yaml
...
uiPlugins: # configure/setup external lookup type plugins.
lookup:
# Enable lookup plugins
# These are disabed by default. Set to `true` to enable them (note: individual plugins must still be enabled).
enabled: false

# The registry and image name of the plugin image.
image: cccs/assemblyline-ui-plugin-lookup-virustotal

# (optional) The image tag to use. If left blank it will default to the current Assemblyline version.
imageTag:

# The number of instances to run.
instances: 1

# CPU and RAM requests and limits.
reqCPU: 250m
reqRam: 256Mi
limRam: 256Mi

# Port the plugin container listens on.
containerPort: 8000

# (optional) Supply the name of an existing configMap that contains configuration data for the plugin.
# Use this OR the below `configMapData`.
configMapName:

# (optional) Configuration data for the plugin to be exposed as environment variables.
configMapData: |-
VT_VERIFY: true
MAX_TIMEOUT: "3"
API_URL: "https://www.virustotal.com/api/v3"
FRONTEND_URL: "https://www.virustotal.com/gui/search"
CLASSIFICATION: null
# (optional) Supply the name of an existing secret that contains configuration data for the plugin.
# Use this OR the below `secretData`.
secretName:

# (optional) Secret configuration data for the plugin to be exposed as environment variables.
secretData: |-
VT_API_KEY: ""
# (optional) Security context for the plugin to run under.
securityContext:
user: 1000
group: 1000
fsGroup: 1000
# Mapping of plugins to setup.
# You can add your own custom plugins to this mapping as long as they implement the correct interface.
plugins:

<lookupName>: # The name of the lookup plugin (eg. virustotal). This will be used in the deployment definitions.

# Enable or disable this particular plugin.
# Note: to enable, the upper level `uiPlugins.lookup.enabled` must also be `true`.
enabled: false

# The registry and image name of the plugin image.
image: cccs/assemblyline-ui-plugin-lookup-virustotal

# (optional) The image tag to use. If left blank it will default to the current Assemblyline version.
imageTag:

# The number of instances to run.
instances: 1

# CPU and RAM requests and limits.
reqCPU: 250m
reqRam: 256Mi
limRam: 256Mi

# Port the plugin container listens on.
containerPort: 8000

# (optional) Supply the name of an existing configMap that contains configuration data for the plugin.
# Use this OR the below `configMapData`.
configMapName:

# (optional) Configuration data for the plugin to be exposed as environment variables.
configMapData: |-
VT_VERIFY: true
MAX_TIMEOUT: "3"
API_URL: "https://www.virustotal.com/api/v3"
FRONTEND_URL: "https://www.virustotal.com/gui/search"
CLASSIFICATION: null

# (optional) Secret configuration data for the plugin to be exposed as environment variables.
# Use this OR the one of the below `secretName`, `secretKeys`.
secretData: |-
VT_API_KEY: ""

# (optional) Supply the name of an existing secret that contains configuration data for the plugin.
secretName:

# (optional) Individually use keys from existing secrets
# supplied as a list, eg:
# - varName: VT_API_KEY
# secretName: ui-plugin-lookup-virustotal-apikey
# secretKey: API_KEY
secretKeys: []

# (optional) Security context for the plugin to run under.
securityContext:
user: 1000
group: 1000
fsGroup: 1000
...
...

# add the configured plugins to the AL UI config section.
configuration:
...
...

# add the configured plugins to the AL UI config section.
configuration:
...
ui:
external_sources:
ui:
external_sources:

# Display name of the lookup source.
- name: virustotal
# Display name of the lookup source.
- name: virustotal

# Full url to the plugin microservice api.
# (this will be the lowercase `lookupName` key with a `ui-plugin-lookup-` prefix)
url: http://ui-plugin-lookup-virustotal:8000
# Full url to the plugin microservice api.
# (this will be the lowercase `lookupName` key with a `ui-plugin-lookup-` prefix)
url: http://ui-plugin-lookup-virustotal:8000

# (optional) Minimum classification require to access the upstream service.
classification:
# (optional) Minimum classification require to access the upstream service.
classification:

# (optional) Maximum classification that can be sumbitted to the upstream service.
max_classification:
...
```
# (optional) Maximum classification that can be sumbitted to the upstream service.
max_classification:
...
```

!!! tip
Refer to the [changing the configuration file](../config_file/#changing-the-configuration-file) documentation for more detail on where and how to change the configuration of the system.
````
Refer to the [changing the configuration file](../config_file/#changing-the-configuration-file) documentation for more detail on where and how to change the configuration of the system.

0 comments on commit b57de2c

Please sign in to comment.