hypnoglow / terraform-provider-oryhydra

🔏 Terraform Provider for ORY Hydra

Home Page:https://registry.terraform.io/providers/hypnoglow/oryhydra/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support providing an Authorization Header manually

davearata-snorack opened this issue · comments

The authentication method that protects our hydra admin API is not a standard OAuth 2.0 credentials flow. However we can generate a token through our terraform and then provide the token in authorization header for hydra. A potential example below

data "google_service_account_id_token" "oidc" {
  target_audience = "https://your.hydra.admin.app/"
}

provider "oryhydra" {
  url = "https://your.hydra.admin.app"
  authorization_header = "Bearer ${data.google_service_account_id_token.oidc.id_token}"
}

I've released prerelease version v0.5.0-pre.0 with this feature included, let me know if it works for you.