@Kevin Elliott
Returning to the original question here:
In other words, how can the server verify that the request is valid and coming from the iPhone and not from some spoofer?
The quoted part of the original question, in isolation from the sentence that preceeds it, doesn't accuratly represent the actual focus of the question.
The first sentence of the question is:
"If an app has a text filtering extension and associated server that the iPhone OS communicates with, then how can that communication be authenticated?"
The word "that" in "how can that communication be authenticated" refers to the earlier part of the sentence "and associated server that the iPhone OS communicates with". i.e. it is referring to the communication between the OS and the server, not between the application and the server.
The question is in reference specifically to a message filtering extension. When the associated server for a MFE is contacted, it is not contacted directly by the MFE nor by the app, instead it is contacted by the iPhone OS.
The question therefore would be better off explicitly phrased as:
"How can the server verify that the request which is being sent by the OS on behalf of the app/Message FIlter Extension is valid and coming from the iPhone and not from some spoofer?
My apologies is this wasn't clear and the question has to be devided by careful study of the specific wording of the question.
I get the impression this thead is answering a different question - question about how the server can authenticate https trafic coming from the app, rather than from the OS.
If it hasn't then I'm still just not understanding at all how app attest fits into the picture in this specific case.
With app attest the server is validating requests from the app. In the case of a Message Filter Extension there are no requests coming from either the extension nor from the app to the server.