Skip to content

DOCSP-35939: tls #2894

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

Merged
merged 9 commits into from
May 1, 2024
Merged

DOCSP-35939: tls #2894

merged 9 commits into from
May 1, 2024

Conversation

rustagir
Copy link
Contributor

https://jira.mongodb.org/browse/DOCSP-35939

STAGING

Docs PR - https://github.com/10gen/docs-laravel/pull/69

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file
  • Update documentation for new features

@rustagir rustagir requested a review from a team as a code owner April 22, 2024 17:43
@rustagir rustagir changed the base branch from 4.3 to 4.1 April 22, 2024 17:43
Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

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

Looks great -- I think a few straightforward tweaks could improve the focus of the content. I don't think I need to review again, but happy to take another look if you want.

Comment on lines 178 to 183
You can alternatively reference your certificates by setting options
in the ``driverOptions`` property in your connection configuration.
To learn more about these options, see the
`MongoDB\Driver\Manager::__construct()
<https://www.php.net/manual/en/mongodb-driver-manager.construct.php>`__
API documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:

In the referenced link, it's not clear to me which settings are safe to use. The driverOptions settings, such as such as ca_file, pem_file, and pem_pwd, on the page are described as "deprecated alias for the [option name] URI option" .

I think it could be helpful to mention which settings to recommend since it's not clear on the linked page. Maybe @GromNaN can provide more guidance here.

Copy link
Member

@GromNaN GromNaN Apr 23, 2024

Choose a reason for hiding this comment

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

I'd ask @jmikola. I don't know this option. I learned about this feature by reading your doc.

Copy link
Member

Choose a reason for hiding this comment

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

The URI options prefixed with tls supersede the driverOptions. There are very few options that are only supported through driverOptions (e.g. crl_file), and I don't think any of those are relevant to these docs.

I think the right call is to remove any discussion of driverOptions. You can still link to the Manager constructor as canonical documentation for URI options, though. In that case, you can drop a link to it in the "Additional Information" section below (probably above the server docs, since it will be more relevant to PHP).


driverOptions property

Is this actually a property in the Laravel configuration? If you're referring to the Manager constructor, then the proper terminology would be "driverOptions parameter" (not "property").

But this may be a moot point since the entire note can be removed.

@rustagir rustagir requested review from GromNaN and jmikola April 22, 2024 20:05
Comment on lines 178 to 183
You can alternatively reference your certificates by setting options
in the ``driverOptions`` property in your connection configuration.
To learn more about these options, see the
`MongoDB\Driver\Manager::__construct()
<https://www.php.net/manual/en/mongodb-driver-manager.construct.php>`__
API documentation.
Copy link
Member

Choose a reason for hiding this comment

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

The URI options prefixed with tls supersede the driverOptions. There are very few options that are only supported through driverOptions (e.g. crl_file), and I don't think any of those are relevant to these docs.

I think the right call is to remove any discussion of driverOptions. You can still link to the Manager constructor as canonical documentation for URI options, though. In that case, you can drop a link to it in the "Additional Information" section below (probably above the server docs, since it will be more relevant to PHP).


driverOptions property

Is this actually a property in the Laravel configuration? If you're referring to the Manager constructor, then the proper terminology would be "driverOptions parameter" (not "property").

But this may be a moot point since the entire note can be removed.

@GromNaN GromNaN removed their request for review April 26, 2024 08:55
@GromNaN
Copy link
Member

GromNaN commented Apr 26, 2024

I leave it to @jmikola to approve.

@GromNaN GromNaN requested a review from jmikola April 26, 2024 08:56
@caitlindavey caitlindavey requested a review from GromNaN April 30, 2024 21:27
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

LGTM. I'll leave you to address the tlsInsecure documentation on your own and don't need to review that a second time.


- ``tlsAllowInvalidCertificates``
- ``tlsAllowInvalidHostnames``
- ``tlsInsecure``
Copy link
Member

Choose a reason for hiding this comment

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

Quoting https://www.php.net/manual/en/mongodb-driver-manager.construct.php:

Specifying true for this option has the same effect as specifying true for both the "tlsAllowInvalidCertificates" and "tlsAllowInvalidHostnames" URI options. Defaults to false.

There should be no reason for the user to specify all three options. The improvement here would be to note that tlsInsecure implies the other two options.

Sorry for missing this earlier. This change should probably be applied to whatever content this was copied/adapted from (assuming other driver docs would be affected).

@rustagir rustagir requested review from GromNaN and removed request for GromNaN May 1, 2024 14:19
@jmikola jmikola removed the request for review from GromNaN May 1, 2024 15:52
@jmikola jmikola enabled auto-merge (squash) May 1, 2024 15:54
@jmikola jmikola disabled auto-merge May 1, 2024 15:54
@jmikola jmikola enabled auto-merge (squash) May 1, 2024 15:55
Copy link
Contributor

@norareidy norareidy left a comment

Choose a reason for hiding this comment

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

lgtm

@jmikola jmikola merged commit 6dcf5ea into mongodb:4.1 May 1, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants