Onboard integrations to security validation#23109
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The following files, which will be shipped with the agent, were modified in this PR and You can ignore this if you are sure the changes in this PR do not require QA. Otherwise, consider removing the label. List of modified files that will be shipped with the agent |
Codecov Report❌ Patch coverage is Additional details and impacted files🚀 New features to boost your workflow:
|
…from require_trusted_provider spec fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t state Use module-level SECURE_FIELD_NAMES constant and field-level _validate security check (mode='before'), with require_trusted_providers tracked in ModelInfo. Also restore spec.py validator, template yaml annotations, and changelog. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e_trusted_provider: true
…with require_trusted_provider fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
eric-weaver
left a comment
There was a problem hiding this comment.
lgtm for DBM. Chatted offline and we'll follow up with expanding Mysql ssl config block separately
| @@ -20,6 +20,9 @@ | |||
| from . import defaults, validators | |||
|
|
|||
|
|
|||
| SECURE_FIELD_NAMES = frozenset(['ocsp_response_cache_filename', 'private_key_path', 'token_path']) | |||
There was a problem hiding this comment.
how do we test this? and where are these fields from?
There was a problem hiding this comment.
The fields are from the spec.yaml, for instance:
There was a problem hiding this comment.
The security validation behavior is tested globally in the datadog_checks_base class: https://github.com/DataDog/integrations-core/blob/master/datadog_checks_base/datadog_checks/base/utils/models/validation/security.py
And tested E2E manually, you can find a report here: https://datadoghq.atlassian.net/wiki/spaces/~550367931/pages/6428329336/DEMO+Remediate+untrusted+checks+configs+in+Integrations
What does this PR do?
Motivation
Follow-up for #22226 where we only kept
datadog_checks_baserelated changes.Everything was already reviewed in the PR above, we just separated them as these changes required a minimum_base_check bump. (will be done later in a separate PR)
require_trusted_providerPropertiesShared template properties
These propagate to all integrations that include the respective template.
httpkerberos_cache,kerberos_keytab,auth_token,tls_cert,tls_private_key,tls_ca_certtlstls_ca_cert,tls_cert,tls_private_keyjmxtools_jar_path,java_bin_path,trust_store_path,key_store_pathopenmetrics_legacy_basebearer_token_pathIntegration-specific properties
cactirrd_path,rrd_whitelistcassandra_nodetoolnodetoolcephceph_cmdcisco_acicert_key_pathclickhousetls_ca_certclouderassl_ca_cert,cert_file,key_filediskblkid_cache_filefoundationdbcluster_file,tls_certificate_file,tls_key_file,tls_ca_fileguarddogguarddog_path,dependency_file_pathgunicorngunicorninfinibandinfiniband_pathjboss_wildflycustom_jar_pathskafka_actionsschema_registry_tls_ca_cert,schema_registry_tls_cert,schema_registry_tls_keykafka_consumertls_crlfilekube_apiserver_metricsbearer_token_pathkube_schedulerbearer_token_pathlustrelctl_path,lnetctl_path,lfs_pathmac_audit_logsAUDIT_LOGS_DIR_PATHmaprstream_pathmongotls_certificate_key_file,tls_ca_filemysqlsock,defaults_filenagiosnagios_confnetworkconntrack_pathnfsstatnfsiostat_pathopenstack_controlleropenstack_config_file_pathoraclejdbc_driver_path,jdbc_truststore_pathpostfixdirectory,config_directorypostgresssl_root_cert,ssl_cert,ssl_keyprocessprocfs_path,pid_fileredisdbunix_socket_path,ssl_keyfile,ssl_certfile,ssl_ca_certsslurmslurm_binaries_dir,sinfo_path,sacct_path,sdiag_path,sshare_path,squeue_path,scontrol_pathsnowflakeocsp_response_cache_filename,token_path,private_key_pathssh_checkprivate_key_filetibco_emstibemsadmin,script_pathtlslocal_cert_pathtokumxssl_keyfile,ssl_certfile,ssl_ca_certsvarnishvarnishstat,varnishadm,secretfilevaultclient_token_pathReview checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged