graal icon indicating copy to clipboard operation
graal copied to clipboard

native-image does not populate GSS Oid mechanisms

Open avimalka opened this issue 3 years ago • 2 comments

When building with native-image GSSManager does not detect any Oid . It seems like GSSManager does not have any Provider populated at all.

How to reproduce: Sample.java

import org.ietf.jgss.*;

public class Sample {
  public static void main(String[] args) throws org.ietf.jgss.GSSException {
  GSSManager gssManager = GSSManager.getInstance();
  gssManager.createName("AAA", GSSName.NT_USER_NAME);
  }
}

javac Sample.java java -agentlib:native-image-agent=config-output-dir=META-INF/native-image Sample native-image --no-fallback Sample

Tested with: GraalVM CE 22.1.0 Java 17

Stacktrace (for the native executable) Exception in thread "main" GSSException: Unsupported mechanism requested: 1.2.840.113554.1.2.2 at sun.security.jgss.ProviderList.getMechFactory(ProviderList.java:199) at sun.security.jgss.ProviderList.getMechFactory(ProviderList.java:166) at sun.security.jgss.GSSManagerImpl.getNameElement(GSSManagerImpl.java:183) at sun.security.jgss.GSSNameImpl.getElement(GSSNameImpl.java:469) at sun.security.jgss.GSSNameImpl.init(GSSNameImpl.java:202) at sun.security.jgss.GSSNameImpl.(GSSNameImpl.java:171) at sun.security.jgss.GSSNameImpl.(GSSNameImpl.java:152) at sun.security.jgss.GSSManagerImpl.createName(GSSManagerImpl.java:109) at Sample.main(Sample.java:6)

avimalka avatar Jul 05 '22 08:07 avimalka

Hi, Thank you for reporting this, could you please provide a complete example to reproduce? I'm not familiar with GSSManager

oubidar-Abderrahim avatar Jul 19 '22 15:07 oubidar-Abderrahim

Hi.

It's related to Kerberos ticket authentication, So it will be very difficult to reproduce the whole environment .

I noticed that there is issue #2745 which was resolved recently which describes similar issue, But looking at version 22.2.0 I still have the same issue. Any idea if the fix is part of 22.2 ?

avimalka avatar Jul 31 '22 10:07 avimalka

That fix was part of 22.2

oubidar-Abderrahim avatar Aug 16 '22 14:08 oubidar-Abderrahim

Is this bug still being worked on? This is still a bug for me in 22.3.1

louis2845 avatar Feb 09 '23 21:02 louis2845

Hi, Thank you for reporting this, could you please provide a complete example to reproduce? I'm not familiar with GSSManager

As I mentioned here, we need a complete reproducer to use to debug this issue, please provide us with one if possible. Thank you

oubidar-Abderrahim avatar Feb 14 '23 11:02 oubidar-Abderrahim

The attached code should recreate the problem exactly. Is there anything else you'd like me to include to help diagnose the problem?

louis2845 avatar Feb 14 '23 13:02 louis2845

We'll continue the discussion in #5950 to keep 1 thread per issue

oubidar-Abderrahim avatar Feb 15 '23 14:02 oubidar-Abderrahim

duplicate of #5950

oubidar-Abderrahim avatar Feb 15 '23 14:02 oubidar-Abderrahim