[PM-30770] Kerberos auth support to LDAP directory - #971
Open
karlg100 wants to merge 4 commits into
Open
Conversation
fixed missing config options tested example to test # setup env export BITWARDENCLI_CONNECTOR_APPDATA_DIR="$PWD/.bwdc-test" rm -rf "$BITWARDENCLI_CONNECTOR_APPDATA_DIR" unset HTTP_PROXY unset HTTPS_PROXY unset https_proxy unset http_proxy export BW_CLIENTID=‘organization.<ORGID>' export BW_CLIENTSECRET=‘<SECRET>' node ./build-cli/bwdc.js config server https://bitwarden.example.com node ./build-cli/bwdc.js login # check if we are logged in DATA="$(node ./build-cli/bwdc.js data-file)" jq '.activeUserId, .authenticatedAccounts' "$DATA" jq '{activeUserId, authenticatedAccounts, hasAccounts: (.accounts|type)}' "$DATA" # get krb creds export KRB5CCNAME=FILE:/tmp/krb5cc_bwdc kinit -k -t /etc/krb5.keytab HOSTNAME\$@EXAMPLE.COM klist # configure bwdc for krb node ./build-cli/bwdc.js config ldap.auth kerberos node ./build-cli/bwdc.js config ldap.kerberos.ccache FILE:/tmp/krb5cc_bwdc node ./build-cli/bwdc.js config ldap.kerberos.mechanism GSSAPI node ./build-cli/bwdc.js config ldap.ldapsearch.path ldapsearch node ./build-cli/bwdc.js config sync.groupPath "" node ./build-cli/bwdc.js config sync.userPath "" node ./build-cli/bwdc.js config sync.userFilter "(&(memberOf:1.2.840.113556.1.4.1941:=CN=bitwarden-users,OU=Administrative,OU=Users,DC=example,DC=com)(mail=*))" node ./build-cli/bwdc.js config sync.groupFilter "(memberOf:1.2.840.113556.1.4.1941:=CN=bitwarden-groups,OU=Administrative,OU=Groups,DC=example,DC=com)" node ./build-cli/bwdc.js config directory 0 node ./build-cli/bwdc.js config ldap.hostname addc.example.com node ./build-cli/bwdc.js config ldap.port 389 node ./build-cli/bwdc.js config ldap.rootPath “dc=example,dc=com" # verify jq ".\"$BWUID\".directoryConfigurations.ldap | {hostname,port,rootPath,auth,kerberosMechanism,kerberosCcache,ldapsearchPath}" "$DATA" # test node ./build-cli/bwdc.js test # check for settings DATA="$(node ./build-cli/bwdc.js data-file)" BWUID="$(jq -r '.activeUserId' "$DATA")" echo "$DATA $BWUID" # sync node ./build-cli/bwdc.js sync --response --pretty
|
Karl A. Grindley seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
1 similar comment
|
Karl A. Grindley seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Thank you for your contribution! We've added this to our internal tracking system for review. Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process. |
fix for LoginCommand() bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
None
📔 Objective
Add support for kerberos authentication for LDAP directory connections. This allows the hosting endpoint's crednetials (or a user's crednetials) to authenticate to an LDAP server with kerberos. This sidesteps many increasingly difficult security policies forbidding the use of password secrets and password rotation. (if the endpoints krb credentials are managed by sssd, they are auto rotated every 30 days)
📸 Screenshots
no UI. CLI changes only.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes