Keycloak follow-ups for the dev environment

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker-compose, json, python

Research direction

The work is in containers/frontend/app-config.js, realm_pyronear.json, etl_scripts, and containers/notebooks/app/api.py; first check the dependency on #68 and read how the init script uses the pyro-scripts service account. Update the dev frontend Keycloak settings and replace both legacy /login/creds logins with that account. Done when the redirect settings are present and neither flow depends on superadmin credentials.

Written by the indexing model from the issue text.

Description

Blocked by #68.

1. Front container (make run) — needed no later than the release of pyronear/new-pyro-platform#295

  • Add KEYCLOAK_URL, KEYCLOAK_CLIENT_ID and KEYCLOAK_REDIRECT_URI (http://localhost:8080/) to containers/frontend/app-config.js.
  • Add http://localhost:8080/* to the redirect URIs and http://localhost:8080 to the web origins of the new-pyro-platform client in realm_pyronear.json.
  • Can be added before the release: the current image ignores these keys.

2. Stop using the legacy login — needed before LEGACY_USER_TOKENS_ENABLED is set to false in pyro-api

  • etl_scripts still logs in with the superadmin credentials through /login/creds.
  • get_token in containers/notebooks/app/api.py does the same.
  • Both should use the pyro-scripts service account, as the init script already does.

Note

  • The realm ships dev secrets in clear and has brute-force protection disabled. Fine for this repository, but it must not be used as a base for the production realm.
Dominant language
Jupyter Notebook
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyronear/pyro-envdev

All issues in pyronear/pyro-envdev

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.