These are excerpts from the USSF's Advice to Referees on the Laws of the Game pertaining to Keeper protection. Palo Alto editorial emphasis in red.
12.16 GOALKEEPER POSSESSION OF THE BALL
The goalkeeper is considered to be in possession of the ball when the ball is held with both hands, held by trapping the ball between one hand and any surface (e.g., the ground, a goalpost, the goalkeeper’s body), or holding the ball in the outstretched open palm. Once established, possession is maintained when the ball is held as described above, while bouncing the ball on the ground or throwing it into the air. Possession is given up if, after throwing the ball into the air, it is allowed to hit the ground. For purposes of determining goalkeeper possession, the “handling” includes contact with any part of the goalkeeper’s arm from the fingertips to the shoulder.
While the ball is in the possession of the goalkeeper, it may not be challenged for or played by an opponent in any manner. An opponent who attempts to challenge for a ball in the possession of the goalkeeper may be considered to have committed a direct free kick foul. However, a ball controlled by the goalkeeper using means other than the hands is open to legal challenge by an opponent. The referee should consider the age and skill level of the players in evaluating goalkeeper possession and err on the side of safety.
12.23 CHARGING THE GOALKEEPER
Referees must carefully observe any charge against the goalkeeper and call as an infringement of Law 12 only those charges which are performed carelessly, recklessly, or with excessive force (direct free kick), are performed in a dangerous manner (indirect free kick), or prevent the goalkeeper from releasing the ball from the hands (indirect free kick).
Charging the ‘keeper who is in possession of the ball must be considered an offense because, by definition, the charge cannot be for the purpose of challenging for control of the ball (see Advice 12.16). A goalkeeper can be otherwise legally charged if the ball is not in the goalkeeper’s possession (see Advice 12.16) but is being played by the goalkeeper in some other manner (e. g., dribbled at the feet, headed, etc.).