[CDRIVER-2338] Simpler SCRAM-SHA-1 initial setup Created: 02/Nov/17  Updated: 28/Oct/23  Resolved: 14/Dec/17

Status: Closed
Project: C Driver
Component/s: auth
Affects Version/s: None
Fix Version/s: 1.10.0

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We initialize a reverse map for base64 decoding using mongoc_b64_initialize_rmap. The function is not thread-safe, so if we plan to use it in SCRAM-SHA-1 authentication then we call the function in mongoc_init. We determine whether SCRAM-SHA-1 authentication is possible by checking if SSL is compiled in.

This is brittle; it's easy to miss the dependency between SSL and a base 64 decoder map, and accidentally use the map unsafely. Let's just always initialize it.



 Comments   
Comment by Githook User [ 14/Dec/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2338 simpler SCRAM-SHA-1 initial setup
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/42fd5ef0cdcbd327f0669ebb9f01fe86a88c8c02

Generated at Wed Feb 07 21:14:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.