Skip to content

Add Admin auth check on /subjects endpoints#190

Merged
mattrent merged 9 commits into
funlessdev:mainfrom
mattrent:admin_check
Mar 21, 2023
Merged

Add Admin auth check on /subjects endpoints#190
mattrent merged 9 commits into
funlessdev:mainfrom
mattrent:admin_check

Conversation

@mattrent

Copy link
Copy Markdown
Member

This PR adds an authentication check on /subjects endpoints, using a special admin account. Previous endpoints keep the same authentication mechanism as before.

Specifically, the PR:

  • adds the admins table and schema in SubjectsRepo, to contain admin accounts
  • adds a token for the admin account when seeding the database, to ensure that at least on admin exists when the application runs
  • saves the admin and guest tokens in a local file, readable by the user deploying the platform

Additionally:

  • updates Elixir and Alpine versions in Dockerfiles
  • removes Rust installation (unused) from Dockerfiles
  • fixes SubjectsRepo seeding in Dockerfiles and releases, by starting Plug.Crypto.Application before generating the tokens

@mattrent mattrent requested a review from giusdp as a code owner March 21, 2023 09:35
@mattrent mattrent merged commit 68587cc into funlessdev:main Mar 21, 2023
@mattrent mattrent deleted the admin_check branch March 21, 2023 10:36
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