<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8?]]></title><description><![CDATA[<blockquote>
<p dir="auto">[!WARNING]<br />
<strong>Technical Redaction &amp; Safe Harbor Notice</strong>:<br />
All communication captures, system titles, and cryptographic parameters in this thread have been sanitized and neutralized. Real utility meter identifiers, production encryption keys (GUEK/GAK/MK), SIM IMSIs, and proprietary network envelopes have been substituted with standard IEC 62056 synthetic test vectors. Do not post unredacted production captures or live cryptographic keys.</p>
</blockquote>
<p dir="auto">We are troubleshooting field communication access permissions under Management Client (<code>Client SAP 0x0001</code>, Logical Device <code>1</code>) authenticated via High Level Security 5 (HLS 5 GMAC).</p>
<p dir="auto">After HLS 5 mutual authentication is established (<code>0x60</code> AARQ -&gt; <code>0x61</code> AARE -&gt; CtoS/StoC handshake accepted), our application reads instantaneous electrical registers (OBIS <code>1.0.32.7.0.255</code>, Voltage L1, Class 3) using plain <code>Get-Request-Normal</code> (<code>0xC0 0x01</code>), and the meter responds with valid voltage data.</p>
<p dir="auto">However, when we attempt to read Clock (Class 8, OBIS <code>0.0.1.0.0.255</code>, Attribute 2 <code>time</code>) or operate Disconnect Control (Class 70, OBIS <code>0.0.96.3.10.255</code>, Method 1 <code>remote_disconnect</code>) using plain APDUs, the meter persistently rejects the request with <strong><code>data-access-result: scope-of-access-violated</code> (<code>0xC4 0x01 C1 01 01</code>)</strong>!</p>
<p dir="auto">Here is the failing plain GET request for Class 8 Clock:</p>
<pre><code class="language-hex">00 01 00 01 00 01 00 0D C0 01 C1 00 08 00 00 01 00 00 FF 02 00
</code></pre>
<p dir="auto">And the meter response:</p>
<pre><code class="language-hex">00 01 00 01 00 01 00 05 C4 01 C1 01 01
</code></pre>
<p dir="auto">Why is an authenticated Management Client getting <code>scope-of-access-violated</code> on specific objects?</p>
]]></description><link>https://dlms.sharur.org/topic/59/why-does-mixed-mode-hls-5-association-fail-with-scope-of-access-violated-when-reading-class-70-or-class-8</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 19:25:58 GMT</lastBuildDate><atom:link href="https://dlms.sharur.org/topic/59.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Aug 2026 17:21:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:55 GMT]]></title><description><![CDATA[<p dir="auto">To synthesize for the community, here is the Python Gurux script demonstrating how to enforce encryption on sensitive objects:</p>
<pre><code class="language-python">from gurux_dlms.objects import GXDLMSClock, GXDLMSDisconnectControl
from gurux_dlms.enums import Security

def operate_secure_objects(client, reader):
    # Enforce Suite 1 Authentication + Encryption
    client.ciphering.security = Security.AUTHENTICATION_ENCRYPTION
    
    # 1. Read Protected Clock (Class 8)
    clock = GXDLMSClock("0.0.1.0.0.255")
    current_time = reader.read(clock, 2)
    print(f"[+] Current Protected Meter Time: {current_time}")
    
    # 2. Execute Protected Disconnect Control (Class 70)
    relay = GXDLMSDisconnectControl("0.0.96.3.10.255")
    reader.method(relay, 1, 0) # Method 1: remote_disconnect
    print("[+] Breaker successfully tripped via encrypted Action-Request.")
