Skip to content

[GR-44320] Unable to make Kerberos Authenticated http calls due to GSSManager Oid issue #5950

@louis2845

Description

@louis2845

Issue is caused by #4700

GraalVM and environment:

OS: Linux RHEL 8
GraalVM version 22.3.1 EE
JDK: 17

GSSException: Unsupported mechanism requested: 1.2.840.113554.1.2.2
at [email protected]/sun.security.jgss.ProviderList.getMechFactory(ProviderList.java:199)
at [email protected]/sun.security.jgss.ProviderList.getMechFactory(ProviderList.java:166)
at [email protected]/sun.security.jgss.GSSManagerImpl.getNameElement(GSSManagerImpl.java:183)
at [email protected]/sun.security.jgss.GSSNameImpl.getElement(GSSNameImpl.java:469)
at [email protected]/sun.security.jgss.GSSNameImpl.init(GSSNameImpl.java:202)
at [email protected]/sun.security.jgss.GSSNameImpl.(GSSNameImpl.java:171)
at [email protected]/sun.security.jgss.GSSNameImpl.(GSSNameImpl.java:152)
at [email protected]/sun.security.jgss.GSSManagerImpl.createName(GSSManagerImpl.java:109)
at [email protected]/sun.net.www.protocol.http.spnego.NegotiatorImpl.init(NegotiatorImpl.java:95)
at [email protected]/sun.net.www.protocol.http.spnego.NegotiatorImpl.(NegotiatorImpl.java:123)
at [email protected]/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at [email protected]/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at [email protected]/sun.net.www.protocol.http.Negotiator.getNegotiator(Negotiator.java:65)
at [email protected]/sun.net.www.protocol.http.NegotiateAuthentication.isSupported(NegotiateAuthentication.java:120)
at [email protected]/sun.net.www.protocol.http.AuthenticationHeader.parse(AuthenticationHeader.java:201)
at [email protected]/sun.net.www.protocol.http.AuthenticationHeader.(AuthenticationHeader.java:144)
at [email protected]/sun.net.www.protocol.http.AuthenticationHeader.(AuthenticationHeader.java:124)
at [email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1818)
at [email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
at [email protected]/java.net.URLConnection.getContent(URLConnection.java:753)
at [email protected]/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(HttpsURLConnectionImpl.java:404)

Like the attached issue it is difficult to recreate the environment due to needing to set up an entire Active Directory / Kerberos environment - but the code in the attached issue should recreate the problem

Seems like the code below should populate providers but it doesn't

    public GSSManagerImpl(GSSCaller caller) {
        list = new ProviderList(caller, USE_NATIVE);
    }

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions