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

auth saves userinfo to db #1099

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

MalinAhlberg
Copy link
Contributor

@MalinAhlberg MalinAhlberg commented Oct 25, 2024

Related issue(s) and PR(s)
This PR closes https://github.com/NBISweden/LocalEGA-SE-Deployment/issues/525.

Description

  • a db user for auth is added
  • auth connects to the db
  • auth saves information about the user on oidc logins
  • if the user logs in again, the old info is overwritten

How to test

  • Use starter-kit-storage-and-interfaces, branch feature/auth-add-userinfo-to-db together with starter-kit-lsaai-mock, as described in the Readme.
  • Visit http://localhost:8085/ from your browser and log in.
  • Check that the logged in user's info is added to the db: docker exec -it postgres psql postgresql://postgres:rootpass@postgres/sda -At -c "select * from sda.userinfo"

Extra info
I will be away next week, so I put the code here, in case someone wants to take care of it. It's working when tested manually with lsaai-mock, but there are no integration tests and also no unit tests for auth. Adding integration tests is not very straight forward, though, so it might be out of scope for this issue.
Also the chart tests fail, but that might be unrelated to this PR.

@MalinAhlberg MalinAhlberg marked this pull request as draft October 25, 2024 12:52
@MalinAhlberg MalinAhlberg marked this pull request as ready for review October 25, 2024 14:25
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.

1 participant