kerberos
kerberos copied to clipboard
fix(NODE-6372): correctly GSS wrap non-user data
Description
Fix implementation of wrap function to work for use cases other than authentication.
What is changing?
Just an extra check for an empty string: if (user) becomes if (user && *user).
Without this, the wrap function was discarding the challenge/payload value and wrapping only the user option value, even if no such value was provided.
Is there new documentation needed for these changes?
No, this makes the wrap method work as per the existing documentation.
What is the motivation for this change?
Without this change, the wrap function works only for authentication. With this change, any payload can be GSS-wrapped.
Release Highlight
Allow Kerberos GSS wrap function to work on arbitrary challenge/payload data, not just user authentication.
Double check the following
- [x] Ran
npm run check:lintscript - [x] Self-review completed using the steps outlined here
- [x] PR title follows the correct format:
type(NODE-xxxx)[!]: description- Example:
feat(NODE-1234)!: rewriting everything in coffeescript
- Example:
- [x] Changes are covered by tests
- [x] New TODOs have a related JIRA ticket
NOTE: I wasn't able to run the full test suite locally, given my Kerberos server configuration. I did run equivalent versions of the new tests in my application.
Closing for inactivity, please feel free to re-open and continue this if there's interest!