robrotheram / taiga-contrib-openid-auth

Taiga plugin for openid authentication
45 stars 25 forks source link

Assist with a 3rd install method #26

Closed karezza closed 3 years ago

karezza commented 3 years ago
  1. Given a recently cloned https://github.com/kaleidos-ventures/taiga-docker repo & start using $ ./launch-all.sh
  2. exec -it -u root taiga-docker_taiga-back_1
  3. apt update
  4. apt install vim
  5. pip install taiga-contrib-openid-auth
  6. vim settings/common.py, add the following lines (set values as appropriate):
    INSTALLED_APPS += ["taiga_contrib_openid_auth"]
    OPENID_USER_URL = "https://{url-to-keycloak}/auth/realms/{realm}/protocol/openid-connect/userinfo"
    OPENID_TOKEN_URL = "https://{url-to-keycloak}/auth/realms/{realm}/protocol/openid-connect/token"
    OPENID_CLIENT_ID = "{client id}"
    OPENID_CLIENT_SECRET = "{client secret}"
  7. ctrl-d
  8. exec -it -u root taiga-docker_taiga-front_1
  9. vi /usr/share/nginx/html/conf.json, add the following lines (set values as appropriate):
    "openidAuth" : "https://{url-to-keycloak}/auth/realms/{realm}/protocol/openid-connect/auth",
    "openidName" : "{name-for-login-button}",
    "openidClientId": "{client_id}",
    "contribPlugins": [
      "/plugins/openid-auth/openid-auth.json"
    ]
    }
  10. cd /usr/share/nginx/html/plugins
  11. mkdir openid-auth
  12. cd openid-auth
  13. wget https://github.com/robrotheram/taiga-contrib-openid-auth/blob/master/front/dist/openid-auth.js
  14. wget https://github.com/robrotheram/taiga-contrib-openid-auth/blob/master/front/dist/openid-auth.json
  15. mkdir images
  16. cd images
  17. wget https://github.com/robrotheram/taiga-contrib-openid-auth/blob/master/front/dist/images/openid.png
  18. ctrl-d
  19. docker-compose restart
  20. chromium-browser http://localhost:9000

A blank page is loading. If I right-click and view source there is code there, but nothing is displayed on the page. Not sure how to proceed. Watching the docker log on the front & back containers isn't revealing any errors.

karezza commented 3 years ago

I was installing via pip which installed version 1.0.0. Instead, download the latest release version using wget & things look like they are going to work once I get the settings correct.

Also had to add to conf.json:

  "openidScope": "openid"