LINCnil / pia-back

Programme développé avec le framework RubyOnRails mettant à disposition une API RESTful à destination des outils PIA et PIA-APP. | Program developped with RubyOnRails providing a RESTful API for the PIA and PIA-APP applications.
GNU General Public License v3.0
156 stars 65 forks source link

Client id/secret settings for users #238

Open VGarath opened 7 months ago

VGarath commented 7 months ago

J'aurai besoin d'une confirmation : La façon dont l'application semble fonctionner est que chaque utilisateur doit remplir les champs dans les settings pour communiquer avec l'application back (url, id et secret). Est-ce bien le cas ? Si oui, est-ce que c'est bien logique pour une application web ?

Le truc c'est que je ne souhaite pas communiquer ces informations à mes utilisateurs et encore moins leur permettre d'accéder à la page des settings que je compte cacher d'une façon ou d'une autre (via .htaccess ou derrière un reverse proxy). Honnêtement je ne comprends pas pourquoi une application web faite pour être utilisées par un nombre indeterminé d'utilisateurs les obliges à remplir eux même les settings du serveur pour pouvoir l'utiliser ou ne serait ce que s'identifier.

Le pire c'est que ces informations sont ensuite stocker en clair dans le localstorage de leur client web, (quel secret).

Quoi qu'il en soit : Peut-on me confirmer que je suis censé faire remplir ces champs à chaques utilisateurs ? Existe-t-il une façon de pré remplir ces champs via un fichier de conf, (.env, ...) ? Est-ce que ce fonctionnement sera revu prochainement ?

I need a clarification about the settings : The way it seems to work as of now is that each users is supposed to fill the back end settings : url, client id and client secret ? Is that the case ? If so, doesn't it beat the purpose of a web app purpose down to the ground ?

The thing is, i don't want to communicate the client id and secret to my users. In fact i don't want them to even access the settings page which i'd hide one way or another, (be it with .htaccess rules or url rewrite through a reverse proxy...). To be honest what i don't understand why a multi users web application needs its users to fill settings field themselves to be able to authenticate themselves and use the application.

What's even less understable is that the client id and secret are stored in clear in the localStorage of the user client...

All in all : Can someone confirm that every user needs to fill themselves those values ? If there is a way to prefill those with a conf or .env file can you tell me where i shall use it ? Will it be worked on to make it automatic in the near future ?

kevin-atnos commented 7 months ago

Hello @VGarath,

Thank you very much for your feedback!

Indeed, that's how the CNIL designed the process for the multi-users authentication module: All the people that you want to "join" your collaborative space have to fill the Back URL, client ID and client SECRET.

I agree it's a bit strange and not the best for administrators, and also users. This was already pointed out by some other users and that's something we have disccused with the CNIL to see if we can change this someday. Nothing confirmed yet.

Also, keep in mind it is an open-source project, so if anyone is willing to participate in this change / feature, it's absolutely possible.

Regards,