Integrations Documentationο
Overviewο
Integrations connect the platform to external tools and services (git, terraform, vault, bitwarden, etc.). All integrations follow a consistent pattern: singleton lifecycle, config-driven initialisation, capability protocols, and subprocess isolation via _run_integration().
Available integrations:
Class |
Module |
Type string |
Capabilities |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SIEM / audit sink integrations (implement ISiemSink, used by AuditController):
Class |
Module |
Type string |
Backend |
|---|---|---|---|
|
|
|
Splunk HTTP Event Collector (HEC) |
|
|
|
Azure Monitor / Sentinel (DCR Logs Ingestion API) |
|
|
|
Logstash (TCP) or Elasticsearch (HTTP Bulk API) |
|
|
|
Any OTLP/HTTP backend (Grafana, Datadog, Sumo Logic, etc.) |
SIEM integrations are HTTP-based β they have no CLI command and are not included in strata tools status. Use strata tools check <name> to probe connectivity. See SIEM Audit Forwarding Guide for configuration examples.
Security & Scanning integrations (implement ICveScanner, used by RunBuildCommand):
Class |
Module |
Type string |
Backend |
Auto-detect |
|---|---|---|---|---|
|
|
|
Trivy (default) or Grype |
Yes (first available) |
CVE scanner is optional and used with strata build run --audit. It auto-detects the first available backend (Trivy preferred, Grype fallback). See CVE Vulnerability Scanning Guide for configuration and usage examples.
Creating an Integrationο
from strata.integrations.base_integration import BaseIntegration
from strata.integrations.capabilities import IRepositoryTool
from strata.models.integration_model import IntegrationModel
class MyToolIntegration(BaseIntegration):
COMMAND = "mytool"
CAPABILITIES = [IRepositoryTool]
def get_version_command(self):
return ["mytool", "--version"]
def parse_version(self, version_output: str) -> str:
import re
match = re.search(r"(\d+\.\d+\.\d+)", version_output)
return match.group(1) if match else version_output.strip()
Register it with the factory:
from strata.integrations.factory import IntegrationFactory
IntegrationFactory.register_type("mytool", MyToolIntegration)
Using the Factoryο
from strata.integrations.factory import IntegrationFactory
from strata.models.integration_model import IntegrationModel
config = IntegrationModel(name="git", type="git", required=True)
integration = IntegrationFactory.create(config)
if integration.is_available():
version = integration.get_version()
IntegrationFactory.create() raises ValueError if the type is not registered.
Singleton Patternο
Each integration class maintains one singleton per instance key (defaults to "default"; subclasses override _get_instance_key_static() to key on endpoint URL, access token, etc.). To reset between tests:
from strata.integrations.base_integration import BaseIntegration
BaseIntegration._instances.clear()
BaseIntegration APIο
Method |
Returns |
Description |
|---|---|---|
|
|
Whether the CLI command is on PATH |
|
|
Installed version string |
|
|
Check against |
|
|
Combined availability + version check |
|
|
Name, type, command, availability, version |
|
|
Run |
|
|
Read environment variable |
|
|
Expand |
Abstract methods that subclasses must implement: get_version_command() β List[str], parse_version(output) β str.
IntegrationRegistryο
Singleton registry for tracking loaded integrations and validating operation requirements.
from strata.integrations.registry import IntegrationRegistry
registry = IntegrationRegistry.get_instance()
registry.register_integration("git", git_integration)
registry.register_requirement("deploy", ["git", "terraform"])
ok, errors = registry.validate_operation("deploy")
if not ok:
for err in errors:
print(err)
Reset between tests: IntegrationRegistry.reset()
Capability Protocolsο
Capability protocols are runtime_checkable Protocol classes in integrations.capabilities. Use isinstance() to check capability support:
from strata.integrations.capabilities import ISecretStore
if isinstance(integration, ISecretStore):
secret = integration.get_secret("my/secret")
YAML capability string |
Protocol |
Methods |
Covers (examples) |
|---|---|---|---|
|
|
|
Consul, Azure App Configuration, Vault, Flagsmith (identity traits) |
|
|
|
Vault, Azure KeyVault, Bitwarden, Infisical β |
|
|
|
Azure App Configuration, Flagsmith, Vault (KV prefix), Consul (KV prefix) |
|
|
|
Consul, Vault KV, etcd |
|
|
|
Git, Mercurial |
|
|
|
Terraform, OpenTofu, Ansible, Helm, Pulumi (umbrella for all IaC + config-management tools β not |
|
|
|
Docker, Podman (umbrella for all container + container-native deployment tools β not |
|
(no protocol) |
Generic REST/HTTP β no capability interface |
Any REST/HTTP endpoint |
StoreIntegration (base for all store-type integrations) provides no-op default implementations for all store methods β subclasses override only what they support.
Built-in secret resolvers (
constant,environment,github) do not use the integration system at all β they are resolved inline by theValueControllerwithout any registered integration.githubreads environment variables that GitHub Actions injects into the runner before each step. See configuration.md β Secret Stores for full details onstore: github.
Store-specific notesο
Vault and Consul β feature flags via KV prefixο
Neither Vault nor Consul has a native feature flag concept. IFeatureStore is implemented by
mapping flag names to KV entries under a configurable path prefix (default: features/).
Method |
KV path |
|---|---|
|
|
|
writes |
|
lists all keys under |
The prefix is controlled by the features_path keyword argument (default "features").
This separation keeps feature data organised alongside β but distinct from β other KV entries.
set_feature() and set_variable() both use create-if-not-exists semantics: if the key
already exists the write is skipped and the existing value is returned. This ensures the
default: field in YAML only seeds the store on the very first build.
Flagsmith β variables via identity traitsο
Flagsmith has no native key/value store. IVariableStore is implemented using Flagsmithβs
identity traits API β key/value pairs attached to a named identity.
Method |
Flagsmith API |
|---|---|
|
|
|
|
|
returns all trait keys for the identity |
The identity kwarg (default "default") scopes traits to a specific Flagsmith identity.
Required env var: FLAGSMITH_ENVIRONMENT_KEY must be a server-side (not client-side)
key β client-side keys are read-only and will cause set_variable() to return False.
Flagsmith β feature flag seeding limitationsο
set_feature() does not create feature flags. Flagsmith flags must be created in the
Flagsmith dashboard or via their management API before strata can resolve them. When called:
Returns
Trueif the flag exists (verifies presence; does not toggle the flag state).Returns
Falseif the flag is not found, with a log message directing the operator to create it in the Flagsmith dashboard.
As a result, a default: value on a Flagsmith-backed feature entry cannot seed a missing
flag β the resolution will fail if the flag was never created externally. The default: field
acts as a fallback value for the build output only, not as a create-and-seed operation.
Optional: Set FLAGSMITH_MANAGEMENT_KEY to enable future management API operations
(flag lifecycle management). This is separate from FLAGSMITH_ENVIRONMENT_KEY.
IntegrationModel Configurationο
spec:
integrations:
- name: my_git
type: git
required: true
capabilities: [repository]
- name: vault_prod
type: hashicorp_vault
required: false
endpoints:
address: https://vault.example.com
authentication:
method: token
Runtime inspectionο
Use strata tools to inspect integrations at runtime without reading config files:
strata tools status # table of all 8 built-in integrations
strata tools status --deployment deployment.yaml # adds Requirement column (required/optional/β)
strata tools status --deployment deployment.yaml --required --missing # CI gate: exit 3 if any required are absent
strata tools check terraform # deep-check: availability, env vars, auth
Workspace drop-insο
Custom integrations can be added to .strata/integrations/*.py. Each file must define a register() function:
from strata.integrations.factory import IntegrationFactory
from my_package import MyCustomIntegration
def register():
IntegrationFactory.register_type("my_tool", MyCustomIntegration)
Drop-in files are loaded automatically at CLI startup whenever a workspace is detected (i.e. .strata/ exists). Files whose names start with _ are skipped. Errors in individual drop-ins are logged as warnings and never crash the CLI.
strata sln init creates .strata/integrations/ with a README.md stub and a fully-commented my_integration.py starter template β rename it and fill in the stubs to build your first custom integration.
Per-integration referenceο
Gitο
CLI command: git
Install: https://git-scm.com/downloads
Environment variablesο
No environment variables required. Git uses the system credential store (SSH keys or HTTPS credential helper).
Auth methodsο
Method |
Description |
|---|---|
SSH keys |
Add an SSH public key to the remote (e.g. GitHub/GitLab). No env vars needed. |
HTTPS credentials |
Use a personal access token via the Git credential helper or embed in the remote URL. |
Terraformο
CLI command: terraform
Install: https://developer.hashicorp.com/terraform/install
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
API token for Terraform Cloud / HCP Terraform authentication |
No |
Auth methodsο
Method |
Description |
|---|---|
Environment variable |
Set |
Credentials file |
|
Interactive login |
Run |
Minimal YAML configurationο
type: terraform
spec:
source: path/to/module
backend: remote
Troubleshootingο
Run strata tools check terraform for live status. Run strata help terraform-cloud-auth for Terraform Cloud setup instructions.
OpenTofuο
CLI command: tofu
Install: https://opentofu.org/docs/intro/install/
OpenTofu is the Linux Foundation fork of Terraform (MPL-2.0), offering a drop-in CLI replacement. type: opentofu targets the tofu binary; everything else (state format, provider ecosystem, env vars) is identical to Terraform.
Environment variablesο
Same as Terraform β see the Terraform section above.
Auth methodsο
Method |
Description |
|---|---|
Environment variable |
Set |
Credentials file |
|
Interactive login |
Run |
Minimal YAML configurationο
type: opentofu
spec:
source: path/to/module
backend: remote
Troubleshootingο
Run strata tools check opentofu for live status.
Ansibleο
CLI command: ansible-playbook
Install: https://docs.ansible.com/ansible/latest/installation_guide/
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Path to a custom |
No |
|
Default inventory file or directory |
No |
|
Path to a vault password file for encrypted vars |
No |
Auth methodsο
Method |
Description |
|---|---|
SSH keys |
Configure SSH keys on managed hosts. Ansible connects over SSH by default. |
Vault password file |
Set |
|
Prompt for sudo password (interactive only β not suitable for CI). |
Minimal YAML configurationο
type: ansible
spec:
source: ansible/ # directory containing playbooks
playbook: site.yml # main playbook (defaults to site.yml)
inventory: hosts.yml # optional β auto-discovered if not set
AnsibleDeployer step mappingο
Deployer Step |
Ansible Command |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Not supported β returns empty |
|
Not supported β returns empty |
|
Not supported β returns empty |
Strata variable filesο
When AnsibleBuilder has run (as part of strata build run), it writes strata_*.yml files into the provisioner build directory. AnsibleDeployer discovers these automatically and passes them as -e @file.yml arguments to every playbook invocation β before any inline extra_vars from the IaC configuration.
This provides playbooks with structured access to the full platform model without any manual vars_files declarations. See AnsibleBuilder for the complete list of generated files and their variable keys.
SSH private key injectionο
AnsibleDeployer resolves an SSH private key from resolved_values.secrets (key name configurable via ssh_private_key_secret in the provisioner configuration, defaulting to ssh_private_key) or from the matching environment variable. The key is loaded into a temporary ssh-agent session so it never touches disk. If ssh-agent is unavailable, a chmod 600 tempfile is used and deleted immediately after the subprocess exits.
Minimal YAML configurationο
type: ansible
spec:
source: ansible/ # directory containing playbooks
playbook: site.yml # main playbook (defaults to site.yml)
inventory: hosts.yml # optional β auto-discovered if not set
ssh_private_key_secret: my_ssh_key # optional β secret name for SSH private key
extra_vars: # optional β passed as -e key=value after strata var files
target_env: production
Troubleshootingο
Run strata tools check ansible for live status. Ensure ansible-playbook is in your PATH and that SSH connectivity to managed hosts is configured.
Dockerο
CLI command: docker
Install: https://docs.docker.com/get-docker/
Environment variablesο
No environment variables required. Docker communicates with the local daemon.
Auth methodsο
Method |
Description |
|---|---|
Docker daemon |
Docker Desktop or the Docker daemon must be running. No env vars required. |
|
Run |
Used by ComposeDeployer for Docker Stack deployments.
Helmο
CLI command: helm
Install: https://helm.sh/docs/intro/install/
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Path to kubeconfig file (defaults to |
No |
|
Optional default namespace for Helm operations |
No |
Auth methodsο
Method |
Description |
|---|---|
kubeconfig |
Service account token, OIDC, or exec plugin β configured in |
In-cluster service account |
When running inside a Kubernetes pod, Helm uses the mounted service account token. |
Which deployer uses itο
HelmDeployer
Troubleshootingο
Run strata tools check helm for live status. Ensure helm is in your PATH and that kubectl can reach your cluster (kubectl cluster-info).
Bitwarden (Secrets Manager)ο
CLI command: bws
Install: https://bitwarden.com/help/secrets-manager-cli/
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Machine account access token for Bitwarden Secrets Manager |
Yes |
The env-var name can be overridden via authentication.api_key.api_key in the integration spec.
Auth methodsο
Method |
Description |
|---|---|
Machine account token |
Set |
Minimal YAML configurationο
type: bitwarden
spec:
project_id: <project-uuid>
HashiCorp Vaultο
CLI command: vault
Install: https://developer.hashicorp.com/vault/install
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Vault authentication token |
Yes |
|
Vault server address (derived from |
No |
Auth methodsο
Method |
Description |
|---|---|
Token |
Set |
AppRole |
Obtain a token via |
Minimal YAML configurationο
type: hashicorp_vault
spec:
endpoints:
address: https://vault.example.com
OpenBaoο
CLI command: bao
Install: https://openbao.org/docs/install/
OpenBao is the Linux Foundation fork of HashiCorp Vault (MPL-2.0), maintaining full API and authentication compatibility. type: openbao targets the bao binary; secret paths, auth methods, and env vars are the same as Vault.
Environment variablesο
Same as HashiCorp Vault β see the HashiCorp Vault section above.
Auth methodsο
Method |
Description |
|---|---|
Token |
Set |
AppRole |
Obtain a token via |
Minimal YAML configurationο
type: openbao
spec:
endpoints:
address: https://bao.example.com
HashiCorp Consulο
CLI command: consul
Install: https://developer.hashicorp.com/consul/install
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Consul ACL token for authentication |
Yes |
|
Consul server HTTP address (derived from |
No |
|
Consul namespace (Consul Enterprise only) |
No |
Auth methodsο
Method |
Description |
|---|---|
ACL token |
Set |
Minimal YAML configurationο
type: hashicorp_consul
spec:
endpoints:
address: http://consul.example.com:8500
Azure Key Vaultο
CLI command: az (Azure CLI)
Install: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
The integration uses the Azure CLI for availability detection and falls back to the Azure SDK for secret retrieval.
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Azure Active Directory tenant ID |
Yes |
|
Service principal / managed identity client ID |
Yes |
|
Service principal client secret (omit for OIDC / managed identity) |
No |
|
Azure subscription ID |
Yes |
Env-var names can be overridden via authentication.oauth2.* fields in the integration spec.
Auth methodsο
Method |
Description |
|---|---|
Service principal (secret) |
Set |
OIDC / Workload Identity |
Set |
Managed Identity |
No env vars required when running on an Azure resource with a Managed Identity assigned. |
Minimal YAML configurationο
type: azure_keyvault
spec:
endpoints:
address: https://my-vault.vault.azure.net
Azure App Configurationο
CLI command: az (Azure CLI)
Install: https://learn.microsoft.com/en-us/azure/azure-app-configuration/
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Azure Active Directory tenant ID |
Yes |
|
Service principal / managed identity client ID |
Yes |
|
Service principal client secret (omit for OIDC / managed identity) |
No |
|
Azure subscription ID |
Yes |
Auth methodsο
Method |
Description |
|---|---|
Service principal (secret) |
Set |
OIDC / Workload Identity |
Set |
Managed Identity |
No env vars required when running on an Azure resource with a Managed Identity assigned. |
Connection string |
Set |
Minimal YAML configurationο
type: azure_appconfig
spec:
endpoints:
address: https://my-appconfig.azconfig.io
Key fields: name (str, required), type (str, required), capabilities (Set[str]), required (bool), enabled (bool), validation (min_version, max_version), authentication (AuthenticationModel), endpoints.address (str).
Infisicalο
CLI command: infisical (optional β falls back to HTTP API when CLI is absent)
Install: https://infisical.com/docs/cli/overview
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Service token for direct authentication |
No |
|
Client ID for universal auth (machine identity) |
No |
|
Client secret for universal auth |
No |
|
Project (workspace) ID to query |
Yes |
|
Environment slug (defaults to |
No |
Either INFISICAL_TOKEN or the INFISICAL_CLIENT_ID + INFISICAL_CLIENT_SECRET pair is required. Token takes priority.
Env-var names can be overridden via authentication.api_key.api_key (token) and authentication.oauth2.* (universal auth) in the integration spec.
Auth methodsο
Method |
Description |
|---|---|
Service token |
Set |
Universal auth |
Set |
Minimal YAML configurationο
type: infisical
spec:
endpoints:
address: https://app.infisical.com # or self-hosted URL
Using as a secret or variable storeο
secrets:
- key: db_password
store: infisical
value: DB_PASSWORD # secret name in Infisical
variables:
- key: feature_timeout
store: infisical
value: FEATURE_TIMEOUT
etcdο
CLI command: etcdctl (optional β falls back to v3 HTTP API when CLI is absent)
Install: https://etcd.io/docs/latest/install/
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Comma-separated etcd endpoint URLs (e.g. |
No |
|
Username for basic authentication |
No |
|
Password for basic authentication |
No |
|
CA certificate file path for TLS verification |
No |
|
Client certificate file for mutual TLS |
No |
|
Client private key file for mutual TLS |
No |
Defaults to http://127.0.0.1:2379 if no endpoint is configured. The standard ETCDCTL_ENDPOINTS, ETCDCTL_CACERT, ETCDCTL_CERT, and ETCDCTL_KEY env vars are also honoured.
Auth methodsο
Method |
Description |
|---|---|
Anonymous |
No auth β suitable for trusted networks / development only. |
Basic auth |
Set |
mTLS |
Set |
Minimal YAML configurationο
type: etcd
spec:
endpoints:
address: http://etcd.example.com:2379
Using as a variable or KV storeο
variables:
- key: db_host
store: etcd
value: /config/myapp/db_host # etcd key path
Flagsmithο
CLI command: none (API-only β no CLI binary required)
Docs: https://flagsmith.com/docs
Flagsmith is checked for availability by probing the HTTP API (GET /api/v1/flags/) rather than looking for a binary. ensure_available() fails fast if FLAGSMITH_ENVIRONMENT_KEY is not set or the API endpoint is unreachable.
set_feature() always returns False β the environment API key is read-only. Flag modifications require the management API with a server-side key.
Environment variablesο
Variable |
Purpose |
Required |
|---|---|---|
|
Environment API key ( |
Yes |
The env-var name can be overridden via authentication.api_key.api_key in the integration spec.
Auth methodsο
Method |
Description |
|---|---|
Environment API key |
Set |
Minimal YAML configurationο
type: flagsmith
spec:
endpoints:
address: https://edge.api.flagsmith.com # or self-hosted URL
Using as a feature flag storeο
features:
- key: dark_mode
store: flagsmith
value: dark_mode # flag name in Flagsmith
- key: max_upload_size
store: flagsmith
value: max_upload_size # returns feature_state_value if set