<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>LMS security notes</title>
  <link href="https://lms-security-notes.pages.dev/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="https://lms-security-notes.pages.dev/" rel="alternate" type="text/html"/>
  <id>https://lms-security-notes.pages.dev/</id>
  <updated>2026-11-18T00:00:00Z</updated>
  <subtitle>Practical notes on LMS security monitoring for Canvas, Moodle, and other learning platforms.</subtitle>
  <author><name>Luuk Verhoeven</name></author>
  <entry>
    <title>SCIM returned 204. The LMS still had the login.</title>
    <link href="https://lms-security-notes.pages.dev/scim-lifecycle/" rel="alternate" type="text/html"/>
    <id>https://lms-security-notes.pages.dev/scim-lifecycle/</id>
    <published>2026-11-18T00:00:00Z</published>
    <updated>2026-11-18T00:00:00Z</updated>
    <author><name>Luuk Verhoeven</name></author>
    <summary>Follow one test identity through create, suspend, reactivate, and delete. Reconcile SCIM, the LMS user record, and a fresh login.</summary>
    <content type="html">&lt;p&gt;A provisioning job can finish with HTTP 204 and a green dashboard while the learner still opens the course. SCIM deleted a User resource. The LMS still has a login, an enrolment, or a mapping to an external id. Those are different stores.&lt;/p&gt;
&lt;p&gt;Treat the lifecycle as a state machine. Follow one dedicated test identity through create, suspend, reactivate, and delete. After each step, read three places: the identity store, the LMS user record, and a fresh authorized login.&lt;/p&gt;
&lt;h2 id=&quot;what-scim-actually-deletes&quot;&gt;What SCIM actually deletes&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7644.html&quot;&gt;RFC 7644&lt;/a&gt; (SCIM Protocol, IETF Standards Track, September 2015) gives User resources GET, POST, PUT, PATCH, and DELETE on &lt;code&gt;/Users&lt;/code&gt;. PATCH is a partial update. DELETE is resource removal.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7644.html#section-3.6&quot;&gt;Section 3.6&lt;/a&gt; is the important one. A successful DELETE returns 204 No Content. After that, later operations on that resource must return 404, and the resource must drop out of query results. The same section lets the service provider keep the record internally. 204 means the SCIM endpoint will treat the User as gone. It is silent about the LMS user table, enrolments, grades, files, and sessions.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7643.html#section-4.1&quot;&gt;RFC 7643&lt;/a&gt; (Core Schema) defines &lt;code&gt;active&lt;/code&gt; as a boolean for the user&amp;#x27;s administrative status. The service provider decides what that means. The typical example in the RFC is true for able to log in, false for suspended. That is a login flag, not a delete.&lt;/p&gt;
&lt;p&gt;Run this on a test LMS you own. Use a synthetic identity.&lt;/p&gt;
&lt;h2 id=&quot;canvas-three-user-statuses-three-outcomes&quot;&gt;Canvas: three user statuses, three outcomes&lt;/h2&gt;
&lt;p&gt;Canvas SIS CSV (&lt;code&gt;users.csv&lt;/code&gt;) requires &lt;code&gt;status&lt;/code&gt;. The enum is &lt;code&gt;active&lt;/code&gt;, &lt;code&gt;suspended&lt;/code&gt;, &lt;code&gt;deleted&lt;/code&gt;. The field is sticky. &lt;a href=&quot;https://developerdocs.instructure.com/services/canvas/sis/file.sis_csv.md&quot;&gt;Instructure&amp;#x27;s SIS format documentation&lt;/a&gt; states:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When a user is &amp;#x27;deleted&amp;#x27; it will delete the login tied to the sis_id. If the login is the last one, all of the users enrollments will also be deleted and they won&amp;#x27;t be able to log in to the school&amp;#x27;s account. If you still want the student to be able to log in but just not participate, leave the student &amp;#x27;active&amp;#x27; but set the enrollments to &amp;#x27;completed&amp;#x27;. If you want to leave a student&amp;#x27;s enrollments intact, but not allow them to login, use the &amp;#x27;suspended&amp;#x27; status.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;A SCIM DELETE that the connector maps to SIS &lt;code&gt;deleted&lt;/code&gt; removes the login and, when it is the last login, the enrolments. A mapping that sets &lt;code&gt;suspended&lt;/code&gt; leaves enrolments in place and blocks login. Completing enrolments while leaving the user &lt;code&gt;active&lt;/code&gt; still lets them sign in.&lt;/p&gt;
&lt;p&gt;Diffing mode adds a fourth outcome. If the SIS feed sends the whole set each time, Canvas compares it to the last successful import with the same &lt;code&gt;diffing_data_set_identifier&lt;/code&gt;. A user omitted from the new file is marked deleted by default. &lt;code&gt;diffing_user_remove_status=suspended&lt;/code&gt; suspends omitted users instead. &lt;code&gt;skip_deletes=true&lt;/code&gt; leaves removed objects alone for every object type in that import.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;DELETE /api/v1/accounts/:account_id/users/:user_id&lt;/code&gt; is a different verb again. Canvas documents it as deleting a user record from a Canvas root account. In a multi-tenant instance it leaves other root accounts untouched.&lt;/p&gt;
&lt;p&gt;Record which of those four paths your connector actually takes. The SCIM 204 does not pick one for you.&lt;/p&gt;
&lt;h2 id=&quot;moodle-the-ldap-sync-is-the-lifecycle&quot;&gt;Moodle™: the LDAP sync is the lifecycle&lt;/h2&gt;
&lt;p&gt;Moodle™ core has no native SCIM &lt;code&gt;/Users&lt;/code&gt; endpoint. The mass-sync path most sites run is LDAP (or another external auth plugin). Site administration → Plugins → Authentication → LDAP server has &lt;strong&gt;Removed ext user&lt;/strong&gt;: what to do with the internal account when the user disappears from the external source.&lt;/p&gt;
&lt;p&gt;The three core options are Keep internal, Suspend internal, and Full delete. &lt;a href=&quot;https://docs.moodle.org/en/LDAP_authentication&quot;&gt;MoodleDocs&lt;/a&gt; states that only suspended users are automatically revived if they reappear in the external source. The scheduled task is &lt;code&gt;\auth_ldap\task\sync_task&lt;/code&gt;. It creates and updates user information, and it suspends or deletes LDAP accounts. MoodleDocs warns to confirm LDAP settings before enabling it, because a bad filter can delete the wrong people.&lt;/p&gt;
&lt;p&gt;Keep internal leaves a login that still works after the directory entry is gone. Suspend internal blocks login and can revive on reappearance. Full delete removes the Moodle™ account. Those three outcomes sit next to SCIM&amp;#x27;s &lt;code&gt;active=false&lt;/code&gt; and DELETE as separate verbs.&lt;/p&gt;
&lt;p&gt;A SCIM connector in front of Moodle™ is a plugin or a middle layer. Read that connector&amp;#x27;s mapping table.&lt;/p&gt;
&lt;h2 id=&quot;the-fixture&quot;&gt;The fixture&lt;/h2&gt;
&lt;p&gt;Create one identity that exists only for this check. Example username &lt;code&gt;prov-canary-001&lt;/code&gt;. Give it a unique SIS id / SCIM &lt;code&gt;externalId&lt;/code&gt; / Moodle™ &lt;code&gt;idnumber&lt;/code&gt; you will never reuse for a person. Enrol it on a throwaway course on the test LMS. Put a marker string in that course so a successful login is visible in the page body.&lt;/p&gt;
&lt;p&gt;Walk four states. Wait for the documented job interval after each write before you read.&lt;/p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Identity-store action&lt;/th&gt;&lt;th&gt;Expected SCIM read&lt;/th&gt;&lt;th&gt;Expected LMS login&lt;/th&gt;&lt;th&gt;Expected enrolment&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1 Create&lt;/td&gt;&lt;td&gt;POST &lt;code&gt;/Users&lt;/code&gt; or SIS &lt;code&gt;status=active&lt;/code&gt;&lt;/td&gt;&lt;td&gt;200, &lt;code&gt;active&lt;/code&gt; true&lt;/td&gt;&lt;td&gt;fresh login succeeds&lt;/td&gt;&lt;td&gt;student enrolment present&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2 Suspend&lt;/td&gt;&lt;td&gt;PATCH &lt;code&gt;active&lt;/code&gt; false, or SIS &lt;code&gt;suspended&lt;/code&gt;&lt;/td&gt;&lt;td&gt;200, &lt;code&gt;active&lt;/code&gt; false&lt;/td&gt;&lt;td&gt;fresh login fails&lt;/td&gt;&lt;td&gt;enrolments still there (Canvas suspended)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3 Reactivate&lt;/td&gt;&lt;td&gt;PATCH &lt;code&gt;active&lt;/code&gt; true, or SIS &lt;code&gt;active&lt;/code&gt;&lt;/td&gt;&lt;td&gt;200, &lt;code&gt;active&lt;/code&gt; true&lt;/td&gt;&lt;td&gt;fresh login succeeds&lt;/td&gt;&lt;td&gt;same enrolment&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4 Delete&lt;/td&gt;&lt;td&gt;DELETE &lt;code&gt;/Users/{id}&lt;/code&gt; or SIS &lt;code&gt;deleted&lt;/code&gt;&lt;/td&gt;&lt;td&gt;404&lt;/td&gt;&lt;td&gt;fresh login fails&lt;/td&gt;&lt;td&gt;Canvas last-login delete also drops enrolments&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;On Moodle™ LDAP, substitute the &lt;strong&gt;Removed ext user&lt;/strong&gt; setting you actually run. Suspend internal should fail login and revive on step 3 if the directory entry returns. Full delete should fail login and leave no row with &lt;code&gt;deleted=0&lt;/code&gt;. Keep internal should still log in after the directory entry is gone; that is the mismatch this monitor exists to catch.&lt;/p&gt;
&lt;p&gt;Use a fresh browser profile or a new API token for the login check. An existing session can outlive a disable. Leftover IdP sessions are a different check.&lt;/p&gt;
&lt;h2 id=&quot;what-to-read-after-each-step&quot;&gt;What to read after each step&lt;/h2&gt;
&lt;p&gt;SCIM (replace host, token, and id):&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;curl -sS -D - -o /tmp/scim-user.json \
  -H &amp;quot;Authorization: Bearer $TOKEN&amp;quot; \
  -H &amp;quot;Accept: application/scim+json&amp;quot; \
  &amp;quot;$SCIM/Users/$ID&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Expect 200 with &lt;code&gt;&amp;quot;active&amp;quot;: true&lt;/code&gt; or &lt;code&gt;&amp;quot;active&amp;quot;: false&lt;/code&gt; on create/suspend/reactivate. Expect 404 after delete.&lt;/p&gt;
