Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config/samples/v1_trustedprofileanalyzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ spec:
appDomain: change-me
collector: {}
database: {}
exploitIntelligence:
enabled: false
infrastructure:
port: 9010
ingress: {}
Expand Down Expand Up @@ -64,6 +66,4 @@ spec:
storage: {}
tls: {}
tracing:
enabled: false


enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ authentication:
additionalPermissions:
- "ai"
- "read.advisory"
- "read.exploitIntelligence"
- "read.importer"
- "read.metadata"
- "read.sbom"
Expand All @@ -110,6 +111,7 @@ authentication:
groupMappings:
manager:
- "create.advisory"
- "create.exploitIntelligence"
- "create.importer"
- "create.metadata"
- "create.sbom"
Expand Down Expand Up @@ -180,8 +182,8 @@ authentication:
- clientId: {{ include "trustification.oidc.clientId" (dict "root" .root "clientId" "frontend" ) }}
issuerUrl: {{ include "trustification.oidc.issuerUrlForClient" (dict "root" .root "clientId" "frontend" ) }}
scopeMappings: &keycloakScopeMappings
"create:document": [ "create.advisory", "create.importer", "create.metadata", "create.sbom", "create.sbomGroup", "create.weakness", "upload.dataset" ]
"read:document": [ "ai", "read.advisory", "read.importer", "read.metadata", "read.sbom", "read.sbomGroup", "read.weakness", "read.systemInformation" ]
"create:document": [ "create.advisory", "create.exploitIntelligence", "create.importer", "create.metadata", "create.sbom", "create.sbomGroup", "create.weakness", "upload.dataset" ]
"read:document": [ "ai", "read.advisory", "read.exploitIntelligence", "read.importer", "read.metadata", "read.sbom", "read.sbomGroup", "read.weakness", "read.systemInformation" ]
"update:document": [ "update.advisory", "update.importer", "update.metadata", "update.sbom", "update.sbomGroup", "update.weakness" ]
"delete:document": [ "delete.advisory", "delete.importer", "delete.metadata", "delete.sbom", "delete.sbomGroup", "delete.vulnerability", "delete.weakness" ]
{{- with .root.Values.tls.additionalTrustAnchor }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{{/*
Exploit Intelligence configuration env-vars.

Arguments (dict):
* root - .
*/}}
{{- define "trustification.exploit-intelligence.envVars" }}

{{- if .root.Values.exploitIntelligence.enabled }}

{{- $ei := .root.Values.exploitIntelligence }}

- name: EXPLOIT_INTELLIGENCE_URL
{{- include "trustification.common.requiredEnvVarValue" (dict "value" $ei.url "msg" "exploitIntelligence.url is required when exploitIntelligence.enabled is true") | nindent 2 }}

{{- with $ei.uiUrl }}
- name: EXPLOIT_INTELLIGENCE_UI_URL
{{- include "trustification.common.envVarValue" . | nindent 2 }}
{{- end }}
Comment thread
sourcery-ai[bot] marked this conversation as resolved.

{{- with $ei.maxRetries }}
- name: EXPLOIT_INTELLIGENCE_MAX_RETRIES
value: {{ . | quote }}
{{- end }}

{{- with $ei.workerPollInterval }}
- name: EXPLOIT_INTELLIGENCE_WORKER_POLL_INTERVAL
value: {{ . | quote }}
{{- end }}

{{- with $ei.concurrency }}
- name: EXPLOIT_INTELLIGENCE_CONCURRENCY
value: {{ . | quote }}
{{- end }}

{{- with $ei.oidc }}

{{- with .clientId }}
- name: EXPLOIT_INTELLIGENCE_OIDC_CLIENT_ID
{{- include "trustification.common.envVarValue" . | nindent 2 }}
{{- end }}

{{- with .clientSecret }}
- name: EXPLOIT_INTELLIGENCE_OIDC_CLIENT_SECRET
{{- include "trustification.common.envVarValue" . | nindent 2 }}
{{- end }}

{{- with .issuerUrl }}
- name: EXPLOIT_INTELLIGENCE_OIDC_ISSUER_URL
{{- include "trustification.common.envVarValue" . | nindent 2 }}
{{- end }}

{{- with .refreshBefore }}
- name: EXPLOIT_INTELLIGENCE_OIDC_REFRESH_BEFORE
value: {{ . | quote }}
{{- end }}

{{- if .tlsInsecure }}
- name: EXPLOIT_INTELLIGENCE_OIDC_TLS_INSECURE
value: "true"
{{- end }}

{{- end }}{{/* with $ei.oidc */}}

{{- end }}{{/* if enabled */}}

{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ spec:
{{- include "trustification.postgres.envVars" (dict "root" . "database" .Values.database) | nindent 12 }}
{{- include "trustification.storage.envVars" $mod | nindent 12 }}
{{- include "trustification.oidc.swaggerUi" $mod | nindent 12 }}
{{- include "trustification.exploit-intelligence.envVars" $mod | nindent 12 }}

{{- with (include "trustification.application.cache.ttl" . | trim) }}
- name: TRUSTD_PAGINATION_TOTAL_CACHE_TTL
Expand Down
109 changes: 108 additions & 1 deletion helm-charts/redhat-trusted-profile-analyzer/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
"oidc": {
"$ref": "#/definitions/Oidc"
},
"exploitIntelligence": {
"$ref": "#/definitions/ExploitIntelligence"
},
"readOnly": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -253,7 +256,7 @@
},
"cacheTTL": {
"type": "string",
"description": "the time a cache is allowed to live (in s) before forcing a reload.\n"
"description": "Enable read-only mode. When true, the server rejects all mutating API\nrequests with 503 and the importer suspends all import jobs.\nthe time a cache is allowed to live (in s) before forcing a reload.\n"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change but it seems like this file wasnt regenerated after changes were made to this field elsewhere

}
}
}
Expand Down Expand Up @@ -453,6 +456,31 @@
}
}
}
},
{
"if": {
"properties": {
"exploitIntelligence": {
"properties": {
"enabled": {
"const": true
}
},
"required": [
"enabled"
]
}
}
},
"then": {
"properties": {
"exploitIntelligence": {
"required": [
"url"
]
}
}
}
}
],
"definitions": {
Expand Down Expand Up @@ -1158,6 +1186,85 @@
"description": "The number of HTTP workers of the Actix application.\n\nAlso see: <https://actix.rs/docs/server/#multi-threading>\n"
}
}
},
"ExploitIntelligence": {
"type": "object",
"additionalProperties": false,
"description": "Configuration for the Exploit Intelligence integration. When enabled, trustify can submit\nSBOMs and CVEs to an external EI client service (agent-morpheus-client) for automated\nvulnerability analysis and VEX document generation.\n",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable the Exploit Intelligence integration.\n",
"default": false
},
"url": {
"$ref": "#/definitions/ValueOrRef",
"description": "Base URL of the EI client service (agent-morpheus-client).\n"
},
"uiUrl": {
"$ref": "#/definitions/ValueOrRef",
"description": "Base URL of the EI web UI for deep-linking to reports. Fallsback to base URL of the EI client service if unset.\n"
},
"maxRetries": {
"type": "integer",
"minimum": 0,
"description": "Maximum number of retry attempts before a job is marked as failed.\n"
},
"workerPollInterval": {
"type": "string",
"description": "How often the background worker checks for new EI jobs (humantime, e.g. \"5s\").\n"
},
"concurrency": {
"type": "integer",
"minimum": 1,
"description": "Number of concurrent worker loops processing EI jobs.\n"
},
"oidc": {
"$ref": "#/definitions/ExploitIntelligenceOidc"
}
}
},
"ExploitIntelligenceOidc": {
"type": "object",
"additionalProperties": false,
"description": "OIDC credentials for authenticating with the EI service using client credentials flow.\nAll three of clientId, clientSecret, and issuerUrl must be set together.\n",
"dependencies": {
"clientId": [
"clientSecret",
"issuerUrl"
],
"clientSecret": [
"clientId",
"issuerUrl"
],
"issuerUrl": [
"clientId",
"clientSecret"
]
},
"properties": {
"clientId": {
"$ref": "#/definitions/ValueOrRef",
"description": "OIDC client ID for EI service authentication.\n"
},
"clientSecret": {
"$ref": "#/definitions/ValueOrRef",
"description": "OIDC client secret for EI service authentication.\n"
},
"issuerUrl": {
"$ref": "#/definitions/ValueOrRef",
"description": "OIDC issuer URL for EI service authentication (client credentials flow with discovery).\n"
},
"refreshBefore": {
"type": "string",
"description": "Duration an access token must still be valid before requesting a new one (humantime).\n"
},
"tlsInsecure": {
"type": "boolean",
"default": false,
"description": "Allow insecure TLS connections with the EI OIDC issuer.\n"
}
}
}
}
}
88 changes: 88 additions & 0 deletions helm-charts/redhat-trusted-profile-analyzer/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ properties:
oidc:
$ref: "#/definitions/Oidc"

