What is the legal authority by which the NSA masquerades as a major internet service?I think that you're asking that question very clearly and simply. I also think it needs a clear and simple answer, but I doubt we'll see one. The USA's legal environment allows what we in the Real World call "hair splitting", and further, redefines everyday terms, and allows the use of the redefined term in a deceptive manner.
Not to justify the NSA in any way (I think the NSA should be abolished) but I imagine they do have some legal justification. They won't be forthcoming about it, and if you read it, you'd be amazed at the interpretation the NSA would have to do to allow itself to do MITM attacks. That's just a cynical guess on my part, not a defense of the action.