Skip to content
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

Implement startSession command #1554

Open
Tracked by #153
b1ron opened this issue Nov 23, 2022 · 0 comments · May be fixed by #4112 or #4140
Open
Tracked by #153

Implement startSession command #1554

b1ron opened this issue Nov 23, 2022 · 0 comments · May be fixed by #4112 or #4140
Labels
code/feature Some user-visible feature is not implemented yet not ready Issues that are not ready to be worked on; PRs that should skip CI

Comments

@b1ron
Copy link
Member

b1ron commented Nov 23, 2022

Blocked by #4166 (see the comment #4166 (comment)).

What should be done?

Implementation details

Identifiers

When referenced as lsid (e.g. in command requests), a session is represented by UUID.

When the session is returned in the list of sessions (and also used in some commands), it's represented as an object like this:

_id: {
      id: UUID('b5309a1f-c9c3-4608-9d4e-e058281e4737'),
      uid: Binary.createFromBase64('hobAqu900H1RX9+3UKSg6zEaoyg2IU0ukeytvJ2Vgbo=', 0)
    }

Here id is a UUID (same as lsid above) and uid base64 string is a sha256 of a user@authenticationDatabase string (in this example, username@admin).

Authentication

If authentication is not enforced (even if a user was used to connect to MongoDB), uid will always be a sha256 of an empty string. Its base64 is 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=.

If authentication is enforced, each user will have their own uid (username + authenticationDatabase).

The logic & decisions

@b1ron b1ron added the code/feature Some user-visible feature is not implemented yet label Nov 23, 2022
@AlekSi AlekSi added the not ready Issues that are not ready to be worked on; PRs that should skip CI label May 1, 2023
@rumyantseva rumyantseva added this to the Next milestone Feb 21, 2024
@rumyantseva rumyantseva self-assigned this Feb 21, 2024
@rumyantseva rumyantseva linked a pull request Feb 22, 2024 that will close this issue
9 tasks
@rumyantseva rumyantseva linked a pull request Mar 5, 2024 that will close this issue
9 tasks
@AlekSi AlekSi removed this from the v1.21.0 milestone Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet not ready Issues that are not ready to be worked on; PRs that should skip CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants