<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Gateway public key size problem in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/885182#M21832</link>
    <description>&lt;P&gt;Incidently,&lt;/P&gt;&lt;P&gt;If you fix the provided code to use an encrypted length based on the key size, Power BI gateway won't decrypt and throws the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;DM.EnterpriseGateway Error: 0 : 2019-12-27T10:48:00.1390752Z DM.EnterpriseGateway a2650f49-396e-4e2c-b148-2cffef33b894 2880da58-6746-4578-83c6-40a997897f6a MGEC 00000000-0000-0000-0000-000000000000 d4c561e9-1c83-458a-84ed-1d5130e1dded d4c561e9-1c83-458a-84ed-1d5130e1dded 4B80A52E [DM.Pipeline.Common] Non-gateway exception encountered in activity scope: System.Security.Cryptography.CryptographicException: The parameter is incorrect.&lt;/P&gt;&lt;P&gt;at System.Security.Cryptography.NCryptNative.DecryptData[T](SafeNCryptKeyHandle key, Byte[] data, T&amp;amp; paddingInfo, AsymmetricPaddingMode paddingMode, NCryptDecryptor`1 decryptor)&lt;BR /&gt;at System.Security.Cryptography.NCryptNative.DecryptDataOaep(SafeNCryptKeyHandle key, Byte[] data, String hashAlgorithm)&lt;BR /&gt;at System.Security.Cryptography.RSACng.Decrypt(Byte[] data, RSAEncryptionPadding padding)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.CommonUtilities.Security.AsymmetricHigherKeyEncryptionHelper.Decrypt(String cipherText, String containerName)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.EncryptCredentialsWithSymmetricKey(GatewaySerializationContext responseContext, Func`1 getPlainCredentials)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.&amp;lt;&amp;gt;c__DisplayClass6_0.&amp;lt;&amp;lt;EncryptCredentialsWithTestDataSourceConnection&amp;gt;b__0&amp;gt;d.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.Pipeline.GatewayPipelineTelemetry.PipelineTelemetryService.&amp;lt;ExecuteInActivity&amp;gt;d__7`1.MoveNext()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2019 12:27:01 GMT</pubDate>
    <dc:creator>dmarkham</dc:creator>
    <dc:date>2019-12-27T12:27:01Z</dc:date>
    <item>
      <title>Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/870807#M21684</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is something changed with the public key size on the enterprise gateway lately?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've been using this key successfully to encrypt credentials and update DataSources bound on an already set up gateway.&lt;BR /&gt;However after updating the gateway suddenly the returned key is 2048 bit instead the old one which was 1024bit ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(print scr. of the current vs old key)&lt;/P&gt;&lt;P&gt;&lt;A href="http://prntscr.com/q8tja2" target="_self"&gt;http://prntscr.com/q8tja2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this key size, the following documentation on the official powerbi docs&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/encrypt-credentials" target="_self"&gt;https://docs.microsoft.com/en-us/power-bi/developer/encrypt-credentials&lt;/A&gt;&lt;/P&gt;&lt;P&gt;is not working since it is using the previous 1024 vit key version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why this has been changed or possibly it is problem with my gateway ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 13:18:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/870807#M21684</guid>
      <dc:creator>pbiembed5</dc:creator>
      <dc:date>2019-12-10T13:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/885176#M21831</link>
      <description>&lt;P&gt;We are also seeing the same problem&lt;/P&gt;&lt;P&gt;Were you able to find out more, or has there been an official response?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 12:17:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/885176#M21831</guid>
      <dc:creator>dmarkham</dc:creator>
      <dc:date>2019-12-27T12:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/885182#M21832</link>
      <description>&lt;P&gt;Incidently,&lt;/P&gt;&lt;P&gt;If you fix the provided code to use an encrypted length based on the key size, Power BI gateway won't decrypt and throws the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;DM.EnterpriseGateway Error: 0 : 2019-12-27T10:48:00.1390752Z DM.EnterpriseGateway a2650f49-396e-4e2c-b148-2cffef33b894 2880da58-6746-4578-83c6-40a997897f6a MGEC 00000000-0000-0000-0000-000000000000 d4c561e9-1c83-458a-84ed-1d5130e1dded d4c561e9-1c83-458a-84ed-1d5130e1dded 4B80A52E [DM.Pipeline.Common] Non-gateway exception encountered in activity scope: System.Security.Cryptography.CryptographicException: The parameter is incorrect.&lt;/P&gt;&lt;P&gt;at System.Security.Cryptography.NCryptNative.DecryptData[T](SafeNCryptKeyHandle key, Byte[] data, T&amp;amp; paddingInfo, AsymmetricPaddingMode paddingMode, NCryptDecryptor`1 decryptor)&lt;BR /&gt;at System.Security.Cryptography.NCryptNative.DecryptDataOaep(SafeNCryptKeyHandle key, Byte[] data, String hashAlgorithm)&lt;BR /&gt;at System.Security.Cryptography.RSACng.Decrypt(Byte[] data, RSAEncryptionPadding padding)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.CommonUtilities.Security.AsymmetricHigherKeyEncryptionHelper.Decrypt(String cipherText, String containerName)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.EncryptCredentialsWithSymmetricKey(GatewaySerializationContext responseContext, Func`1 getPlainCredentials)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.&amp;lt;&amp;gt;c__DisplayClass6_0.&amp;lt;&amp;lt;EncryptCredentialsWithTestDataSourceConnection&amp;gt;b__0&amp;gt;d.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at Microsoft.PowerBI.DataMovement.Pipeline.GatewayPipelineTelemetry.PipelineTelemetryService.&amp;lt;ExecuteInActivity&amp;gt;d__7`1.MoveNext()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 12:27:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/885182#M21832</guid>
      <dc:creator>dmarkham</dc:creator>
      <dc:date>2019-12-27T12:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/912346#M22103</link>
      <description>&lt;P&gt;Any update on this problem?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 12:50:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/912346#M22103</guid>
      <dc:creator>dmarkham</dc:creator>
      <dc:date>2020-01-27T12:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/927016#M22256</link>
      <description>&lt;P&gt;Got the same problem last week while setting up a new gateway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Found updated code example in&amp;nbsp;&lt;A href="https://github.com/microsoft/PowerBI-CSharp/tree/master/sdk/PowerBI.Api/Extensions/V2" target="_blank"&gt;https://github.com/microsoft/PowerBI-CSharp/tree/master/sdk/PowerBI.Api/Extensions/V2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 12:37:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/927016#M22256</guid>
      <dc:creator>PeterPetkov</dc:creator>
      <dc:date>2020-02-10T12:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/932830#M22316</link>
      <description>&lt;P&gt;Not had time to fully qualify, but initial tests did not show this code making any difference&lt;BR /&gt;The error went away, but additional errors occurred on the gateway with other operations as a result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've not had time to check into it exactly, but wondering did this fix the problem for you?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 08:20:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/932830#M22316</guid>
      <dc:creator>dmarkham</dc:creator>
      <dc:date>2020-02-14T08:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Gateway public key size problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/938444#M22364</link>
      <description>&lt;P&gt;My problem is solved. But in addition to new AsymmetricKeyEncryptor code, i've updated the Microsoft.PowerBI.Api NuGet package to 2.14 and Enterprise Gateway is the latest 3000.27.30 (February 2020) release&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;The link from my previous comment is not working. Code is moved one level up&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/PowerBI-CSharp/tree/master/sdk/PowerBI.Api/Extensions/" target="_blank"&gt;https://github.com/microsoft/PowerBI-CSharp/tree/master/sdk/PowerBI.Api/Extensions/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 07:55:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Gateway-public-key-size-problem/m-p/938444#M22364</guid>
      <dc:creator>PeterPetkov</dc:creator>
      <dc:date>2020-02-19T07:55:24Z</dc:date>
    </item>
  </channel>
</rss>