exploitIntelligence:
$ref: "#/definitions/ExploitIntelligence"

readOnly:
type: boolean
default: false
Expand Down Expand Up @@ -349,6 +352,19 @@ allOf:
collector:
required:
- endpoint
- if:
properties:
exploitIntelligence:
properties:
enabled:
const: true
required:
- enabled
then:
properties:
exploitIntelligence:
required:
- url

# all the definitions

Expand Down Expand Up @@ -910,3 +926,75 @@ definitions:
The number of HTTP workers of the Actix application.

Also see: <https://actix.rs/docs/server/#multi-threading>

ExploitIntelligence:
type: object
additionalProperties: false
description: |
Configuration for the Exploit Intelligence integration. When enabled, trustify can submit
SBOMs and CVEs to an external EI client service (agent-morpheus-client) for automated
vulnerability analysis and VEX document generation.
properties:
enabled:
type: boolean
description: |
Enable the Exploit Intelligence integration.
default: false
url:
$ref: "#/definitions/ValueOrRef"
description: |
Base URL of the EI client service (agent-morpheus-client).
uiUrl:
$ref: "#/definitions/ValueOrRef"
description: |
Base URL of the EI web UI for deep-linking to reports. Fallsback to base URL of the EI client service if unset.
maxRetries:
type: integer
minimum: 0
description: |
Maximum number of retry attempts before a job is marked as failed.
workerPollInterval:
type: string
description: |
How often the background worker checks for new EI jobs (humantime, e.g. "5s").
concurrency:
type: integer
minimum: 1
description: |
Number of concurrent worker loops processing EI jobs.
oidc:
$ref: "#/definitions/ExploitIntelligenceOidc"

ExploitIntelligenceOidc:
type: object
additionalProperties: false
description: |
OIDC credentials for authenticating with the EI service using client credentials flow.
All three of clientId, clientSecret, and issuerUrl must be set together.
dependencies:
clientId: [ "clientSecret", "issuerUrl" ]
clientSecret: [ "clientId", "issuerUrl" ]
issuerUrl: [ "clientId", "clientSecret" ]
properties:
clientId:
$ref: "#/definitions/ValueOrRef"
description: |
Comment on lines +968 to +981

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (bug_risk): The OIDC description requires clientId/clientSecret/issuerUrl together, but the schema doesn’t enforce this relationship.

The schema currently allows any subset of clientId, clientSecret, and issuerUrl, which can result in partially configured OIDC and runtime failures. Please update the JSON Schema (e.g., using if/then or allOf with required) so that either all three fields are present or none are, consistent with the documented requirement.

OIDC client ID for EI service authentication.
clientSecret:
$ref: "#/definitions/ValueOrRef"
description: |
OIDC client secret for EI service authentication.
issuerUrl:
$ref: "#/definitions/ValueOrRef"
description: |
OIDC issuer URL for EI service authentication (client credentials flow with discovery).
refreshBefore:
type: string
description: |
Duration an access token must still be valid before requesting a new one (humantime).
tlsInsecure:
type: boolean
default: false
description: |
Allow insecure TLS connections with the EI OIDC issuer.

3 changes: 3 additions & 0 deletions helm-charts/redhat-trusted-profile-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ tracing:

collector: {}

exploitIntelligence:
enabled: false

modules:
server:
enabled: true
Expand Down