question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Key Vault: Certificate appears to be serialized incorrectly

See original GitHub issue

Library name and version

Azure.Security.KeyVault.Certificates Latest version

Describe the bug

When calling CertificateClient.CreateIssuerAsync with a specific OrganizationId in the CertificateIssuer class, the serializer incorrectly uses the AccountId instead of the OrganizationId.

From CertificateIssuer.cs: if (!string.IsNullOrEmpty(OrganizationId)) { json.WriteString(s_organizationIdPropertyNameBytes, AccountId); }

When viewed in the Azure portal, the account ID shows up in the orginization ID field.

Expected behavior

The specified OrganizationId property value should be used instead of the AccountId property value.

Actual behavior

The AccountId property value is used for both AccountId and OrganizationId.

Reproduction Steps

Use the SDK to create a certificate issuer and verify that the specified organization ID is not used. Instead the account ID is used.

Environment

No response

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
heathscommented, Mar 31, 2023

We’re not sure exactly when the next beta will be, so I went ahead and released a patch: https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.5.1

Thanks again for finding this!

Fixed in #35254

0reactions
thomas-hammondcommented, Mar 31, 2023

@heaths Thanks so much for the quick turnaround on this. I think we can wait. We found the issue when writing some deployment code to set up our Azure Key Vault certificate issuer. But for now, we have the code using the “old” SDK. That should be fine until the update gets officially released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Key Vault - A Conflict Occurred that Prevented the ...
The error seems to indicate that something or someone, else is writing to the same Key Vault at the same time.
Read more >
Common key vault errors in Azure Application Gateway
This article identifies key vault-related problems, and helps you resolve them for smooth operations of Application Gateway.
Read more >
Always Encrypted with Azure Key Vault SSMS Purge Error
I was able workaround this by creating the KEY in the vault, scripting out the CREATE COLUMN MASTER KEY referencing the key's full...
Read more >
Unable to generate and import the certificate in azure key ...
Hi, I am unable to generate or import the certificate in azure key vault. I am getting the error as attached image.
Read more >
Chapter 2 Server Error Message Reference
Occurs for failure to create or copy a file needed for some operation. Possible causes: Permissions problem for source file; destination file already...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found