11---
2- status : in-progress
2+ status : done
33depends : [saml-idp]
44specs :
55 - specs/api/saml.md
66 - specs/architecture.md
77issues : []
8+ pr : 161
89---
910
1011# Plan: SAML IdP identity and endpoint hosts
@@ -75,18 +76,18 @@ any change to NameID or the attribute set.
7576
7677## Validation
7778
78- - [ ] ` GET /api/saml/slack/metadata ` ` entityID ` is
79+ - [x ] ` GET /api/saml/slack/metadata ` ` entityID ` is
7980 ` https://codeforphilly.org/api/saml/slack/metadata ` with no
8081 ` SAML_ENTITY_ID ` set, regardless of ` SLACK_TEAM_HOST ` / ` CFP_SITE_HOST ` .
81- - [ ] Both ` SingleSignOnService/@Location ` values are
82+ - [x ] Both ` SingleSignOnService/@Location ` values are
8283 ` https://<CFP_SITE_HOST>/api/saml/slack/sso ` ; with
8384 ` CFP_SITE_HOST=next.example.org ` they use that host.
84- - [ ] ` <saml:Issuer> ` on the Response and the Assertion equal the metadata
85+ - [x ] ` <saml:Issuer> ` on the Response and the Assertion equal the metadata
8586 ` entityID ` , including when ` SAML_ENTITY_ID ` is overridden.
86- - [ ] ACS URL, form action, ` NameQualifier ` , and ` /launch ` redirect still use
87+ - [x ] ACS URL, form action, ` NameQualifier ` , and ` /launch ` redirect still use
8788 ` SLACK_TEAM_HOST ` (existing tests keep passing).
88- - [ ] ` SLACK_TEAM_HOST ` no longer appears in any IdP-side URL (grep the route).
89- - [ ] ` npm run type-check && npm run lint && npm test ` clean.
89+ - [x ] ` SLACK_TEAM_HOST ` no longer appears in any IdP-side URL (grep the route).
90+ - [x ] ` npm run type-check && npm run lint && npm test ` clean.
9091
9192## Risks / unknowns
9293
@@ -103,8 +104,30 @@ any change to NameID or the attribute set.
103104
104105## Notes
105106
106- (Populated at closeout.)
107+ - ** ` config.ts ` needed no logic change.** ` SamlIdpSettings.entityId ` already
108+ fed both samlify's ` IdentityProvider({ entityID }) ` (→ metadata) and
109+ ` SlackSamlEntities.entityId ` , which the route passes as ` issuerEntityId `
110+ into ` buildResponseSubstitutions ` (→ ` {Issuer} ` on Response + Assertion).
111+ The bug was entirely in ` getSamlContext ` 's choice of host. Only doc
112+ comments changed there.
113+ - ** Entity ID is a URI by convention, not a fetchable URL.** Nothing (Slack
114+ included) dereferences it, which is why it can stay on ` codeforphilly.org `
115+ while the deployment answers on ` next.codeforphilly.org ` . ` SAML_ENTITY_ID `
116+ is validated as a URL (` z.url() ` ) only to catch typos.
117+ - ** ` SLACK_TEAM_HOST ` was never in the deploy env table** — it rode on its
118+ default. Added a row so operators see it next to ` SAML_ENTITY_ID ` and
119+ don't confuse the two hosts again.
120+ - ** Web-suite timeout flake.** ` apps/web/tests/ProjectEdit.test.tsx ` hit its
121+ 5s limit (5252ms) once under full-suite load and passed in isolation.
122+ Unrelated to this change; noted in case it recurs.
107123
108124## Follow-ups
109125
110- (Populated at closeout.)
126+ - Tracked as: operator action before deploying to ` next.codeforphilly.org ` —
127+ if Slack's SAML config was seeded from the old metadata it holds the wrong
128+ issuer (` https://codeforphilly.slack.com/... ` ) and will reject assertions
129+ until re-synced from the metadata URL. Same metadata refresh (endpoint
130+ URLs only) is needed again at cutover when ` CFP_SITE_HOST ` flips; see
131+ ` docs/operations/cutover.md ` owners.
132+ - Tracked as: boot-time ` slackSamlNameId ` invariant scan — carried forward
133+ unchanged from [ ` saml-idp ` ] ( saml-idp.md ) ; not touched here.
0 commit comments