&lt;p&gt;Canvas user + enrolments:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;AUTH=&amp;quot;Authorization: Bearer $CANVAS_TOKEN&amp;quot;

curl -sS -D - -o /tmp/canvas-user.json \
  -H &amp;quot;$AUTH&amp;quot; \
  &amp;quot;$CANVAS/api/v1/users/sis_user_id:$SISID&amp;quot;

curl -sS -D - -o /tmp/canvas-enroll.json \
  -H &amp;quot;$AUTH&amp;quot; \
  &amp;quot;$CANVAS/api/v1/users/sis_user_id:$SISID/enrollments&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Moodle™: query &lt;code&gt;mdl_user&lt;/code&gt; for &lt;code&gt;username&lt;/code&gt;, &lt;code&gt;suspended&lt;/code&gt;, &lt;code&gt;deleted&lt;/code&gt;, &lt;code&gt;auth&lt;/code&gt;, and &lt;code&gt;timemodified&lt;/code&gt;. Then log in as the canary and search the course HTML for the marker.&lt;/p&gt;
&lt;p&gt;Write one row per run:&lt;/p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;After create&lt;/th&gt;&lt;th&gt;After suspend&lt;/th&gt;&lt;th&gt;After reactivate&lt;/th&gt;&lt;th&gt;After delete&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Time of write&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Time of read&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SCIM HTTP status / &lt;code&gt;active&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LMS &lt;code&gt;suspended&lt;/code&gt; / &lt;code&gt;deleted&lt;/code&gt; / SIS status&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fresh login&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Enrolment present&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Delay (read − write)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;when-to-alert&quot;&gt;When to alert&lt;/h2&gt;
&lt;p&gt;Define an acceptable propagation delay from the connector&amp;#x27;s own docs or from a week of measured runs. Alert when the delay is exceeded and:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;SCIM is 404 or &lt;code&gt;active&lt;/code&gt; is false, and a fresh login still reaches the marker.&lt;/li&gt;&lt;li&gt;SCIM is 200 with &lt;code&gt;active&lt;/code&gt; true, and the LMS user is suspended or deleted.&lt;/li&gt;&lt;li&gt;Canvas SIS &lt;code&gt;deleted&lt;/code&gt; ran, the login is gone, and an enrolment for that &lt;code&gt;sis_id&lt;/code&gt; is still &lt;code&gt;active&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Moodle™ &lt;strong&gt;Removed ext user&lt;/strong&gt; is Suspend internal, the directory entry is back, and the account stayed on &lt;code&gt;nologin&lt;/code&gt; past the next &lt;code&gt;\auth_ldap\task\sync_task&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;The SCIM &lt;code&gt;externalId&lt;/code&gt; / SIS id now points at a different LMS user id than last week.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Stale external-id mappings show up on step 1 of the next cycle: POST creates a second LMS user, or PUT updates the wrong one.&lt;/p&gt;
&lt;p&gt;Retries belong in the delay budget. A 409 on recreate after DELETE is a conflict in the LMS even when SCIM §3.6 says the provider should ignore the deleted resource in conflict calculation.&lt;/p&gt;
&lt;h2 id=&quot;what-this-monitor-is&quot;&gt;What this monitor is&lt;/h2&gt;
&lt;p&gt;This is provisioning correctness. It answers one question: after the identity store moved this test user to a new state, does the LMS user, the enrolment, and a fresh login match that state, within the delay you accepted.&lt;/p&gt;
&lt;p&gt;It is a different check from an open SSO session after logout, from a canary course authorization fixture, and from a weekly tool inventory.&lt;/p&gt;
&lt;p&gt;Disclosure: I work on &lt;a href=&quot;https://guardlms.com&quot;&gt;GuardLMS&lt;/a&gt;, a product of Ldesign Media. The status enums, HTTP codes, and admin paths above are from RFC 7643, RFC 7644, Instructure&amp;#x27;s SIS CSV documentation, the Canvas Accounts API, and MoodleDocs LDAP authentication.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The retired LMS hostname is still a trusted ACS</title>
    <link href="https://lms-security-notes.pages.dev/leftover-acs/" rel="alternate" type="text/html"/>
    <id>https://lms-security-notes.pages.dev/leftover-acs/</id>
    <published>2026-11-18T00:00:00Z</published>
    <updated>2026-11-18T00:00:00Z</updated>
    <author><name>Luuk Verhoeven</name></author>
    <summary>Exact-match the IdP ACS and Entity ID set against the LMS destinations you still operate after a hostname cutover.</summary>
    <content type="html">&lt;p&gt;The new LMS hostname answers. Students sign in. The IdP still has last year&amp;#x27;s ACS URL in the SAML application. On the next IdP-initiated login, or on a bookmark that still posts to the old name, the assertion goes where the IdP is configured to send it.&lt;/p&gt;
&lt;p&gt;A DNS A record and a valid certificate on the old name tell you the name still answers. The SAML recipient is the ACS URL the IdP will POST to.&lt;/p&gt;
&lt;p&gt;Build an exact-match inventory of ACS and Entity ID values the IdP trusts, against the production destinations you still own.&lt;/p&gt;
&lt;h2 id=&quot;what-the-lms-publishes-as-acs&quot;&gt;What the LMS publishes as ACS&lt;/h2&gt;
&lt;p&gt;On Moodle™ with Catalyst &lt;code&gt;auth_saml2&lt;/code&gt;, the Okta mapping table in the &lt;a href=&quot;https://github.com/catalyst/moodle-auth_saml2/blob/MOODLE_500_STABLE/README.md&quot;&gt;plugin README&lt;/a&gt; (MOODLE_500_STABLE) is:&lt;/p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Okta name&lt;/th&gt;&lt;th&gt;Sane name&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Single sign on URL&lt;/td&gt;&lt;td&gt;ACS URL&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://example.com/auth/saml2/sp/saml2-acs.php/example.com&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Audience URI&lt;/td&gt;&lt;td&gt;Entity ID&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://example.com/auth/saml2/sp/metadata.php&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Single Logout URL&lt;/td&gt;&lt;td&gt;Single Logout URL&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://example.com/auth/saml2/sp/saml2-logout.php/example.com&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;code&gt;example.com&lt;/code&gt; here is &lt;code&gt;$CFG-&amp;gt;wwwroot&lt;/code&gt; without the scheme. The ACS path includes that host a second time after &lt;code&gt;saml2-acs.php/&lt;/code&gt;. Change wwwroot and the ACS string changes. The README&amp;#x27;s Bitnami gotcha is the same fact: &lt;code&gt;$CFG-&amp;gt;wwwroot&lt;/code&gt; must be a static value in &lt;code&gt;config.php&lt;/code&gt;. Certificates live in &lt;code&gt;$CFG-&amp;gt;dataroot/saml2&lt;/code&gt;. The stand-alone test page is &lt;code&gt;/auth/saml2/test.php&lt;/code&gt;; it echoes SAML attributes without rendering a Moodle™ page.&lt;/p&gt;
&lt;p&gt;On Canvas, &lt;a href=&quot;https://community.canvaslms.com/t5/Canvas-LMS-Blog/Configuring-Okta-SAML-and-Canvas-Authentication/ba-p/274645&quot;&gt;Instructure&amp;#x27;s Okta walkthrough&lt;/a&gt; sets:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Single sign-on URL (ACS): &lt;code&gt;https://YOURDOMAIN.instructure.com/login/saml&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Audience URI (SP Entity ID): &lt;code&gt;http://YOURDOMAIN.instructure.com/saml2&lt;/code&gt; — HTTP, not HTTPS&lt;/li&gt;&lt;li&gt;Extra requestable SSO URLs: &lt;code&gt;https://YOURDOMAIN.beta.instructure.com/login/saml&lt;/code&gt; (index 2), &lt;code&gt;https://YOURDOMAIN.test.instructure.com/login/saml&lt;/code&gt; (index 3), and for a vanity host &lt;code&gt;https://YOURVANITYURL/login/saml&lt;/code&gt; (index 4)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Canvas metadata is at &lt;code&gt;https://YOURDOMAIN.instructure.com/saml2&lt;/code&gt;. The &lt;a href=&quot;https://canvas.instructure.com/doc/api/authentication_providers.html&quot;&gt;Authentication Providers API&lt;/a&gt; documents &lt;code&gt;saml_entity_id&lt;/code&gt; as defaulting to &lt;code&gt;&amp;lt;host&amp;gt;/saml2&lt;/code&gt; when unset.&lt;/p&gt;
&lt;p&gt;Those strings are the intended production set. Anything else in the IdP is a delta.&lt;/p&gt;
&lt;h2 id=&quot;why-leftover-acs-urls-survive-a-migration&quot;&gt;Why leftover ACS URLs survive a migration&lt;/h2&gt;
&lt;p&gt;A hostname cutover updates the LMS &lt;code&gt;wwwroot&lt;/code&gt; or the Canvas vanity domain. The IdP application is a second object. Admins add the new ACS so the new site works, and leave the old one because a rollback might need it, because Okta already had &amp;quot;Allow this app to request other SSO URLs&amp;quot; checked, or because a beta/test/vanity URL was added once and never retired.&lt;/p&gt;
&lt;p&gt;The old name can still have DNS and TLS. That is enough for a browser to complete a POST. It is not evidence that the host is the current SP, that it still has the matching certificate in &lt;code&gt;$CFG-&amp;gt;dataroot/saml2&lt;/code&gt;, or that Destination in the AuthnRequest matches wwwroot. Catalyst documents Destination mismatches (including port) as login failures. A leftover ACS that still accepts the assertion is the other side of that: the IdP is willing to POST there.&lt;/p&gt;
&lt;p&gt;An extra trusted ACS is leftover trust. Classify it. Owner, environment (prod / beta / test / vanity / unknown), and the date you expect it to leave the IdP.&lt;/p&gt;
&lt;h2 id=&quot;the-inventory&quot;&gt;The inventory&lt;/h2&gt;
&lt;p&gt;Export the SAML application&amp;#x27;s ACS list from the IdP you administer. Okta: the SAML settings for that app, including Other Requestable SSO URLs. Entra: Basic SAML Configuration Identifier and Reply URL. The LMS side is the SP metadata you already publish.&lt;/p&gt;
&lt;p&gt;On a Moodle™ you own:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;# SP metadata (Entity ID + ACS live in this document)
curl -sS -D - -o /tmp/sp-metadata.xml \
  &amp;quot;$WWWROOT/auth/saml2/sp/metadata.php&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;ACS will be &lt;code&gt;$WWWROOT/auth/saml2/sp/saml2-acs.php/&amp;lt;host&amp;gt;&lt;/code&gt;. Confirm wwwroot is the host you think it is.&lt;/p&gt;
&lt;p&gt;On Canvas you administer:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;AUTH=&amp;quot;Authorization: Bearer $CANVAS_TOKEN&amp;quot;

curl -sS -D - -o /tmp/auth-providers.json \
  -H &amp;quot;$AUTH&amp;quot; \
  &amp;quot;$CANVAS/api/v1/accounts/self/authentication_providers&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Read &lt;code&gt;saml_entity_id&lt;/code&gt;, &lt;code&gt;log_in_url&lt;/code&gt;, &lt;code&gt;log_out_url&lt;/code&gt;. Fetch &lt;code&gt;https://YOURDOMAIN.instructure.com/saml2&lt;/code&gt; for the AssertionConsumerService locations in the XML.&lt;/p&gt;
&lt;p&gt;Build a table. Exact string match. Scheme, host, port, and path all count. Canvas Entity ID is &lt;code&gt;http://&lt;/code&gt;, ACS is &lt;code&gt;https://&lt;/code&gt;.&lt;/p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;ACS or Entity ID string&lt;/th&gt;&lt;th&gt;Source&lt;/th&gt;&lt;th&gt;Environment&lt;/th&gt;&lt;th&gt;Owner&lt;/th&gt;&lt;th&gt;In approved set&lt;/th&gt;&lt;th&gt;Retirement date&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;IdP app&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;LMS metadata&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Approved set is the current production ACS plus the beta/test/vanity URLs you still operate. Everything else is a delta.&lt;/p&gt;
&lt;h2 id=&quot;how-to-classify-a-delta&quot;&gt;How to classify a delta&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Current production.&lt;/strong&gt; Keep. This is the row the monitor is anchored on.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Documented non-prod.&lt;/strong&gt; Canvas beta and test, a Moodle™ staging wwwroot you still own. Keep with an owner and a review date.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Retired hostname you still own.&lt;/strong&gt; Remove from the IdP after the LMS on that name is decommissioned, or keep it only with a dated rollback window.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Unknown host.&lt;/strong&gt; Do not POST a test assertion to it. Do not collect learner assertions. Look up ownership in your own DNS and certificate inventory. If it is not yours, treat it as an incident for the IdP admin: an ACS the application will use, on a host you do not operate.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A successful &lt;code&gt;curl -I&lt;/code&gt; on the old hostname is a liveness check for DNS and TLS. Put that in a different column from &amp;quot;this string is in the IdP ACS list&amp;quot;. The monitor fires on the string delta, then you use liveness to decide how urgent the leftover is.&lt;/p&gt;
&lt;p&gt;On a Moodle™ test instance you own, &lt;code&gt;/auth/saml2/test.php&lt;/code&gt; is the right place to confirm the current ACS still consumes an assertion. Use it on the current wwwroot. Skip retired hosts you do not own.&lt;/p&gt;
&lt;h2 id=&quot;wildcards-and-default-reply-urls&quot;&gt;Wildcards and default reply URLs&lt;/h2&gt;
&lt;p&gt;Read the IdP&amp;#x27;s actual wildcard and default-reply behaviour before you write a regex. Some IdPs treat a default RelayState or a default reply URL as a destination when the request omits one. An exact-match list still works: include that default in the approved set, or the first unsolicited IdP-initiated login will look like a delta.&lt;/p&gt;
&lt;p&gt;Port and trailing slash are part of the string. &lt;code&gt;https://lms.example.org/auth/saml2/sp/saml2-acs.php/lms.example.org&lt;/code&gt; and the same URL on &lt;code&gt;:443&lt;/code&gt; explicitly are different ACS values if the IdP stored both.&lt;/p&gt;
&lt;h2 id=&quot;what-this-monitor-is&quot;&gt;What this monitor is&lt;/h2&gt;
&lt;p&gt;This is IdP trust after a hostname change. It answers one question: is every ACS and Entity ID string this SAML application will send an assertion to, in the approved set for hosts you still operate.&lt;/p&gt;
&lt;p&gt;It is a different check from leftover authenticated sessions after IdP logout, from login 302 header loss, and from a log heartbeat.&lt;/p&gt;
&lt;p&gt;Disclosure: I work on &lt;a href=&quot;https://guardlms.com&quot;&gt;GuardLMS&lt;/a&gt;, a product of Ldesign Media. The ACS paths, Entity IDs, and extra SSO URL indexes above are from the Catalyst &lt;code&gt;auth_saml2&lt;/code&gt; README (MOODLE_500_STABLE), Instructure&amp;#x27;s Okta configuration walkthrough, and the Canvas Authentication Providers API.&lt;/p&gt;</content>
  </entry>
</feed>
