<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>svnscha - app-protection</title>
    <subtitle>automating annoying tasks, sharing tips, and embracing less frustration</subtitle>
    <link rel="self" type="application/atom+xml" href="https://svnscha.de/tags/app-protection/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://svnscha.de"/>
    <generator uri="https://astro.build/">Astro</generator>
    <updated>2025-07-01T00:00:00+00:00</updated>
    <id>https://svnscha.de/tags/app-protection/atom.xml</id>
    <entry xml:lang="en">
        <title>When Citrix App Protection Becomes App Obstruction</title>
        <published>2025-07-01T00:00:00+00:00</published>
        <updated>2025-07-01T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/citrix-app-protection-restricted-launch/"/>
        <id>https://svnscha.de/posts/citrix-app-protection-restricted-launch/</id>
        <summary type="html">A gentle reminder that sometimes our own security features work a little too well. Even against ourselves.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/citrix-app-protection-restricted-launch/">&lt;h2 id=&quot;when-your-own-product-keeps-you-honest&quot;&gt;When Your Own Product Keeps You Honest&lt;/h2&gt;
&lt;p&gt;You're trying to connect to your virtual desktop through Citrix Workspace, ready to access your work environment and get stuff done, when suddenly you're greeted with this delightfully cryptic message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;App protection component is restricting this launch. Contact your system administrator for further assistance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Ah yes, classic.&lt;/strong&gt; Especially when you ARE the system administrator and this error message tells you absolutely nothing useful. It's like getting a &quot;something went wrong&quot; alert - technically accurate, but not exactly actionable.&lt;/p&gt;
&lt;p&gt;In my case, Nextcloud running on the host caused the problem. Closing Nextcloud allowed Citrix to connect; starting it again blocked the connection. I work at Citrix on a different team, which made this an interesting problem to debug in my spare time.&lt;/p&gt;
&lt;h2 id=&quot;so-why&quot;&gt;So, why?&lt;/h2&gt;
&lt;p&gt;Here's what's happening: When you have Nextcloud running on your host machine, it uses &lt;code&gt;LD_PRELOAD&lt;/code&gt; as part of its Flatpak sandboxing mechanism. This is a perfectly legitimate system mechanism that allows applications to override or extend library functions at runtime.&lt;/p&gt;
&lt;p&gt;App Protection sees a process using &lt;code&gt;LD_PRELOAD&lt;/code&gt; on the host and treats it as suspicious, even though the process is unrelated to the virtual desktop connection.&lt;/p&gt;
&lt;p&gt;The solution? A gentle conversation with the allow list to explain that these specific &lt;code&gt;LD_PRELOAD&lt;/code&gt; patterns from Nextcloud are actually friends, not foes.&lt;/p&gt;
&lt;h2 id=&quot;the-essential-references&quot;&gt;The Essential References&lt;/h2&gt;
&lt;p&gt;Before we fix this, credit where credit is due. The Citrix documentation that actually helped:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.citrix.com/en-us/citrix-workspace-app/app-protection/troubleshoot/generic-troubleshooting-scenarios.html&quot;&gt;General Troubleshooting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.citrix.com/en-us/citrix-workspace-app/app-protection/configure/configure-allowlist-for-ld-preload&quot;&gt;LD_PRELOAD allow list&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-fix-configuring-the-ld_preload-allow-list&quot;&gt;The Fix: Configuring the LD_PRELOAD Allow List&lt;/h2&gt;
&lt;p&gt;First, open the App Protection allow list configuration file:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; nano&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; /opt/Citrix/ICAClient/config/AppProtection_Preload_Allowlist.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add the following entries to diplomatically inform App Protection that these specific &lt;code&gt;LD_PRELOAD&lt;/code&gt; patterns from Nextcloud are legitimate and shouldn't trigger its protective instincts:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;  &quot;LD_PRELOAD=/app/bin/../lib/libzypak-preload-host.so:/app/bin/../lib/libzypak-preload-host-spawn-strategy.so:/app/bin/../lib/libzypak-preload-host-spawn-strategy-close.so&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;Nextcloud&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;  &quot;LD_PRELOAD=/app/bin/../lib/libzypak-preload-child.so:/app/bin/../lib/libzypak-preload-child-spawn-strategy.so&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;/app/lib/com.nextcloud.talk/Nextcloud&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;  &quot;LD_PRELOAD=/app/bin/../lib/libzypak-preload-child.so:/app/bin/../lib/libzypak-preload-child-spawn-strategy.so&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;/app/lib/com.nextcloud.talk/Nextcloud&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;what-do-these-entries-mean&quot;&gt;What do these entries mean?&lt;/h3&gt;
&lt;p&gt;Each line maps a specific &lt;code&gt;LD_PRELOAD&lt;/code&gt; pattern to the application that uses it. The first entry handles Nextcloud's main process, while the second handles child processes. By adding these to the allow list, App Protection will graciously step aside and allow your virtual desktop connections to proceed without further interrogation.&lt;/p&gt;
&lt;h2 id=&quot;bonus-finding-your-own-ld_preload-patterns&quot;&gt;Bonus: Finding Your Own LD_PRELOAD Patterns&lt;/h2&gt;
&lt;p&gt;If you're dealing with other applications that get blocked, here's a handy script to identify which processes are using &lt;code&gt;LD_PRELOAD&lt;/code&gt; on your system (copied from the linked documentation):&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; pid&lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; /proc/*/&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;do&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    pid&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;=${&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;pid&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;%*/}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    pid&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;=${&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;pid&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;##*/}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    environ_file&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;/proc/&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$pid&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;/environ&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; [[ ! -f &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$environ_file&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; ]]; &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        continue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;    fi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    ld_preload_entry&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;=$(&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; '\0'&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; '\n'&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; &amp;lt; &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$environ_file&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; | &lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;grep&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt; -w&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; &quot;LD_PRELOAD&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; [[ -n &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$ld_preload_entry&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; ]]; &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;then&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;        cmdline_file&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;/proc/&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$pid&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;/cmdline&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;        cmdline&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;=$(&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; '\0'&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; ' '&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; &amp;lt; &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$cmdline_file&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; | &lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;awk&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; '{print $1}'&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;        echo&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#D7BA7D&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$ld_preload_entry&lt;/span&gt;&lt;span style=&quot;color:#D7BA7D&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;color:#D7BA7D&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;$cmdline&lt;/span&gt;&lt;span style=&quot;color:#D7BA7D&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;    fi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This script scans all running processes and outputs the exact format you need for the allow list configuration.&lt;/p&gt;
&lt;h2 id=&quot;apply-the-changes&quot;&gt;Apply the Changes&lt;/h2&gt;
&lt;p&gt;Once you've updated the configuration file, restart the App Protection service:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; restart&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; AppProtectionService-install.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Et voilà!&lt;/strong&gt; Harmony restored. Error banished, virtual desktop connection established, and you can finally keep Nextcloud running on your host machine while accessing your work environment without any diplomatic incidents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Document this fix somewhere you'll actually remember to look. Future you will thank present you when setting up a new machine or after a product update kindly resets your allow list. This post is basically my way of creating searchable breadcrumbs for anyone (including future me) who encounters that cryptic error message and wonders why Nextcloud seems to be the culprit.&lt;/p&gt;
</content>
    </entry>
</feed>
