Skip to content
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-5506): add Binary subtype sensitive #657

Merged
merged 6 commits into from
Mar 12, 2024

Conversation

aditi-khare-mongoDB
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB commented Mar 11, 2024

Description

New BSON.Binary subtype 0x08 sensitive is introduced.

What is changing?

See release highlights.

Is there new documentation needed for these changes?

No, internal changes only.

What is the motivation for this change?

  • Required by downstream teams (shell).
  • Sensitive = excluded from logging, creating more security for sensitive values like HMAC keys.

Release Highlight

Add SUBTYPE_SENSITIVE on Binary class

When a BSON.Binary object is of 'sensitive' subtype, the object's subtype will equal 0x08.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@aditi-khare-mongoDB aditi-khare-mongoDB changed the title feat(NODE-5506): Add subtype 'sensitive' to BSON.Binary class feat(NODE-5506): Add Binary subtype sensitive Mar 11, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review March 11, 2024 18:45
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much lgtm, just a few more bits: Can we also add to the static constants we have on the Binary class? and tests that match what we did with the last new constant?

#461

Also "See release highlights." but there are none, this is a feat so it should have something, I'd say nothing more than the new constant on the Binary class and what it refers to.

@nbbeeken nbbeeken self-assigned this Mar 11, 2024
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 11, 2024
test/node/constants.test.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken changed the title feat(NODE-5506): Add Binary subtype sensitive feat(NODE-5506): add Binary subtype sensitive Mar 12, 2024
@nbbeeken nbbeeken merged commit 748ca60 into main Mar 12, 2024
4 checks passed
@nbbeeken nbbeeken deleted the NODE-5506/add-sensitive-subtype-to-BSON-data branch March 12, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants