Resource Access

The resource-access.conf file defines reusable credential profiles for external storage and key management services. Instead of embedding credentials inline in every API call, you define named profiles here and reference them via configRef when creating services.

Recommended: Use Managed Identity where possible for production deployments. Direct credential configuration (shown below) is best suited for development or environments where managed identity is unavailable.


How It Works

  1. Define a named profile in resource-access.conf (e.g. s3-storage, aws-kms)
  2. Reference the profile by name using "configRef": "<profile-name>" when creating a service via the API
  3. At runtime, the Enterprise API resolves the configRef and injects the appropriate credentials

This centralizes credential management — rotating secrets only requires updating resource-access.conf, not every service definition.


File Location

config/resource-access.conf

Storage Profiles

Storage profiles are used by services such as Credential Status that need to read and write data to a bucket or blob container.

AWS S3

resourceAccess = {
  s3-storage = {
    _type  = "AwsS3Access"
    id     = "s3-storage"
    region = "eu-north-1"
    bucket = { bucketName = "my-bucket" }
    credentials = {
      _type       = "AwsCredentials"
      accessKeyId = "abc"
      secretKey   = "xyz"
    }
  }
}

Azure Blob Storage

resourceAccess = {
  azure-storage = {
    _type  = "AzureBlobAccess"
    id     = "azure-storage"
    bucket = {
      bucketName = "documents"
      bucketUrl  = "https://example.blob.core.windows.net/"
    }
    credentials = {
      _type            = "AzureCredentials"
      connectionString = "DefaultEndpointsProtocol=https;AccountName=example;AccountKey=..."
    }
  }
}

Google Cloud Storage

resourceAccess = {
  gcp-storage-main = {
    _type     = "GcpStorageAccess"
    id        = "gcp-storage-main"
    projectId = "my-project"
    bucket    = { bucketName = "gcp-bucket-main" }
    credentials = {
      _type = "GcpCredentials"
      serviceAccountKeyJson = {
        type                        = "service_account"
        project_id                  = "my-project"
        private_key_id              = "abc123..."
        private_key                 = "-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
"
        client_email                = "service-account@my-project.iam.gserviceaccount.com"
        client_id                   = "1234567890"
        auth_uri                    = "https://accounts.google.com/o/oauth2/auth"
        token_uri                   = "https://oauth2.googleapis.com/token"
        auth_provider_x509_cert_url = "https://www.googleapis.com/oauth2/v1/certs"
        client_x509_cert_url        = "https://www.googleapis.com/robot/v1/metadata/x509/service-account%40my-project.iam.gserviceaccount.com"
        universe_domain             = "googleapis.com"
      }
    }
  }
}

KMS Profiles

KMS profiles are used when creating key management services for AWS KMS or Azure Key Vault.

AWS KMS

resourceAccess = {
  aws-kms = {
    _type  = "AwsKmsAccess"
    id     = "aws-kms"
    region = "eu-central-1"
    credentials = {
      _type       = "AwsCredentials"
      accessKeyId = "AK....F"
      secretKey   = "6Y....Sr"
    }
  }
}

Azure Key Vault

resourceAccess = {
  azure-kms = {
    _type       = "AzureKeyVaultAccess"
    id          = "azure-kms"
    keyVaultUrl = "https://n2-keyvault.vault.azure.net/"
    credentials = {
      _type        = "AzureCredentials"
      tenantId     = "a8......46d"
      clientId     = "3b......c2c"
      clientSecret = "1ZQ.......sc1n"
    }
  }
}

Using Profiles in API Calls

Once a profile is defined, reference it by name using configRef in your service creation request.

Credential Status Service (Storage)

curl -X POST \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/resource-api/services/create' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "credential-status",
    "config": {
      "configRef": "s3-storage"
    }
  }'

KMS Service

curl -X POST \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/resource-api/services/create' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "kms",
    "configRef": "aws-kms"
  }'

Configuration Reference

Common Fields

FieldDescription
_typeProfile type. See supported values below.
idUnique identifier for this profile. Must match the key name in resourceAccess.

Supported _type Values

_typeProviderUse case
AwsS3AccessAWSS3 bucket storage
AzureBlobAccessAzureBlob container storage
GcpStorageAccessGCPCloud Storage bucket
AwsKmsAccessAWSKey Management Service
AzureKeyVaultAccessAzureKey Vault

Storage-Specific Fields

FieldProviderDescription
bucket.bucketNameAzureName of the blob container
bucket.bucketUrlAWS , AzureThe URL of the registry bucket custom domain
regionAWSAWS region (e.g. eu-central-1)
endpointUrlAWSOptional S3-compatible endpoint (e.g. https://s3-mock.com)
projectIdGCPGoogle Cloud project ID

Credentials Fields

FieldProviderDescription
credentials.accessKeyIdAWSAWS access key ID
credentials.secretKeyAWSAWS secret access key
credentials.connectionStringAzure (Storage)Azure Blob Storage connection string
credentials.tenantIdAzure (KMS)Azure AD tenant ID
credentials.clientIdAzure (KMS)Azure AD client/application ID
credentials.clientSecretAzure (KMS)Azure AD client secret
credentials.serviceAccountKeyJsonGCPFull GCP service account key object
keyVaultUrlAzure (KMS)URL of the Azure Key Vault instance
Last updated on March 10, 2026