Change CSP defaults from "MUST" to "SHOULD"#434
Change CSP defaults from "MUST" to "SHOULD"#434mstoiber-oai wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
In ChatGPT, we have security risk-accepted and shipped a slightly looser default CSP. We have a default domain allowlist that includes e.g. `cdn.tailwindcss.com`, `cdn.jsdelivr.net`, `*.oaiusercontent.com`,… that we add to the resourceDomains and connectDomains. We also set `frame-src 'none'` by default, unless frameDomains are specified. In order to stay compliant with the spec, we're proposing an update to the spec language around the default CSP from "MUST" to "SHOULD".
|
I'm not a fan of this. An MCP developer who builds and tests their app against one client that follows the spec should have their app work on every other client that follows the spec without having to test it individually. This is the case with the rest of the MCP protocol. With this change, if a developer targets client X which does not follow the spec's SHOULD recommendations, their app will not load at all on other clients that follow the spec more closely. |
|
Thanks @mstoiber-oai ! I agree with @connor4312 that this level of leniency might come back to bite us. I realize it's challenging, but is it realistic to go the other way around and ask existing apps to add the required domains to their CSP meta? |
ochafik
left a comment
There was a problem hiding this comment.
SGTM! cc/ @idosal @antonpk1 @connor4312 FYI
ochafik
left a comment
There was a problem hiding this comment.
actually sorry hadn't read objections from @idosal & @connor4312 let's discuss this one at the next meetup
Motivation and Context
In ChatGPT, we have security risk-accepted and shipped a slightly looser default CSP. We have a default domain allowlist that includes e.g.
cdn.tailwindcss.com,cdn.jsdelivr.net,*.oaiusercontent.com,… that we add to the resourceDomains and connectDomains. We also setframe-src 'none'anddefault-src 'self'by defaultIn order to stay compliant with the spec, we're proposing an update to the spec language around the default CSP from "MUST" to "SHOULD".
How Has This Been Tested?
ChatGPT shipped this default with the Apps SDK many months ago.
Breaking Changes
No.