Field theoretic description of electromagnetic boundaries