Not familiar with Eclipse, so "allow access" means editor support like code completion?
The recommened way to use Krb5LoginModule is to list it into a JAAS login config file (along with its options), and use JAAS API like LoginContext and Subject etc. com.sun.* classes are supported by Sun/Oracle but usually not meant to be used as public APIs.
I had the same problem in Eclipse too, you can go to preferences - Errors/Warnings - Deprecated and restricted API and change discouraged access from Error to Warning.
But indeed somehow after I was finished writing my GSS/Jaas code and organized the imports I didn't import any com.sun stuff anymore, only org.ietf.jgss, java.security and javax.security. The only place I refer to com.sun was in my jaas.conf.