Skip to content

Disable /speculative_auth tests when SASL is disabled #1213

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

Closed
wants to merge 1 commit into from

Conversation

eramongodb
Copy link
Contributor

My understanding is that the speculative auth tests require SASL for correct behavior, but are not being disabled when SASL is disabled. This PR adds a MONGOC_ENABLE_SASL check in addition the existing MONGOC_ENABLE_CRYPTO check to avoid running SASL tests when crypto is enabled but SASL is disabled (not a normal/expected configuration, but nevertheless).

@eramongodb eramongodb requested a review from kevinAlbs March 9, 2023 16:45
@eramongodb eramongodb self-assigned this Mar 9, 2023
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

I think this check is not necessary.

The C driver SASL library dependency (indicated by MONGOC_ENABLE_SASL) is only required to implement the authMechanism's GSSAPI and PLAIN. Authentication notes:

Note The MongoDB C Driver must be compiled with SASL support in order to use SASL PLAIN authentication.

Note On UNIX-like environments, Kerberos support requires compiling the driver against cyrus-sasl.
On Windows, Kerberos support requires compiling the driver against Windows Native SSPI or cyrus-sasl. The default configuration of the driver will use Windows Native SSPI.

Speculative authentication only applies to the authMechanism's MONGODB-X509, SCRAM-SHA-1 and SCRAM-SHA-256. DRIVERS-918 notes:

Speculative authentication is ignored for server versions less than or equal to 4.2 and is supported for X.509, SCRAM-SHA-1 and SCRAM-SHA-256.

@eramongodb
Copy link
Contributor Author

Observed issue is better addressed by #1214.

@eramongodb eramongodb closed this Mar 9, 2023
@eramongodb eramongodb deleted the cdriver-sasl branch March 9, 2023 21:23
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