[CDRIVER-1494] authMechanism URI options cannot be set individually Created: 26/Aug/16 Updated: 12/Mar/17 Resolved: 07/Dec/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | auth, libmongoc |
| Affects Version/s: | 1.4.0 |
| Fix Version/s: | 1.6.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeremy Mikola | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
mongoc_uri_option_is_utf8() reports true for "authMechanism", but mongoc_uri_set_option_as_utf8() is not suitable for setting that option. Based on the static mongoc_uri_parse_option() function, its value must be appended to uri->credentials instead of uri->options. "authMechanismProperties" also cannot be set, since mongoc_uri_parse_auth_mechanism_properties() is static. The PHP and HHVM drivers depend on being able to set URI options individually, since they allow options to be received in a separate array to be merged atop the values in the URI string. |
| Comments |
| Comment by Jeremy Mikola [ 10/Mar/17 ] | ||||||||
|
jesse: I believe a setter for "authMechanism" is still missing. Should we re-open this or would you rather I create a new ticket and target 1.7.0? | ||||||||
| Comment by Githook User [ 10/Dec/16 ] | ||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | ||||||||
| Comment by Githook User [ 07/Dec/16 ] | ||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: New function to replace all authMechanismProperties set on a URI. | ||||||||
| Comment by Jeremy Mikola [ 29/Aug/16 ] | ||||||||
|
The current code in mongoc-uri.c dates back to I'm OK with leaving | ||||||||
| Comment by A. Jesse Jiryu Davis [ 26/Aug/16 ] | ||||||||
|
Thanks, I think I understand. Right now we have a getter:
So it seems consistent to do:
Would that work? The C Driver 1.5-rc0 will be out around Sept 12 and the final a few weeks after that, must we have it in 1.5 or could it be a few months later in 1.6? |