You'll find the text here:
http://www.state.gov/t/isn/c27726.htm
"(2) to enforce conditions on vessels entering or leaving their ports, internal waters or territorial seas that are reasonably suspected of carrying such cargoes, such as requiring that such vessels be subject to boarding, search, and seizure of such cargoes prior to entry."
The phrase "prior to entry" is the important one in this case - they do not have to wait until the vessel enters their territory to conduct a search. All that is needed is a reasonable assumption that the vessel is intending to enter. Nobody disputes that this vessel was intending to enter waters controlled by Israel.
Other sections of the PSI that may be relevant are as follows:
"1. Undertake effective measures, either alone or in concert with other states, for interdicting the transfer or transport of WMD, their delivery systems, and related materials to and from states and non-state actors of proliferation concern. "
Palestine/Hamas would be considered a "non-state actor of proliferation concern."
"c. To seriously consider providing consent under the appropriate circumstances to the boarding and searching of its own flag vessels by other states, and to the seizure of such WMD-related cargoes in such vessels that may be identified by such states."
We know that at least one of the ships was registered in Cambodia. We dont know and will probably never find out if Cambodia gave its consent to Israel to intercept the ships - this information will always be kept confidential.
Also, there is an over riding principal that a ship who is not displaying a flag or displaying mutliple or incorrect flags is fair game for anyone, even in International waters. I understand that the ship that was boarded was displaying Palestinian flags, but wasnt registered in Palestine.
Whether you agree or disagree with the PSI is immaterial - its the Law.