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

[PM-13007] Fix Active Directory externalId parsing #693

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

eliykat
Copy link
Member

@eliykat eliykat commented Dec 18, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-13007

📔 Objective

Fix the following bug from #641. When performing multiple syncs with an Active Directory server, QA received the following error:

[Error] An item with the same key has already been added. Key: ----

It was also noted that:

Per the payload BWDC sent over. All of the groups + users have an externalId of ----

Active Directory uses the objectGUID attribute value as the exteranlId. It is sent as a buffer, but ldapts treats all attributes as strings unless told otherwise. This mismatch meant that our bufToGuid method was silently failing and returning only the dashes in the guid string without any alphanumeric characters. (code ref)

Fixed by telling ldapts to return this attribute value as a buffer. Per the docs: https://github.com/ldapts/ldapts?tab=readme-ov-file#return-buffer-for-specific-attribute .

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.50%. Comparing base (6915667) to head (b66d97e).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##            main    #693      +/-   ##
========================================
+ Coverage   2.24%   8.50%   +6.26%     
========================================
  Files         60      60              
  Lines       2633    2634       +1     
  Branches     467     467              
========================================
+ Hits          59     224     +165     
+ Misses      2571    2392     -179     
- Partials       3      18      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailsecc9d9bc-6dbb-4d12-b179-bdf6774dd5b0

No New Or Fixed Issues Found

@eliykat eliykat marked this pull request as ready for review December 18, 2024 05:11
@eliykat eliykat requested a review from a team as a code owner December 18, 2024 05:11
@eliykat eliykat requested a review from r-tome December 18, 2024 05:11
@eliykat eliykat merged commit 37c992f into main Dec 18, 2024
24 checks passed
@eliykat eliykat deleted the ac/pm-13007/fix-externalid branch December 18, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants