Skip to content

Commit

Permalink
chore: setup keycloak locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Whoops committed Oct 30, 2024
1 parent 0b567e6 commit 6c581b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .envrc.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ export DATABASE_PASSWORD=postgres
export ARROW_DOMAIN=https://arrow.mbta.com
export ARROW_API_KEY=
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export AWS_SECRET_ACCESS_KEY=
export KEYCLOAK_ISSUER=https://login-dev.mbtace.com/auth/realms/MBTA
export KEYCLOAK_API_BASE=https://login-dev.mbtace.com/auth/admin/realms/MBTA/
export KEYCLOAK_CLIENT_ID=arrow-dev
export KEYCLOAK_CLIENT_UUID=bd84a8e2-2fce-4c7a-bfe3-3c7ac71fb5b2
export KEYCLOAK_CLIENT_SECRET=
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- `cp .envrc.example .envrc`
- Update `.envrc` with your local Postgres username and password
- Update `.envrc` with your AWS credentials or ensure they are available in your shell
- Update `.envrc` with the Arrow Dev Keycloak client secret (found in 1Password)
- `mix ecto.setup`
- `brew install chromedriver`
- Add your Arrow API key from https://arrow.mbta.com/mytoken to `.envrc`
Expand Down
4 changes: 2 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ config :arrow,
# map cognito groups to roles
"arrow-admin" => "admin"
},
ueberauth_provider: :cognito,
api_login_module: ArrowWeb.TryApiTokenAuth.Cognito,
ueberauth_provider: :keycloak,
api_login_module: ArrowWeb.TryApiTokenAuth.Keycloak,
required_roles: %{
view_disruption: ["read-only", "admin"],
create_disruption: ["admin"],
Expand Down

0 comments on commit 6c581b7

Please sign in to comment.