Skip to content

Instantly share code, notes, and snippets.

@alexisrolland
Last active September 23, 2024 11:19
Show Gist options
  • Save alexisrolland/cf42e373208c83e416c46af251aeb53c to your computer and use it in GitHub Desktop.
Save alexisrolland/cf42e373208c83e416c46af251aeb53c to your computer and use it in GitHub Desktop.
Example of commands to install and use Kerberos in Docker
# Install Kerberos in Linux based Docker image
$ export DEBIAN_FRONTEND=noninteractive
$ apt-get install -y krb5-user libpam-krb5
$ kinit <account>@<COMPANY>.ORG
$ klist
# Create keytab file
$ ktutil
$ addent -password -p <account>@<COMPANY>.ORG -k 1 -e arcfour-hmac
$ write_kt <account>.keytab
$ quit
# Authenticate with keytab file
$ kinit -kt <account>.keytab <account>@<COMPANY>.ORG
@mgnmpk
Copy link

mgnmpk commented Sep 23, 2024

After performing above steps I'm getting this:

Even I have kerberos package in node_modules as well in package.json

logErroressage: message:undefined stackTrace: MongoMissingDependencyError: Optional module kerberos not found. Please install it to enable kerberos authentication
at Object. (/usr/NAVRuleEngine/node_modules/mongodb/lib/deps.js:21:36)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment