Skip to content

DOCSP-18653: remove username from x509 example #640

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 2 commits into from
Apr 4, 2023

Conversation

rustagir
Copy link
Collaborator

@rustagir rustagir commented Apr 4, 2023

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-18653
Staging

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?

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.

LGTM! Left a suggestion and question.

.. note::

You do not need to specify a username when authenticating with this
mechanism. However, if you provide a username, you must encode it so
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mechanism. However, if you provide a username, you must encode it so
mechanism. However, if you provide a username, you must URI encode it so

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

N/A because removing note


.. literalinclude:: /code-snippets/authentication/x509.js
:language: javascript

.. note::
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:

Based on the comments on the ticket, it's not needed for all the versions of the Node.js driver docs we maintain. I would omit this since it might cause users to ask why they might include it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call. I wasn't sure because the ticket says we might want to tell users that it is optional but requires URI encoding... But if there's really no use case where users need to supply the user, best to not reference it at all

the X.509 certificate, see the MongoDB manual :manual:`X.509 tutorial
</tutorial/configure-x509-client-authentication/#add-x-509-certificate-subject-as-a-user>`.
authenticate by retrieving the distinguished name (DN) from the
client certificate.
Copy link
Contributor

Choose a reason for hiding this comment

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

Question:
I thought the removed sentence provides information that helps the user determine the certificate is the one that corresponds to their MongoDB user? Is there enough info in this section on how to set up x.509 authentication without it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was my understanding that since username is no longer required, users do not need to know how to retrieve the subject from their certificate.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. It wasn't clear to me whether the link was trying to confirm the certificate was for the user or to extract the subject/username.

@rustagir rustagir merged commit 40939c7 into mongodb:master Apr 4, 2023
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
rustagir added a commit that referenced this pull request Apr 4, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
jordan-smith721 pushed a commit to jordan-smith721/docs-node that referenced this pull request Jul 24, 2023
* DOCSP-18653: remove username from x509 example

* CC suggestions

(cherry picked from commit 40939c7)
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