3

에서 KeyCredential '가치'를 업데이트 할 수 없습니다, 나는 다음과 같은 오류가 나타날 수이 푸른 응용 프로그램 매니페스트

"매니페스트 오류 세부 정보를 저장하지 못했습니다. KeyValueMustBeNull"(see screen shot)

매니페스트의 keyCredentials의 'Value'속성을 업데이트하려고 시도하고 있지만이를 허용하지 않습니다. Value set을 사용하여 매니페스트를 업로드 할 수는 있지만 그 값을 지우고 다시 null로 다시 설정합니다. 필자는 새로운 Azure Portal과 이전 관리 포털에서이 문제를 중복 시켰습니다.

감사합니다. :-)

답변

2

위의 링크 된 지침은 이와 비슷하지만 내 응용 프로그램에 Certificated를 추가하려고 할 때 과거에 나를 위해 일했던 것처럼 these 지침을 따르려고합니다.

이전 Azure 관리 포털과 사용중인 새 Azure 포털을 비교합니다.

Step 0: (If you do not have an X.509 certificate already) Create a self-issued certificate

You can easily generate a self-issued certificate with the makecert.exe tool.

  1. From the command line, run: makecert -r –pe -n “CN=MyCompanyName MyAppName Cert” -b 12/15/2014 -e 12/15/2016 –ss my –len 2048

  2. Open the Certificates MMC snap-in and connect to your user account. Find the new certificate in the Personal folder and export it to a base64-encoded CER file.

Note: Make sure the key length is at least 2048 when generating the X.509 certificate. Shorter key length are not accepted as valid keys.

Step 1: Get the base64 encoded cert value and thumbprint from a .cer X509 public cert file using PowerShell

Note: The instructions below show using Windows PowerShell to get properties of a x.509 certificate. Other platforms provide similar tools to retrieve properties of certificates.

$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 

$cer.Import(“mycer.cer”) 

$bin = $cer.GetRawCertData() 

$base64Value = [System.Convert]::ToBase64String($bin) 

$bin = $cer.GetCertHash() 

$base64Thumbprint = [System.Convert]::ToBase64String($bin) 

$keyid = [System.Guid]::NewGuid().ToString() 

Store the values for $base64Thumbprint, $base64Value and $keyid, to be used in the next step.

Step 2: Upload cert through the manifest file

  1. Log in to the Azure Management Portal (https://manage.windowsazure.com)

  2. Go to the AAD snap-in and there navigate to the application that you want to configure with an X.509 certificate

  3. Download the application manifest file through the Azure Management Portal

  4. Replace the empty “KeyCredentials”: [], property with the following JSON. NOTE: The KeyCredentials complex type is documented here: http://msdn.microsoft.com/en-us/library/azure/dn151681.aspx

    “keyCredentials“: [ 
    
    { 
    
        “customKeyIdentifier“: “$base64Thumbprint_from_above”, 
    
        “keyId“: “$keyid_from_above“, 
    
        “type”: “AsymmetricX509Cert”, 
    
        “usage”: “Verify”, 
    
        “value”: “$base64Value_from_above” 
    
    } 
    
    ], 
    

e.g.

“keyCredentials“: [ 

{ 

    “customKeyIdentifier“: “ieF43L8nkyw/PEHjWvj+PkWebXk=”, 

    “keyId“: “2d6d849e-3e9e-46cd-b5ed-0f9e30d078cc”, 

    “type”: “AsymmetricX509Cert”, 

    “usage”: “Verify”, 

    “value”: “MIICWjCCAgSgAwIBA***omitted for brevity***qoD4dmgJqZmXDfFyQ” 

} 

], 
  1. Save the change to the application manifest file.

  2. Upload the edited application manifest file through the Azure Management Portal.

  3. Optional: Download the manifest again, and see your X.509 cert is present on the application.

이 단계를 수행 한 후에도 여전히 같은 오류가 발생하는 경우 알려주십시오.

+0

안녕하세요, Shawn, 예, 내가 처음에 오류가 발생했을 때 따르는 지침이었습니다. 나 또한 매니페스트를 다운로드하고 수정하고 다시 업로드하지 않고 같은 장소에서 편집하고 동일한 오류가 발생했습니다. – Tracy

+0

어떤 포털을 사용하고 있습니까? https://manage.windowsazure.com을 사용해 보셨습니까? –

+0

새로운 Azure 포털과 예전 관리 포털을 모두 사용해 보았습니다. 두 포털에서 모두 발생했습니다. 내 권한과 관련이없는 것으로 보입니다. – Tracy

0

그래서 오래된 스레드이지만이 문제를 해결하고 customKeyIdentifier를 업데이트하려고했습니다. 외관상으로는 Azure는 그들이 저장 한 열쇠가 일치하지 않기 때문에 이것을 좋아하지 않습니다.

방금 ​​keyCredentials를 복사하고 keyCredentials 비어있는 매니페스트를 저장 한 다음 keyID 필드에 GUID가 변경되도록 값을 다시 입력했습니다.

아마도 GUID를 변경할 수 있습니다.