<?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: load config partial  / bad encryption or wrong masterkey in Panorama Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/541155#M1520</link>
    <description>&lt;P&gt;Turns out a linter we had running in vscode garbled the strings, reimporting an unadulterated config from the device solved the problem.&lt;/P&gt;</description>
    <pubDate>Fri, 05 May 2023 01:01:28 GMT</pubDate>
    <dc:creator>mb_equate</dc:creator>
    <dc:date>2023-05-05T01:01:28Z</dc:date>
    <item>
      <title>load config partial  / bad encryption or wrong masterkey</title>
      <link>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/540289#M1502</link>
      <description>&lt;P&gt;We're replacing an HA pair for a customer with new hardware and building new templates as the current devices have local overrides for almost the entire device &amp;amp; network config (looks like the result of an improper transition to Panorama).&lt;/P&gt;
&lt;P&gt;The idea is we export the current device config and merge it into the new template.&amp;nbsp;Both Panorama and the current devices should be sharing the same (non-default) master key, so the encrypted stuff like bind passwords and SSL keys should load without an issue, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On merging the partial config in a Panorama lab, we get the following errors:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;template -&amp;gt; X -&amp;gt; config -&amp;gt; shared -&amp;gt; server-profile -&amp;gt; ldap -&amp;gt; Y -&amp;gt; bind-password bad encryption or wrong masterkey. Discarding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;template -&amp;gt; X -&amp;gt; config -&amp;gt; shared -&amp;gt; response-page -&amp;gt; Y&amp;nbsp;is invalid. Invalid base64 data&lt;BR /&gt;&amp;nbsp;template -&amp;gt; X -&amp;gt; config -&amp;gt; shared -&amp;gt; response-page -&amp;gt; Y invalid. Discarding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;template -&amp;gt; X -&amp;gt; config -&amp;gt; shared -&amp;gt; certificate -&amp;gt; Y -&amp;gt; private-key bad encryption or wrong masterkey. Discarding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This suggests that the MK used to decrypt those from the source config is incorrect, but when we specify the key in the load command we get the same results.&amp;nbsp;This is all assuming the devices use the same MK as Panorama, which I just learned is no longer a requirement since PAN-OS 10.0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the rare case that the device MK was still default, we attempt to use the default MK to merge the device config (p1a2...) and PAN-OS has difficulty loading its own config (bad encryption or wrong masterkey on Panorama config nodes) so that doesn't work either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question time.&lt;/P&gt;
&lt;P&gt;1. Is it possible that the original device MK is still default, in which case how do we merge the config into a Panorama template which is non-default? Have already tried reverting the Panorama MK to default and loading, still no dice.&lt;/P&gt;
&lt;P&gt;2. If Panorama and a managed device can now use different master keys (actually recommended now), how are values in a template encrypted with the Panorama masterkey decrypted by the managed device on a template push?&lt;/P&gt;
&lt;P&gt;3. Is dark matter real or an excuse for an objection to revise Newtonian physics?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 06:06:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/540289#M1502</guid>
      <dc:creator>mb_equate</dc:creator>
      <dc:date>2023-04-27T06:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: load config partial  / bad encryption or wrong masterkey</title>
      <link>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/540298#M1503</link>
      <description>&lt;P&gt;We've had confirmation that the masterkeys are all the same, which agrees with the encrypted strings from the device export and Panorama matching (e.g. bind-passwords).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can also load part of the running config with encrypted strings:&lt;/P&gt;
&lt;PRE&gt;admin@panorama# load config partial mode merge from-xpath devices/entry/template/entry[@name='Z']/config/shared/server-profile" to-xpath /config/devices/entry/template/entry[@name='X']/config/shared/server-profile from running-config.xml&lt;BR /&gt;&lt;BR /&gt;Config loaded from running-config.xml&lt;BR /&gt;&lt;BR /&gt;[edit]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But not from the device export, with the same strings:&lt;/P&gt;
&lt;PRE&gt;admin@panoramarama# load config partial mode merge from-xpath shared/server-profile to-xpath /config/devices/entry/template/entry[@name='X']/config/shared/server-profile from fw.xml&lt;BR /&gt;&lt;BR /&gt;Config loaded from fw.xml&lt;BR /&gt;template -&amp;gt; X -&amp;gt; config -&amp;gt; shared -&amp;gt; server-profile -&amp;gt; ldap -&amp;gt; Y -&amp;gt; bind-password bad encryption or wrong masterkey. Discarding.&lt;BR /&gt;&lt;BR /&gt;[edit]&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 07:59:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/540298#M1503</guid>
      <dc:creator>mb_equate</dc:creator>
      <dc:date>2023-04-27T07:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: load config partial  / bad encryption or wrong masterkey</title>
      <link>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/540318#M1505</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/127749"&gt;@mb_equate&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have run into this also.&amp;nbsp; I have fixed it a couple of ways.&amp;nbsp; The easiest by far is just to manually configure the LDAP password after the load config partial.&amp;nbsp; Then the commit and push will work fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The harder way is to configure the MK on both devices.&amp;nbsp; As you have noticed, sometimes that works and sometimes it doesn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:59:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/540318#M1505</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2023-04-27T11:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: load config partial  / bad encryption or wrong masterkey</title>
      <link>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/541155#M1520</link>
      <description>&lt;P&gt;Turns out a linter we had running in vscode garbled the strings, reimporting an unadulterated config from the device solved the problem.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 01:01:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/panorama-discussions/load-config-partial-bad-encryption-or-wrong-masterkey/m-p/541155#M1520</guid>
      <dc:creator>mb_equate</dc:creator>
      <dc:date>2023-05-05T01:01:28Z</dc:date>
    </item>
  </channel>
</rss>

