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

Getting "Id in organization details is not set" error while creating a CertificateIssuer #29166

Closed
Srkvmv opened this issue Jun 1, 2022 · 8 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Srkvmv
Copy link

Srkvmv commented Jun 1, 2022

Describe the bug
I am getting the below exception while trying to create CertificateIssuer using azure CertificateClient.
I am trying to create an issuer for 'Digicert' provider. I am getting the error even after passing the required values(AccountId, Password and OrganizationId).

Note: I am able to create the certificate issuer using Azure CLI with the same values.

Exception or Stack Trace

Exception in thread "main" com.azure.core.exception.HttpResponseException: Status code 400, "{"error":{"code":"BadParameter","message":"Id in organization details is not set"}}"
	at com.azure.core.http.rest.RestProxy.instantiateUnexpectedException(RestProxy.java:420)
	at com.azure.core.http.rest.RestProxy.lambda$ensureExpectedStatus$2(RestProxy.java:393)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113)
	at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2398)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171)
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2194)
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2068)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)
	at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157)
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249)

Process finished with exit code 1

To Reproduce
Try executing the attached code snippet

Code Snippet

CertificateClient certificateClient = new CertificateClientBuilder()
        .vaultUrl("https://keyvault.azure.net/")
        .credential(credential)
        .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))
        .buildClient();
Map<String, String> tags = new HashMap<>();
String certificateName = "certificate-tenant1-sit-temenos-cloud";
tags.put(certificateName, "X509 Certificate");

CertificateIssuer issuer = new CertificateIssuer(ISSUER_NAME, PROVIDER_NAME)
        .setAccountId(digicertAccountId)
        .setPassword(digicertApiKey)
        .setAdministratorContacts(Collections.singletonList(new AdministratorContact().setFirstName("James")
                .setLastName("Clarke").setEmail("james@test.com")))
        .setOrganizationId(digicertOrgId);
logger.info("Issuer ******* {}", issuer.getAccountId());
CertificateIssuer returnedIssuer = certificateClient.createIssuer(issuer);

Expected behavior

Certificate Issuer should get created and with that one should be able to generate the certificate with that.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS] WIndows10
  • IDE: [e.g. IntelliJ] IntelliJ
  • Library/Libraries: azure-security-keyvault-certificates:4.3.2 , azure-core:1.28.0
  • Java version: [e.g. 8] 17

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

  • verbose dependency tree (mvn dependency:tree -Dverbose)
  • exception message, full stack trace, and any available logs

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [Yes] Bug Description Added
  • [Yes ] Repro Steps Added
  • [Yes ] Setup information Added
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 1, 2022
@joshfree joshfree added KeyVault Client This issue points to a problem in the data-plane of the library. labels Jun 1, 2022
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 1, 2022
@joshfree
Copy link
Member

joshfree commented Jun 1, 2022

@vcolin7 could you please follow up with @Srkvmv on this KeyVault github issue?

@vcolin7
Copy link
Member

vcolin7 commented Jun 2, 2022

Sure thing @joshfree, I will look into this.

@Srkvmv
Copy link
Author

Srkvmv commented Jun 3, 2022

@vcolin7 do you have any updates on this issue? also pls let me know if any additional details are required.

@Srkvmv
Copy link
Author

Srkvmv commented Jun 7, 2022

@joshfree @vcolin7 We need your assistance on solving this issue. pls provide an update

@vcolin7
Copy link
Member

vcolin7 commented Jun 7, 2022

Hi @Srkvmv, sorry for the late response, I believe this could be caused by a problem in CertificateAsyncClient where the organizationId is not set when creating or updating a certificate issuer. I have opened a PR with a fix that should be made available to all users later this week.

@Srkvmv
Copy link
Author

Srkvmv commented Jun 13, 2022

Hi @Srkvmv, sorry for the late response, I believe this could be caused by a problem in CertificateAsyncClient where the organizationId is not set when creating or updating a certificate issuer. I have opened a PR with a fix that should be made available to all users later this week.

Hi @vcolin7 , I could see the PR being approved and merged. Which version should I download to get the fix?

@vcolin7
Copy link
Member

vcolin7 commented Jun 14, 2022

Hi @Srkvmv, the latest stable version for Key Vault Certificates is 4.3.3. Let me know if you are still facing this issue after updating :)

Copy link

Hi @Srkvmv, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants