forked from numerique-gouv/b3desk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
136 additions
and
61 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,56 @@ Pour utiliser ces pages statiques, on peut utiliser le paramètre `error_page <h | |
Avec cette configuration, dès que le service est indisponible, Nginx servira cette page d'erreur: | ||
|
||
.. image:: ../_static/b3desk-500.png | ||
|
||
|
||
Jumelage avec Apps | ||
================== | ||
|
||
Configuration de B3Desk | ||
----------------------- | ||
|
||
Afin que les utilisateurs de b3desk puissent accéder à leurs fichiers Nextcloud d’Apps, il faut que l’application puisse récupérer l’identifiant attendu par Nextcloud. Pour ce faire une requête est faite sur l’`API Users de Keycloak <https://www.keycloak.org/docs-api/22.0.1/rest-api/index.html#_users>`_. | ||
|
||
Il est donc nécessaire de configurer les paramètres de configuration suivants : | ||
|
||
- :attr:`~b3desk.settings.MainSettings.SECONDARY_IDENTITY_PROVIDER_ENABLED` | ||
- :attr:`~b3desk.settings.MainSettings.SECONDARY_IDENTITY_PROVIDER_URI` | ||
- :attr:`~b3desk.settings.MainSettings.SECONDARY_IDENTITY_PROVIDER_REALM` | ||
- :attr:`~b3desk.settings.MainSettings.SECONDARY_IDENTITY_PROVIDER_CLIENT_ID` | ||
- :attr:`~b3desk.settings.MainSettings.SECONDARY_IDENTITY_PROVIDER_CLIENT_SECRET` | ||
|
||
On peut ensuite tester que la configuration est correcte grâce à la commande suivante: | ||
|
||
.. code-block:: bash | ||
docker exec -it <CONTAINER_ID> flask get-apps-id <[email protected]> | ||
En remplaçant ``<CONTAINER_ID>`` par l’identifiant du conteneur `b3desk_web`, et ``<[email protected]>`` par l’email d’un utilisateur, cette commande tente une connexion à l’API keycloak d’apps, afin de récupérer l’identifiant dont l’email a été passé en paramètre. | ||
|
||
Si la connexion à l’API de keycloak échoue, cette commande indiquera à quelle étape, et quelles sont les pistes de résolution. | ||
|
||
Configuration de Keycloak | ||
------------------------- | ||
|
||
Pour que la connexion de B3Desk à Apps fonctionne correctement, il est nécessaire que keycloak autorise les connexion par `identifiants client <https://datatracker.ietf.org/doc/html/rfc6749#section-4.4>`_. | ||
|
||
Vérifier que la configuration de Keycloak est correcte | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
- Se rendre la console d’administration Keycloak, dans le `realm` ``apps``. | ||
Par exemple https://auth.eole3.dev/auth/admin/master/console/#/apps | ||
- Se rendre dans la section « Clients » et sélectionner « b3desk » | ||
- Sélectionner l’onglet « Service account roles » | ||
- À cet endroit on doit voir deux lignes avec les droits ``real-management view-users`` et ``realm-management query-users``. | ||
|
||
.. image:: ../_static/keycloak-service-account-roles.png | ||
|
||
Configuration de Keycloak est correcte | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Si les droits ``real-management view-users`` et ``realm-management query-users`` ne sont pas présents, il faut les ajouter : | ||
|
||
- Cliquer sur le bouton « Assign roles », une fenêtre modale doit s’ouvrir | ||
- Cliquer sur le menu déroulant des filtres en haut à gauche, et sélectionner « Filter by clients » plutôt que « Filter by realm roles » | ||
- Dans le champ de recherche, entrer « users » et valider | ||
- Cocher « view-users » et « query-users » puis sur le bouton « Assign » |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "b3desk" | ||
version = "1.2.3" | ||
version = "1.2.4" | ||
description = "Outil de visioconférence pour les agents de l'Education Nationale et de l'Etat en général." | ||
authors = ["Your Name <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -45,7 +45,7 @@ pre-commit = "^3.1.1" | |
pytest = "^8.0.0" | ||
pytest-cov = "^5.0.0" | ||
pytest-dotenv = "^0.5.2" | ||
pytest-iam = "^0.0.9" | ||
pytest-iam = "^0.0.12" | ||
pytest-mock = "^3.11.1" | ||
wsgidav = "^4.3.1" | ||
pytest-smtpd = "^0.1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.