-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(NODE-6333): Allow callers to specify the 'protect' flag #198
Conversation
Hi @arabull, thank you for your submission! For this change to be reviewed, it needs to include testing for the new feature. Would you like to add testing yourself or defer to our team? If you'd like to test your changes locally, you can add tests in
|
Hey @aditi-khare-mongoDB, I hate doing this, but I'll probably need to defer to your team for testing. I looked at |
Thanks for your quick reply! Next week, the team will look at what testing work is needed for this feature and figure out when to schedule it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, agree that ideally we'd want to test this, but I also understand that that's quite tricky for this package
@arabull I left a few comments. If its easier for you, I can make the changes and push to your branch. Just let me know |
@baileympearson I'll take you up on the offer to make the fixes in my branch. I'll leave it up to you, but I'm not sure about referencing things like Your call, though. Thanks for helping me out! |
Hey @arabull , I can't push to your branch because it's on your fork's main. Checking out your changes required me to --detach, and I'm reluctant to push a detached head to your fork's main. I put my changes in this branch, if you'd like to pull them in: https://github.com/mongodb-js/kerberos/tree/requested-changes Also note that the tests depend on #202 |
@baileympearson Done, thanks! |
@arabull Can you update this branch to include the latest commit to main? |
@baileympearson Done. |
Co-authored-by: Durran Jordan <[email protected]>
Description
What is changing?
Allow callers to specify the
protect
flag. I did this by adding a newBooleanToIntWithNonIntAsFalse()
function modeled off ofToStringWithNonStringAsEmpty
. I use the new function to interpret the contents ofoptions["protect"]
.I am not married to that function name and am happy to change it if there is a better choice.
Is there new documentation needed for these changes?
I've updated the
README
.What is the motivation for this change?
Our server requires protected payloads. The library handles this just fine, but the
protect
flag is currently hard-coded to0
. The caller should be able to influence its value.Release Highlight
protect
is now an option for KerberosClient.wrap()protect
can be provided toKerberosClient.wrap()
. When configured, wrapped message will be encrypted.Thanks @arabull for this contribution!
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript
ToStringWithNonStringAsEmpty()
. I didn't see any tests for that guy and am unsure how to properly test the new function.