Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating property version: API Error (The signature does not match) #446

Closed
sebagomez opened this issue Jul 6, 2023 · 9 comments
Closed
Assignees

Comments

@sebagomez
Copy link

Hello, I'm trying to apply a new version of our Property configuration (via terraform) but I'm getting this weird error.

Error: creating property version: API error: 
{
    "type": "https://problems.luna.akamaiapis.net/-/pep-authn/deny",
    "title": "Not authorized",
    "detail": "The signature does not match",
    "instance": "https://akab-********.akamaiapis.net/papi/v1/properties/prp_********/versions?contractId=ctr_C-*********\u0026groupId=grp_******",
    "statusCode": 401
}

I'm using the same credentials I used before when it worked, I also created a new set of credentials just in case.
The detail ("The signature does not match") makes me think it might be something I changed.

Could you please explain when would I see this error so I can investigate a bit further?

TERRAFORM_VERSION: 1.4.6
AKAMAI_PROVIDER_VERSION: >= 2.0.0

@dstopka
Copy link
Contributor

dstopka commented Jul 6, 2023

Hi @sebagomez,

Thank you for letting us know. Does the described issue occur at each apply or only from time to time? May I ask you to provide an example of how you're configuring the akamai provider? It'll allow me to investigate this issue.

Can you also let me know what is the exact version of akamai provider that you're experiencing issues with? In the recent major release we removed deprecated attributes in the provider configuration block. Did you use any of papi_section, property_section or property in the mentioned block previously?

Best regards,
Darek

@sebagomez
Copy link
Author

Hello @dstopka ,
the provider block looks just like the following

provider "akamai" {

  config {
    host          = var.akamai_host
    client_secret = var.akamai_client_secret
    client_token  = var.akamai_client_token
    access_token  = var.akamai_access_token
  }
}

In my code I have a akamai_property and the akamai_property_activation and then a few json files for the rules.

resource "akamai_property" "my_property" {
  name        = var.property_name[var.my_environment]
  contract_id = data.akamai_contract.contract.id
  group_id    = data.akamai_group.group.id
  product_id  = var.product_id
  rule_format = var.rule_format

  dynamic "hostnames" {
    for_each = var.hostnames[var.my_environment]
    content {
      cname_from             = hostnames.value["cname_from"]
      cname_to               = hostnames.value["cname_to"]
      cert_provisioning_type = var.cert_provisioning
    }
  }

  rules = data.akamai_property_rules_template.rules.json
}

resource "akamai_property_activation" "my_property_activation" {
  property_id = akamai_property.my_property.id
  contact     = var.activation_contacts
  version     = akamai_property.my_property.latest_version
  network     = upper(var.akamai_environment)
  note        = var.activation_message
}

Please let me know if you need anything else

@dstopka
Copy link
Contributor

dstopka commented Jul 6, 2023

@sebagomez Thank you for an update. Can you also let me know what exact version of akamai provider is used by your configuration and how often you encounter the reported issue (once, on every apply etc.)? The version can be obtained with terraform providers command.

@sebagomez
Copy link
Author

sebagomez commented Jul 6, 2023

Installed akamai/akamai v5.0.0 (signed by a HashiCorp partner, key ID XXXXXXXXXXX)

The issue started to happen yesterday every single time I try to apply. Planning and even importing works just fine.

Edit:

I just realized that the version that worked was 4.1

- Installing akamai/akamai v4.1.0.

Maybe I should stick to that one, but I'd really love to know what's going on with this one.

@sebagomez
Copy link
Author

hey @dstopka I forced the provider to use version 4.1.0 and it's now working
I'll stick to that version for the time being.

Still, let me know if you need any info to help you debug the issue with 5.0.0

@dstopka
Copy link
Contributor

dstopka commented Jul 7, 2023

Hi @sebagomez,

I posted a workaround for using the config block with v5.0.0 here. I hope it helps until we fix it.

@sebagomez
Copy link
Author

hi @dstopka , thank you the work around, but I'm in the middle of a move to production so I'll stay with 4.1.0 for now... maybe I'll upgrade for the next move. cheers

@dstopka
Copy link
Contributor

dstopka commented Jul 7, 2023

Tracking updates with #444 (comment).

@mgwoj
Copy link
Contributor

mgwoj commented Jul 12, 2023

This issue was fixed in recent release.

@mgwoj mgwoj closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants