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 authentication for PostgreSQL #1725

Merged
merged 24 commits into from
Dec 30, 2022
Merged

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Dec 29, 2022

Description

Closes #1694.

Readiness checklist

  • I added some tests. More will be needed in Rework integration test setup and auth #1568.
  • I made spot refactorings.
  • I updated user documentation – in the next PR.
  • I ran task all, and it passed.
  • I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • I checked comments rendering with task godocs.
  • I ensured that the title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@AlekSi AlekSi added the code/feature Some user-visible feature is not implemented yet label Dec 29, 2022
@AlekSi AlekSi added this to the v0.8.0 Beta milestone Dec 29, 2022
@AlekSi AlekSi self-assigned this Dec 29, 2022
@vercel
Copy link

vercel bot commented Dec 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ferret-db ✅ Ready (Inspect) Visit Preview Dec 30, 2022 at 1:25PM (UTC)

@AlekSi AlekSi added no ci do not merge PRs that should not be merged labels Dec 29, 2022
@vercel vercel bot temporarily deployed to Preview December 29, 2022 18:13 Inactive
@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #1725 (34b1c27) into main (47e2246) will decrease coverage by 0.24%.
The diff coverage is 60.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1725      +/-   ##
==========================================
- Coverage   69.29%   69.05%   -0.25%     
==========================================
  Files         301      301              
  Lines       14233    14300      +67     
==========================================
+ Hits         9863     9875      +12     
- Misses       3435     3492      +57     
+ Partials      935      933       -2     
Impacted Files Coverage Δ
internal/handlers/common/error.go 73.33% <ø> (ø)
internal/handlers/common/errorcode_string.go 80.00% <ø> (ø)
internal/handlers/pg/msg_explain.go 56.52% <ø> (-0.06%) ⬇️
internal/handlers/pg/msg_getparameter.go 80.45% <ø> (-2.02%) ⬇️
internal/handlers/pg/msg_saslstart.go 0.00% <0.00%> (-100.00%) ⬇️
internal/handlers/tigris/msg_delete.go 68.32% <0.00%> (-0.43%) ⬇️
internal/handlers/tigris/msg_explain.go 61.11% <ø> (-5.02%) ⬇️
internal/handlers/tigris/msg_insert.go 74.44% <0.00%> (-0.84%) ⬇️
internal/util/ctxutil/ctxutil.go 90.47% <ø> (ø)
internal/util/must/must.go 42.85% <ø> (ø)
... and 47 more
Flag Coverage Δ
integration 64.44% <59.20%> (-0.60%) ⬇️
mongodb 5.97% <18.40%> (-8.54%) ⬇️
pg 53.03% <54.40%> (-1.01%) ⬇️
tigris 38.88% <40.80%> (-0.14%) ⬇️
unit 28.96% <13.48%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@vercel vercel bot temporarily deployed to Preview December 29, 2022 18:42 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2022 18:50 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2022 18:59 Inactive
@AlekSi AlekSi removed no ci do not merge PRs that should not be merged labels Dec 29, 2022
@vercel vercel bot temporarily deployed to Preview December 29, 2022 19:12 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2022 19:20 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2022 20:02 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2022 20:10 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2022 20:35 Inactive
@AlekSi AlekSi marked this pull request as ready for review December 30, 2022 11:37
@AlekSi AlekSi requested a review from a team December 30, 2022 11:37
@AlekSi AlekSi requested a review from a team as a code owner December 30, 2022 11:37
@AlekSi AlekSi enabled auto-merge (squash) December 30, 2022 11:37
@AlekSi AlekSi added the trust PRs that can access Actions secrets label Dec 30, 2022
@AlekSi AlekSi requested review from a team and noisersup and removed request for a team December 30, 2022 11:38
@vercel vercel bot temporarily deployed to Preview December 30, 2022 12:16 Inactive
rumyantseva
rumyantseva previously approved these changes Dec 30, 2022
Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

The code makes sense to me for now.
I tried things locally, seems to be working.

internal/util/must/must.go Outdated Show resolved Hide resolved
internal/handlers/tigris/tigrisdb/tigrisdb.go Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview December 30, 2022 13:25 Inactive
@AlekSi AlekSi requested review from rumyantseva and a team December 30, 2022 13:30
@b1ron
Copy link
Contributor

b1ron commented Dec 30, 2022

All seems to be working. I tried to get mongo-test working with TLS but I kept receiving an invalid payload error. However, we probably won't ever need to run it with TLS.

Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

I didn't check super attentively, but the PR looks good to me overall, and things seem to be fixed.

@AlekSi AlekSi merged commit 3e28163 into FerretDB:main Dec 30, 2022
@AlekSi AlekSi deleted the use-conninfo branch December 30, 2022 14:26
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 trust PRs that can access Actions secrets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable authentication
3 participants