Skip to main content

Instructions

Overview​

This article walks you through connecting an Oracle Cloud Infrastructure (OCI) tenancy to Upwind. Onboarding covers the whole tenancy, including all of its compartments. To connect more than one tenancy, repeat the process for each.

Before you begin, make sure you meet the prerequisites.

StepWhereWhat you do
1. Onboard your tenancyUpwind Management ConsoleEnter your tenancy details, choose the identity domain, and generate Upwind client credentials.
2. Deploy the Terraform moduleYour terminalConfigure the module, run the readiness check, and apply the module in your tenancy.
2.5. Grant federated accessUpwind Management ConsoleEnter three values from the Terraform outputs to complete the connection.
3. Define resource scopeUpwind Management ConsoleChoose which compartments Upwind audits and scans, then test and save.

Integration Steps​

To start, log in to the Upwind Management Console , select the + (plus) symbol at the top of the screen, select Connect cloud account, then choose Oracle Cloud Infrastructure > Connect Oracle Cloud Tenancy.

Step 1: Onboard Your Oracle Cloud Tenancy​

In this step, you provide key identifiers from your Oracle Cloud environment and register them in the Upwind Management Console.

Step 1.1: Provide Your Tenancy Details​

  1. Sign in to the Oracle Cloud Console with an account that has tenancy-level access.
  2. Collect the following values and enter them in the corresponding fields in the Upwind Management Console:
FieldWhere to find itNotes
Tenancy OCIDAdministration > Tenancy DetailsThe unique identifier of your tenancy. Starts with ocid1.tenancy..
Home RegionAdministration > Tenancy DetailsThe primary region of your tenancy, such as us-ashburn-1. You deploy the Terraform module against this region in Step 2.
Orchestrator Compartment OCIDIdentity & Security > Compartments, then select the compartmentThe compartment where Upwind creates its own resources, including the Cloud Scanner infrastructure. We recommend a dedicated compartment for Upwind rather than the root compartment. See Prerequisites.

Oracle Cloud Tenancy parameters and orchestrator compartment fields

Step 1.2: Configure the Identity Domain​

Upwind authenticates to your tenancy through an identity domain:

  • New domain (default): the Terraform module creates a dedicated identity domain for Upwind.
  • Existing domain: provide the OCID of an existing identity domain. The identity that runs Terraform must hold an administrator role in that domain. See Prerequisites.

Configure the identity domain for the Oracle Cloud Tenancy

Step 1.3: Generate Credentials for Upwind​

Click Generate new client credentials. Upwind generates two sets of client credentials, which allow your tenancy to authenticate with the Upwind Authorization Service:

CredentialsUsed for
OracleCloudTenancyConnectionCredentialsConnecting your tenancy to Upwind, so Upwind can discover and audit your Oracle Cloud resources.
OracleCloudScannersReportingCredentialsReporting scan results, metadata, and status from the Cloud Scanners back to Upwind.

Both sets are added to the Terraform snippet in Step 2. The module stores them as secrets in a Vault in the orchestrator compartment.

warning

Treat the client secrets like passwords. Store them securely and don't commit them to source control.

Generate client credentials for the Oracle Cloud Tenancy

Step 2: Deploy the Terraform Module​

In this step, you deploy the Upwind Terraform module in your tenancy. The module creates the identity domain, workload identity federation, users, groups, dynamic group, policies, and Vault that Upwind needs. For the full list, see the Glossary.

Authentication uses workload identity federation: the identity domain accepts only short-lived tokens signed by Upwind, verified against Upwind's published keys for your Upwind region. No long-lived API keys are created for Upwind.

Step 2.1: Configure the Terraform Module​

  1. Create a new directory for your Terraform project and open it in your terminal.
  2. Create a file named main.tf.
  3. Copy the snippet from the Terraform setup section of the Upwind Management Console and paste it into main.tf. The snippet is pre-filled with the values you entered in Step 1.
  4. Review the values before you continue.
main.tf
module "upwind_integration_oci_onboarding" {
source = "upwindsecurity/onboarding/oci"
# Optional: pin the module version
# version = "~> 1.13"

deployment_mode = "tenant"
upwind_region = "us"

# Upwind Credentials
upwind_client_id = "<client-id>"
upwind_client_secret = "<client-secret>"

# Cloud Scanner Credentials
scanner_client_id = "<scanner-client-id>"
scanner_client_secret = "<scanner-client-secret>"

# Upwind Organization Info
upwind_organization_id = "<your-upwind-organization-id>"

# Oracle Cloud Organization Info
oci_tenancy_id = "<tenancy-id>"

# Oracle Cloud Region - must be the tenancy's home region
oci_region = "<oci-home-region>"

# Compartment to act as the orchestrator
upwind_orchestrator_compartment = "<orchestrator-compartment-id>"

# Enable or disable Cloud Scanners
enable_cloudscanners = true
enable_cloudlogs = true

resource_suffix = "<suffix - auto generated>"
}

output "identity_domain_oidc_issuer_url" {
description = "OIDC issuer URL for the Identity Domain (for AWS IAM OIDC provider configuration)"
value = module.upwind_integration_oci_onboarding.identity_domain_oidc_issuer_url
}

output "identity_domain_id" {
description = "OCID of the Identity Domain (needed for offboarding)"
value = module.upwind_integration_oci_onboarding.identity_domain_id
}

output "management_sa_email" {
description = "Email of the management service account"
value = module.upwind_integration_oci_onboarding.upwind_management_service_account_email
}

output "confidential_app_client_id" {
description = "The client ID of the confidential OAuth client app for workload identity federation"
value = module.upwind_integration_oci_onboarding.confidential_app_client_id
}

output "confidential_app_client_secret" {
description = "The client secret of the confidential OAuth client app for workload identity federation"
value = module.upwind_integration_oci_onboarding.confidential_app_client_secret
sensitive = true
}

output "vault_id" {
description = "The OCID of the Vault (either created or provided by user)"
value = module.upwind_integration_oci_onboarding.vault_id
}

Terraform module snippet for main.tf (Oracle Cloud Tenancy)

Deploy from the home region

Set oci_region to your tenancy's Home Region and run Terraform against that region. OCI accepts changes to users, groups, dynamic groups, and policies only in the home region, so applying from any other region fails.

note
  • upwind_region takes a single value: the region where your Upwind organization is hosted. Valid values are us, eu, and ap.
  • The confidential_app_client_secret output must be marked sensitive = true, as shown above. If the snippet you copied doesn't include it, add it, or terraform apply fails with an error about a sensitive value.
  • The Terraform setup snippet in the console does not pin a module version. To pin one, uncomment the version argument and set it to the release you want to use. To move to a newer release later, see Upgrade the Module.

The snippet doesn't configure the OCI provider, so Terraform uses the DEFAULT profile in ~/.oci/config, including the region set in that profile. To make sure Terraform uses the intended profile and targets your home region, add the following blocks to main.tf. Choose the tab that matches how you authenticate to OCI:

Use this for a profile created with oci setup config.

terraform {
required_providers {
oci = {
source = "oracle/oci"
version = ">= 8.0.0"
}
}
}

provider "oci" {
config_file_profile = "<profile-name>"
region = "<oci-home-region>"
}

Replace <profile-name> with the name of your profile in ~/.oci/config (for example, DEFAULT), and <oci-home-region> with your tenancy's home region (for example, us-ashburn-1).

Tag the Resources (Optional)​

To tag every resource the module creates, add either or both of these arguments to the module block:

VariableDescription
tagsA map of free-form tags to apply to all resources.
defined_tagsA map of defined tags, keyed by <namespace>.<key>. The tag namespaces and keys must already exist in your tenancy and must not be retired.
  tags = {
"Owner" = "security"
}

defined_tags = {
"mandatory_tags.Environment" = "prod"
}
Enable Cloud Logs​

Setting enable_cloudlogs = true creates a read-only cloudlogs user and group in the identity domain, behind the same token exchange trust that Upwind uses for the other service users.

Upwind uses this identity to read logs from your tenancy. It has no API key, no secret, and no access of its own: it can read only the log resources that are explicitly shared with it, which happens when you set up a log integration for the tenancy.

If your tenancy is already onboarded without the flag, add enable_cloudlogs = true to your module block, then follow Upgrade the Module. Run terraform init -upgrade first: an existing deployment stays on the module version it was initialized with, and older versions fail with an unsupported argument error. The apply adds the cloudlogs user and group and leaves your existing onboarding resources unchanged.

Step 2.2: Run the Readiness Check and Apply the Module​

Run the Readiness Check​

Before you apply, run the Upwind preflight check to confirm your tenancy is ready for onboarding. The check is read-only and reports problems before Terraform creates anything - such as an apply from outside the home region, missing caller permissions, an unusable identity domain or Vault, or resources left over from an earlier onboarding. Catching these early matters: a failure halfway through an apply can leave tenancy-level resources behind that have to be cleaned up by hand.

The check runs with upwindctl. If you don't have it yet, see Install upwindctl. If you already have it, update it to the latest version first.

Using the same ~/.oci/config profile as Terraform, run the following. If you use a profile other than DEFAULT, add --oci-profile <profile-name>, and for a session token profile, also add --oci-auth security_token.

upwindctl oracle onboarding preflight \
--tenancy-id <tenancy-id> \
--organization-id <your-upwind-organization-id> \
--orchestrator-compartment-id <orchestrator-compartment-id> \
--region <oci-home-region> \
--upwind-region us \
--resource-suffix <resource-suffix>

Use the same values as in your main.tf. In particular, set --resource-suffix to the resource_suffix from the snippet, so the check looks for leftovers under the exact resource names the module will create. If you set any of these optional arguments in the module block, pass them to the check too:

Module argumentReadiness check flag
oci_domain_id--domain-id <identity-domain-id>
defined_tags--defined-tags <namespace>.<key>=<value> (repeat or comma-separate for several tags)
tags--tags <key>=<value>
enable_cloudscanners = false--enable-cloudscanners=false
create_timeout--create-timeout <duration>

The command exits non-zero if anything would block the apply. Resolve the reported issues and re-run it before you continue. Run upwindctl oracle onboarding preflight --help to view all available options.

Apply the Module​

From the directory that contains main.tf, run:

terraform init
terraform plan
terraform apply

Review the plan, then confirm the apply. Creating and replicating the identity domain can take several minutes.

Infrastructure as Code

You can run the module manually as shown above, but it is designed to fit into an Infrastructure-as-Code workflow such as Terragrunt or a CI/CD pipeline. Inject the client secrets with your tool's secret management rather than writing them into main.tf.

Protect the Terraform state

The Terraform state contains the Upwind client credentials and the confidential application's client secret. Store it in a secure backend with restricted access.

Apply the Terraform module for the Oracle Cloud Tenancy

When the apply completes, retrieve the three values you need for Step 2.5:

terraform output -raw identity_domain_oidc_issuer_url
terraform output -raw confidential_app_client_id
terraform output -raw confidential_app_client_secret

Step 2.5: Grant Federated Access to Upwind​

In this step, you give Upwind the values it needs to authenticate to your tenancy through OCI workload identity federation, without long-lived credentials.

  1. Enter the Terraform outputs in the matching fields:
FieldTerraform output
Identity Domain URLidentity_domain_oidc_issuer_url
Confidential Application Client IDconfidential_app_client_id
Confidential Application Client Secretconfidential_app_client_secret
  1. Click Save.

Grant federated access to Upwind using OCI Workload Identity Federation

Step 3: Define Resource Scope​

In the final step, you choose which compartments Upwind audits and scans. The view shows your tenancy structure and compartments, and you set the scope for each:

OptionWhat it does
Cloud APILets Upwind discover and audit the compartment's resources through OCI APIs.
Cloud ScannerScans the compartment's resources with Upwind Cloud Scanners, deployed in your orchestrator compartment. Requires Cloud API.
Enable Auto-Connect for New CompartmentsConnects compartments created later under the tenancy automatically, with Cloud API access and Cloud Scanner scanning, so new compartments are covered without further setup.
Scope Dependency

Cloud Scanner scope depends on Cloud API scope. If you enable Cloud Scanner for a compartment, Cloud API must also be enabled for it.

When you're done, click Test & Save. Upwind saves the scope settings and tests the connection to your tenancy, and shows a success message when the connection works.

Scope Delays

It may take up to 30 minutes for scope changes to reach the Cloud Scanner.

Verify the Integration​

After a successful connection:

  1. The integration status shows as Active.
  2. Upwind begins an initial full scan of your tenancy, and discovers and inventories resources automatically.
  3. Initial discovery typically takes 30-60 minutes, depending on tenancy size.
  4. You can monitor progress in the Inventory section.

Your Oracle Cloud tenancy is now connected to Upwind.

Upgrade the Module​

Upwind releases new versions of the onboarding module regularly, with new features and fixes. We recommend keeping your deployment up to date. Each release is listed on the module's GitHub releases page and in the Terraform Registry .

To upgrade, use the same main.tf, Terraform state, and OCI profile you used to onboard, and run Terraform against the tenancy's home region:

  1. If you pinned the module version, update the version argument in main.tf to include the release you want, for example version = "~> 1.14". If you didn't pin a version, you don't need to change anything.

  2. Download the new version:

    terraform init -upgrade
  3. Optionally, run the readiness check again to confirm the tenancy is still ready.

  4. Review the planned changes:

    terraform plan

    If the plan would destroy or replace any resources, contact Upwind Support before you apply.

  5. Apply the upgrade:

    terraform apply
note
  • If you use a session token profile, refresh the token before you start with oci session refresh --profile <profile-name>.
  • Without a pinned version, terraform init -upgrade downloads the latest release. With a constraint such as ~> 1.13, it downloads the latest release that matches the constraint.

Offboarding​

Run terraform destroy to remove everything the module created. Use the same OCI credentials you used to apply the module.

If the module also created the identity domain (the default, when oci_domain_id is not set), the destroy needs one manual step in the middle. OCI deletes an identity domain only after it has been deactivated, and the OCI provider deletes the domain without deactivating it first. As a result, the first terraform destroy removes everything inside the domain - the Upwind OAuth app, users, groups, and token-exchange trust - and then fails on the domain itself.

tip

Before you start, save the domain OCID with terraform output -raw identity_domain_id. A partly completed destroy can leave outputs unreadable. The commands below read the OCID from the Terraform state instead, so they work either way.

  1. Destroy the module. It removes everything except the identity domain, then fails on the domain.

    terraform destroy
  2. Deactivate the identity domain. Upwind's OAuth app is already gone, so OCI accepts the deactivation.

    DOMAIN_ID=$(terraform state show -no-color "$(terraform state list | grep 'oci_identity_domain.upwind_identity_domain\[0\]')" \
    | awk -F'"' '/^ *id *=/ {print $2; exit}')
    oci iam domain deactivate --domain-id "$DOMAIN_ID"
  3. Destroy again. It deletes the now-inactive domain.

    terraform destroy
note
  • Existing domain: if you supplied your own identity domain with oci_domain_id, it is not deleted. The first terraform destroy removes Upwind's users, groups, and OAuth app from your domain and completes, so steps 2 and 3 are not needed.
  • Replicas: deleting the domain removes it from every region it was replicated to. You don't need to remove replicas separately.
  • Access: Upwind loses access to your tenancy as soon as the first destroy starts.

Troubleshooting​

If you run into issues during onboarding or after connecting, see Troubleshooting.