</code></pre>
<h3>Summary Checklist:</h3>
<ol>
<li><strong>Access Matrix</strong>: Verify Association LN <code>object_list</code> access modes (IEC 62056-62 Table 42).</li>
<li><strong>Encrypted Access</strong>: Wrap Class 8 / Class 70 in <code>0xDB</code> General-Glo-Ciphering.</li>
<li><strong>Security Policy</strong>: Default HES management associations to <code>Security.AUTHENTICATION_ENCRYPTION</code>.</li>
</ol>
]]></description><link>https://dlms.sharur.org/post/209</link><guid isPermaLink="true">https://dlms.sharur.org/post/209</guid><dc:creator><![CDATA[david_miller]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:55 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:54 GMT]]></title><description><![CDATA[<p dir="auto">Notice how this granular security model protects grid assets without imposing encryption overhead on high-frequency public meter reads.</p>
]]></description><link>https://dlms.sharur.org/post/208</link><guid isPermaLink="true">https://dlms.sharur.org/post/208</guid><dc:creator><![CDATA[sarah_jenkins]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:54 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:51 GMT]]></title><description><![CDATA[<p dir="auto">Here is the verified ciphered <code>Get-Response</code> for Class 8 Clock returned by the meter:</p>
<pre><code class="language-hex">00 01 00 01 00 01 00 25 DB 08 53 48 41 00 00 00 00 01 30 00 00 00 03 44 19 82 77 1B C0 90 AA BB CC DD EE FF 00 11 22 33 44 55 66 77 88
</code></pre>
<p dir="auto">Deciphering yields the 12-byte Date/Time octet string.</p>
]]></description><link>https://dlms.sharur.org/post/207</link><guid isPermaLink="true">https://dlms.sharur.org/post/207</guid><dc:creator><![CDATA[alex_turner]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:51 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:48 GMT]]></title><description><![CDATA[<p dir="auto">Best practice for HES design:<br />
When initializing a communication session, HES should read Attribute 2 of <code>0.0.40.0.0.255</code> once to cache the meter's object access matrix, or default all management operations to <code>Security.AUTHENTICATION_ENCRYPTION</code>.</p>
]]></description><link>https://dlms.sharur.org/post/206</link><guid isPermaLink="true">https://dlms.sharur.org/post/206</guid><dc:creator><![CDATA[marcus_vance]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:48 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:46 GMT]]></title><description><![CDATA[<p dir="auto">That explains everything! We updated our client configuration to automatically wrap Class 8 and Class 70 in <code>0xDB</code> ciphering, and both the clock read and the relay disconnect succeeded immediately!</p>
]]></description><link>https://dlms.sharur.org/post/205</link><guid isPermaLink="true">https://dlms.sharur.org/post/205</guid><dc:creator><![CDATA[carlos_mendez]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:46 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:44 GMT]]></title><description><![CDATA[<p dir="auto">From the firmware side, we configure Attribute 2 of Association LN specifically to prevent replay or sniffing of sensitive commands (such as relay disconnect or clock tampering).</p>
<p dir="auto">Even if a malicious party establishes a low-level association, they cannot tamper with Class 70 or Class 8 without possessing the Global Unicast Key (GUEK) and monotonically valid $IC$.</p>
]]></description><link>https://dlms.sharur.org/post/204</link><guid isPermaLink="true">https://dlms.sharur.org/post/204</guid><dc:creator><![CDATA[elena_rostova]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:42 GMT]]></title><description><![CDATA[<p dir="auto">This highlights a critical architectural rule in DLMS Green Book 10th Ed Section 9.2.5:<br />
<strong>HLS 5 authentication creates an authenticated association, but does not dictate the ciphering mode of subsequent business PDUs.</strong></p>
<p dir="auto">A client can operate in:</p>
<ol>
<li><strong>Pure Plain Mode</strong>: HLS 5 handshake, all subsequent APDUs plaintext <code>0xC0/0xC1/0xC3</code>;</li>
<li><strong>Pure Ciphered Mode</strong>: HLS 5 handshake, all subsequent APDUs encrypted <code>0xDB</code>;</li>
<li><strong>Mixed Mode</strong>: Low-sensitivity telemetry plain, high-sensitivity control actions encrypted.</li>
</ol>
]]></description><link>https://dlms.sharur.org/post/203</link><guid isPermaLink="true">https://dlms.sharur.org/post/203</guid><dc:creator><![CDATA[david_miller]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:42 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:40 GMT]]></title><description><![CDATA[<p dir="auto">Sarah's analysis is exact. Look at the framing difference:</p>
<p dir="auto">To access an object marked <code>authenticated_and_encrypted</code>, the request must be wrapped inside <code>General-Glo-Ciphering</code> (<code>0xDB</code>) with Security Control <code>0x30</code> (AES-GCM-128 authentication + encryption):</p>
<p dir="auto">Here is the correct ciphered request for Class 8 Clock:</p>
<pre><code class="language-hex">00 01 00 01 00 01 00 23 DB 08 53 48 41 00 00 00 00 01 30 00 00 00 02 88 1A 2B C0 44 99 EE 12 33 44 55 66 77 88 99 AA BB CC DD EE FF
</code></pre>
<p dir="auto">When transmitted with <code>0xDB</code> encryption, the meter's access controller validates that encryption security requirements are satisfied and returns the encrypted Clock value!</p>
]]></description><link>https://dlms.sharur.org/post/202</link><guid isPermaLink="true">https://dlms.sharur.org/post/202</guid><dc:creator><![CDATA[alex_turner]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:40 GMT</pubDate></item><item><title><![CDATA[Reply to Why does mixed-mode HLS 5 association fail with scope-of-access-violated when reading Class 70 or Class 8? on Sat, 22 Aug 2026 17:21:37 GMT]]></title><description><![CDATA[<p dir="auto">Carlos, this is because <strong>Association Authentication Level</strong> and <strong>Object Attribute Access Rights</strong> are two decoupled security layers in DLMS/COSEM.</p>
<p dir="auto">Per <strong>DLMS Blue Book Ed. 17 Section 4.5.3 (Association LN Class 15)</strong> and <strong>IEC 62056-62 Section 6.2.23</strong>:<br />
The <code>Association LN</code> object (OBIS <code>0.0.40.0.0.255</code>) contains Attribute 2 <code>object_list</code>, which defines an access descriptor table for every object accessible under that client SAP:</p>
<pre><code class="language-text">ObjectAccessDescriptor ::= Structure {
  class_id: Long-Unsigned,
  logical_name: Octet-String (6B),
  access_rights: Structure {
    attribute_access_modes: Array [
      { attribute_id: 2, access_mode: Enum }
    ],
    method_access_modes: Array [
      { method_id: 1, access_mode: Enum }
    ]
  }
}
</code></pre>
<h3>Access Mode Enumeration (IEC 62056-62 Table 42):</h3>
<ul>
<li><code>0</code> = <code>no_access</code></li>
<li><code>1</code> = <code>read_only</code> (Plaintext allowed)</li>
<li><code>2</code> = <code>write_only</code></li>
<li><code>3</code> = <code>read_and_write</code></li>
<li><code>4</code> = <strong><code>authenticated_read</code></strong></li>
<li><code>5</code> = <strong><code>authenticated_and_encrypted_read</code></strong></li>
</ul>
<p dir="auto">For energy registers (Class 3), the access mode is often set to <code>1</code> (<code>read_only</code>).<br />
For Clock (Class <img src="https://dlms.sharur.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60e.png?v=666d1e6b6e4" class="not-responsive emoji emoji-android emoji--sunglasses" style="height:23px;width:auto;vertical-align:middle" title="8)" alt="😎" /> and Disconnect Control (Class 70), the access mode is configured as <code>5</code> (<strong><code>authenticated_and_encrypted</code></strong>). When you transmit a plain <code>0xC0 0x01</code> APDU, the meter enforces rule 5 and rejects with <code>scope-of-access-violated</code>!</p>
]]></description><link>https://dlms.sharur.org/post/201</link><guid isPermaLink="true">https://dlms.sharur.org/post/201</guid><dc:creator><![CDATA[sarah_jenkins]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:21:37 GMT</pubDate></item></channel></rss>