it is located within the kingdom of Spain or the former Kingdom of Asturias in the Middle Ages . The Principality of Asturias is an autonomous community within the kingdom of Spain , former Kingdom of Asturias in the Middle Ages .