DelineaXPM / terraform-provider-tss

MIT License
6 stars 3 forks source link

Provider seems unusable with Delinea SAAS (not self hosted) #67

Open benjamin-rousseau-shift opened 5 months ago

benjamin-rousseau-shift commented 5 months ago

Description of the issue

I can't seem to make the provider work with the SAAS version of Delinea.

Expected behavior

The data return a value

Actual behavior data.tss_secret.test: Reading... ╷ │ Error: 404 Not Found:

Your environment

We have the Delinea SAAS using Secret Server

Steps to reproduce

  required_providers {
    tss = {
      source  = "DelineaXPM/tss"
      version = "2.0.5"
    }
  }
}

provider "tss" {
  password   = "test1234"
  domain     = "contoso.com"
  username   = "app"
  server_url = "https://contoso.delinea.app"
}

data "tss_secret" "test" {
  field = "password"
  id    = "1"
}

output "data" {
  value = data.tss_secret.test.value
}

EDIT : I managed to find an URL that end with .secretservercloud.eu the error got from 404 to 400 Bad Request: {"error":"Login failed."} and when I try through the normal rest api I get {"error":"Invalid grant_type"}

tylerezimmerman commented 5 months ago

@benjamin-rousseau-shift this will be resolved in our next release, which should be very soon.

tylerezimmerman commented 5 months ago

This should have been resolved in the 2.0.6 release, @benjamin-rousseau-shift can you confirm?

benjamin-rousseau-shift commented 5 months ago

I confirm that now I can use the global app url contoso.delinea.app However now I get the following issue :

with TF_LOG=TRACE

I found this : error getting accessToken so it does not seem to be related to the secret, but rather to the authentication method.

benjamin-rousseau-shift commented 5 months ago

I can get the secret by using the secret server url directly, but I need to login using a local account created directly on the secret server.

It seems very complicated to be honest everything is so unclear. I'm just trying thing at random at this point.

debahl commented 5 days ago

I am facing a similar issue while creating a secret through terraform.

Error: 400 Bad Request: {"error":"Login failed."}