Kerberos v1.1.6 failing tests only for MacOS X, worked on v1.1.5

node version: 14
kerberos version: 1.1.6
macOS version: Catalina 10.15.7

Hello,

I’ve intergrated kerberos authentication using your javascript kerberos library (GitHub - mongodb-js/kerberos: Kerberos library for node.js) and in my kerberos module I have a function that basically looks like this:

const getToken = async function getSPNEGOToken(
  principal,
  { response = undefined, config = undefined } = {},
) {
  const useResponse = isResponseOk(response, config);
  const hostname = useResponse
    ? response.request.host
    : new URL(config.url, config.baseURL).hostname;
  const service = `HTTP@${hostname}`;
  console.log('service:', service);
  const client = await kerberos.initializeClient(service, {
    principal,
    mechOID: kerberos.GSS_MECH_OID_SPNEGO,
  });
  return client.step('');
};

I have tests for the whole module, and tests for the module that use and go through the kerberos authentication process as well. Everything is absolutely fine on Linux and macOS operating systems in version 1.1.5.

Once I upgrade to 1.1.6, the following behavior occurs:

  • all tests pass in a Linux operating systems/in a docker container
  • my tests for the kerberos module pass on macOS
  • my integrated tests for the module that uses the kerberos module consistently fail with the error Error: An unsupported mechanism was requested: unknown mech-code 0 for mech unknown, but I’m clearly passing GSS_MECH_OID_SPNEGO as my mech.

Comparing the v1.1.5 and v1.1.6 tags, it looks like the change to bindings.gyp could be the culprit, but I’ve been unable to verify that.

Is there something I’m missing? I’d like to not pin the kerberos library to 1.1.5, but I also want to be able to run my tests as-needed.

Please let me know if you have any ideas.