They had as much moral grounds as the colonies did in breaking away from England. And attacking Fort Sumter was a necessity, as Charleston's harbor would have been useless with the Federals holding the entrance like that. And the first shots of the war weren't there anyway, but an attack against a Federal ship trying to reinforce the fort in January 1861. When a Union fleet was sent to resupply the fort in April the Confederates had no strategic alternative. They had to have access to the harbor or starve.