Closed mcgiany closed 4 months ago
I think problem is in central secret service. Documentation from this page: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-application-secret-store is probably outdated.
This command doesnt work: Invoke-WebRequest -CertificateThumbprint <ClusterCertThumbprint> -Method POST -Uri "https:<clusterfqdn>/Resources/Secrets/supersecret/values/ver1/list_value?api-version=6.4-preview"
I get this response
{"Error":{"Code":"0x80090010","Message":"Null"}}
So we finally figure out why its not working. Problem was with certificate that we use for central secret service.
If we create cert with this script, it doesnt work.
param($certname, $password, $path)
$params = @{
Subject = "CN=$certname"
CertStoreLocation = "Cert:\LocalMachine\My"
KeyExportPolicy = 'Exportable'
KeySpec = 'Signature'
KeyLength = 2048
KeyAlgorithm = 'RSA'
HashAlgorithm = 'SHA256'
NotAfter = (Get-Date).AddMonths(24)
}
$cert = New-SelfSignedCertificate @params
Export-Certificate -Cert $cert -FilePath "$path\$certname.cer"
$mypwd = ConvertTo-SecureString -String $password -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath "$path\$certname.pfx" -Password $mypwd
if we use this, everything works.
New-SelfSignedCertificate -Type DocumentEncryptionCert -KeyUsage DataEncipherment -Subject mydataenciphermentcert -Provider 'Microsoft Enhanced Cryptographic Provider v1.0'
Both certs looks very similar.
[RANT] We spent more than 1/2 day to solve this problem, because error handling and error codes in SF sucks. Using SF is always struggle and i dont recommend to use it for any developer. This product is a big fail!
Hi,
i have a stateless service webapi application but all the sudden i cannot run it and debug.
My local cluster version is
10.1.1951.9590
If have this version of SF Kestrel<PackageReference Include="Microsoft.ServiceFabric.AspNetCore.Kestrel" Version="7.0.1816" />
The only errors i can find in events are:
The messages are not very usefull.