How does Sola Scriptura understanding of the Bible affect the anagogical sense of the Bible? A few times on this site, I've mentioned Jesus' commands that we should take Mary into our home when he tells John to 'behold his mother'.  This is based on the idea that much of scripture can also be interpreted for its 'eternal significance', not to say that John didn't know exactly what he was writing, but that the Spirit was moving him to write something that would be applicable to us today.

The senses of Scripture
According to an ancient tradition, one can distinguish between two senses of Scripture: the literal and the spiritual, the latter being subdivided into the allegorical, moral and anagogical senses. The profound concordance of the four senses guarantees all its richness to the living reading of Scripture in the Church.
... The anagogical sense (Greek: anagoge, &quot;leading&quot;). We can view realities and events in terms of their eternal significance, leading us toward our true homeland: thus the Church on earth is a sign of the heavenly Jerusalem.

CCC 115,117.3
I don't want to make any incendiary comments because I don't want this question picked apart as much I desire a historical analysis of Protestants either denying or affirming an anagogical understanding of Sacred Scripture. But, it seems to me as if Sola Scriptura presents only the literal and allegorical senses, but doesn't really lead anywhere.
Therefore it seems Sola Scriptura is opposed to the anagogical sense, because it is more of an understanding based on the application of the scriptures. This is what makes the rapture and Young Earth Creationism the only rational application of the scriptures to some who rely on literalism. Conversely it makes the gnostic understanding or 'bible code' understanding the only rational application to others who go rely on allegory.  But, I believe, these strict interpretations are not the norm for a majority of Protestants.
So what I would like to know is, to those who believe in Sola Scriptura, when do you decide whether or not to exclude interpretations based on the anagogical sense of scripture?
It is true that sola scriptura is in some sense a reactionary doctrine. It's largely set against extra-Biblical revelation, rather than "wrongly" interpreting the Bible itself. In itself, a sola scriptura position does not necessarily oppose an allegorical or anagogical meaning, though it would resist interpreting an otherwise historical-looking passage in solely metaphorical terms. The original reformers were not shy about using anagogical interpretation for homilectic purposes, provided the anagogical meaning is also found in Scripture. So the basic suspicion is about finding new beliefs from non-literal reading. This comes from the "clarity of Scripture" doctrine more than from sola scriptura itself, though the two are closely related. 

My favourite example of the "four senses" is Dante's exposition of Psalm 113:1-2 (aka 114:1-2) in his letter to Can Grande della Scala. The Psalm text reads, in the Douay-Rheims:


  When Israel went out of Egypt, the house of Jacob from a barbarous people, Judea was made his sanctuary, Israel his dominion.


Dante explains how the text supports multiple simultaneous meanings:


  If we look at it from the letter alone it means to us the exit of the Children of Israel from Egypt at the time of Moses; if from allegory, it means for us our redemption done by Christ; if from the moral sense, it means to us the conversion of the soul from the struggle and misery of sin to the status of grace; if from the anagogical, it means the leave taking of the blessed soul from the slavery of this corruption to the freedom of eternal glory.


None other than John Calvin writes (Institutes of the Christian Religion II.8.15, edition of 1559, translated by Henry Beveridge in 1845):


  We again, instead of supposing that the matter has no reference to us, should reflect that the bondage of Israel in Egypt was a type of that spiritual bondage, in the fetters of which we are all bound, until the heavenly avenger delivers us by the power of his own arm, and transports us into his free kingdom. Therefore, as in old times, when he would gather together the scattered Israelites to the worship of his name, he rescued them from the intolerable tyranny of Pharaoh, so all who profess him now are delivered from the fatal tyranny of the devil, of which that of Egypt was only a type.


I would count this as an anagogical interpretation of the Exodus, along the same lines as Dante, and even using substantially the same terminology of spiritual slavery and freedom. More specifically, this is an example of typology, where historical Biblical events are interpreted as prefiguring the nature, life and teaching of Christ. The nice feature of typology from a Protestant perspective is that it adds to the plain reading of the text, rather than replacing it.

In general, Calvin does not seem to mind adding a meaning to the text, when it's a matter of finding "the moral of the story" (so long as that moral is consistent with what the Bible says elsewhere). What he doesn't like is any attempt to use a symbolic meaning in opposition to the literal meaning, especially if he suspects someone of trying to "explain away" moral precepts. Also, these readings are used to illuminate pre-existing doctrine, rather than to justify beliefs that aren't otherwise founded in Scripture. This is where the sola scriptura comes in: from the beliefs that nothing essential to salvation can be found outside the Bible, and that Scripture is perspicuous, it would follow that nothing new can be discovered by anagogical interpretation.

The same pattern holds for Martin Luther, who explicitly uses the term "anagogical" in his Dictata super Psalterium (1514), and often employs typological interpretation. Luther also argues for the perspicuity of Scripture; in On the Bondage of the Will (1525) he says "I will have no one part of it called obscure" (Sec. 37) and objects to the idea that special help is required to extract meaning from the Bible. But this does not stop him from using anagogical reading to further explain any point of Christian belief.

Final example: Philipp Melanchthon wrote in the Apology of the Augsburg Confession (1530), commenting on Numbers 28:4, "The Law had pictures or shadows of future things. Accordingly, in this spectacle Christ and the entire worship of the New Testament are portrayed." His commentary on John's gospel also makes use of allegory, where for example Mary is seen as sometimes representing the Church, and sometimes the individual believer, in addition to being literally Mary.

Later Protestants have often resisted overly "fanciful" allegorical interpretations, under which the literal meaning is lost, and one has to resort to complex and obscure symbolism. They would all still accept those interpretations that are explicitly stated in the New Testament (such as the "sign of Jonah" in Matthew 12:39), however. Modern Biblical literalism is partly a reaction against this kind of reading, and goes further than the original reformers did. The sola scriptura and clarity motivations are the same, just more strongly expressed, about whether there can be anything in the non-literal meaning of the Bible that is not also in the literal sense.