For an implementation strategy for the complex bits of authentication I'd go with upcalls (a l gssd) or PF_KEY/netlink type IPC protocols (but I repeat myself).  The session security layer should be in "the kernel".