# Cloud and SaaS Setup Guides

> Each guide here covers what a provider administrator configures so dfe-fetcher
> can pull data from that provider: the access it needs, how to grant it
> least-privilege, where to put credentials, and how to verify the connection.
> Every source is read-side: M365 starts its activity-feed subscription and
> Pub/Sub acknowledges what it delivered. Nothing else changes provider state.

For the fetcher's configuration (scheduler, output, credential resolution,
the `sources.db` and `sources.file` blocks), see
[config.example.yaml](https://github.com/hyperi-io/dfe-fetcher/blob/ad1faa5932a83fd87c125280a302ecb3ba472f4c/config.example.yaml). The architecture is in
[../architecture.md](/v/2.2.2-fix.1/dfe-fetcher/architecture.md) and the profile grammar in
[../reference/profile-grammar.md](/v/2.2.2-fix.1/dfe-fetcher/reference/profile-grammar.md).

| Provider | Data it pulls | Guide |
|----------|---------------|-------|
| AWS | Security and operational logs | [aws.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/aws.md) |
| Azure | Platform and security logs | [azure.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/azure.md) |
| Microsoft 365 | Audit and security logs | [m365.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/m365.md) |
| Google Cloud | Audit and security logs | [gcp.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/gcp.md) |
| Google Cloud Pub/Sub | Pull subscriptions | [gcp-pubsub.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/gcp-pubsub.md) |
| Google Workspace | Reports API activity per application | [google-workspace.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/google-workspace.md) |
| Okta | System log | [okta.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/okta.md) |
| Cisco Duo | Authentication logs | [duo.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/duo.md) |
| CrowdStrike | Falcon alerts | [crowdstrike.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/crowdstrike.md) |
| Cloudflare | Audit logs | [cloudflare.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/cloudflare.md) |
| Datadog | Audit trail and security signals | [datadog.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/datadog.md) |
| Bitwarden | Event logs | [bitwarden.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/bitwarden.md) |
| 1Password | Audit and sign-in events | [onepassword.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/onepassword.md) |
| Slack | Audit logs | [slack.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/slack.md) |
| GitHub | Audit log | [github.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/github.md) |
| Salesforce | Setup audit trail, login history, event log files | [salesforce.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/salesforce.md) |
| runZero | Asset inventory snapshots | [runzero.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/runzero.md) |
| Object store | Buckets (S3 and compatible) | [object-store.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/object-store.md) |
| Package registries | PyPI, crates.io, Go modules | [supply-chain.md](/v/2.2.2-fix.1/dfe-fetcher/cloud-setup/supply-chain.md) |

A source's maturity is the `maturity` field of its profile under `crates/fetcher/profiles/`: `alpha`, `beta` or `stable`. The fetcher logs a warning at startup for an enabled source below stable. The capability catalog (`docs/capability-catalog.yaml`) repeats the field, and `catalog_maturity_matches_source_maturity` keeps the two equal.

Each guide's health check is the profile's probe, or its credential exchange where the profile has none. It runs from that source's live test where it has one, `cargo nextest run -p dfe-fetcher --test e2e --run-ignored only <source>_health_check`, never from a deployed fetcher: its `/readyz` answers from startup and memory pressure alone. In a deployment the first tick is the check: it runs one fetch interval after start and logs `unit tick complete` for each unit, or `unit tick failed` with the provider's answer.

## Credentials in Kubernetes

The released chart mounts one Secret, Kafka's: its `username`, `password` and `sasl.mechanism` keys become `DFE_FETCHER_KAFKA_SASL_USER`, `DFE_FETCHER_KAFKA_SASL_PASSWORD` and `DFE_FETCHER_KAFKA_SASL_MECHANISM`. Name an existing Secret with the chart value `secrets.kafka.existingSecret`.

A provider's credentials are yours to supply, through the chart's `extraEnv` (a map of variable name to value or `valueFrom`) or `extraEnvFrom` (a list of `envFrom` sources) values. Two ways work, and each guide's Environment Variables section names the fields:

- set the field itself, `DFE_FETCHER_SOURCES__<BLOCK>__<FIELD>`, from a Secret key, e.g. `DFE_FETCHER_SOURCES__AWS__SECRET_ACCESS_KEY`
- write the field as an `env:NAME` spec in the config, and load a Secret keyed by those names with `extraEnvFrom`

```yaml
extraEnv:
  DFE_FETCHER_SOURCES__AZURE__CLIENT_SECRET:
    valueFrom:
      secretKeyRef:
        name: fetcher-azure
        key: client-secret
extraEnvFrom:
  - secretRef:
      name: fetcher-credentials
```

An empty value counts as unset, so a Secret key left blank leaves the field unset rather than signing requests with an empty key.
