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 localhost exception #4100

Closed
Tracked by #7
chilagrow opened this issue Feb 20, 2024 · 0 comments · Fixed by #4156, #4160 or #4178
Closed
Tracked by #7

Implement localhost exception #4100

chilagrow opened this issue Feb 20, 2024 · 0 comments · Fixed by #4156, #4160 or #4178
Assignees
Labels
code/chore Code maintenance improvements not ready Issues that are not ready to be worked on; PRs that should skip CI
Milestone

Comments

@chilagrow
Copy link
Contributor

chilagrow commented Feb 20, 2024

What should be done?

When new authentication is enabled, admin.system.users collection does not exist, and the client is connected from the localhost, bypass credentials checking instead of what #4075 did (falling back to old backend authentication).

It is similar to https://www.mongodb.com/docs/manual/core/localhost-exception/

For testing, we probably should add a fixed user to MongoDB and FerretDB in the envtool and use MongoDB URI with those credentials in tests for the initial connection.

We probably should also clean up the way we create and drop users in tests, including test setup. We also should remove or simplify if IsMongo / if !IsMongo branches.

Where?

See issue number in the codebase add by #4075.

Definition of Done

  • handler updated;
  • all backends updated;
  • unit tests added/updated;
  • integration/compatibility tests added/updated;
  • spot refactorings done;
  • user documentation updated;
  • something else?
@chilagrow chilagrow changed the title Add localhost exception? Add localhost exception Feb 20, 2024
@chilagrow chilagrow added not ready Issues that are not ready to be worked on; PRs that should skip CI code/chore Code maintenance improvements labels Feb 20, 2024
@chilagrow chilagrow changed the title Add localhost exception Allow unauthenticated connection for creating users Feb 22, 2024
@AlekSi AlekSi changed the title Allow unauthenticated connection for creating users Implement localhost exception Feb 27, 2024
@AlekSi AlekSi assigned henvic and chilagrow and unassigned ferretdb-bot Mar 4, 2024
chilagrow added a commit that referenced this issue Mar 12, 2024
@AlekSi AlekSi reopened this Mar 12, 2024
@AlekSi AlekSi closed this as completed Mar 12, 2024
@chilagrow chilagrow reopened this Mar 12, 2024
@chilagrow chilagrow reopened this Mar 14, 2024
@AlekSi AlekSi added this to the Next milestone Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment