The question ‘Who was the Walrus?’ has been discussed in some detail ever since 1967, when John Lennon famously declared (in song form) “I am the Walrus” *see note below.
To complicate matters further, in a later interview with David Sheff, Lennon changed tack again and hinted that yes, he indeed was the Walrus, and that the ‘Glass Onion’ lyric was just a way of getting in a sly dig at McCartney.
The legal ramifications of all this are explained in : ‘I Am the Walrus – No, I Am!: Can Paul McCartney Transpose the Ubiquitous ‘Lennon/McCartney’ Songwriting Credit to Read ‘McCartney/Lennon?’ An Exploration of the Surviving Beatle’s Attempt to Re-Write Music Lore, as it Pertains to the Bundle of Intellectual Property Rights.’
*Note: In the same song Lennon also claimed “I am the Egg Man”, the legal implications of which have as yet been underexplored in the literature.