This category is for general issues(=something is broken) regarding YunoHost, NOT apps.
on
This form is written in English but feel free to write in French if you’re more comfortable!
on
What type of hardware are you using
Old laptop or computer
What YunoHost version are you running
12.1.40.1
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?
N
Describe your issue
Hello yunoword !
I got problems with the SSO, and more precisely, with one app. I guess there is something wrong in my domains settings.
What I did / was done :
I installed yunohost on my PC
I set a main domain on subdomain.nohost.me
I set a secondary domain on mydomain.tld
I added a subdomain like snappymail.mydomain.tld
I installed snappymail on that last domain
I got an error I didn’t noticed at first on updating the config of snappymail.mydomain.tld
I changed the main domain of my server to mydomain.tld
From now, I got problems with snappymail. When I log in to the portal on mydomain.tld, then click on the snappymail tile, I get to a page telling me “Access denied − Disallowed Sec-Fetch Dest: document Mode: navigate Site: same-site User: true”. There is a “reload” link below that get me to the snappymail login page (I got to re-authenticate). Then I get in snappymail, but I can’t send an email, because of : “Failed to add recipient ‘someone@somemail.com’:553 5.7.1 myself@mydomain.tld: Sender adress rejected: not logged in” error message.
If I try to use an account like myself@snappymail.mydomain.tld, it seems to work. That is not what I wan’t, nor what I expected. In the admin panel of snappymail, I set mydomain.tld as the domain and as the default login domain.
Moreover : after that, when I log out of snappymail, I got the the portal (SSO log in page), disconnected, but with the URL of subdomain.nohost.me which is not my main domain. And I am still logged in on the mydomain.tld page.
All this is pretty confusing and annoying. I’d like to understand how all theses domains things work.
I could add that I succesfully installed another app (Nextcloud) on nextcloud.mydomain.tld with no problem. SSO works good.
Don’t hesitate to ask for more info if you feel like you could help.
Have a good day to all !
Alex
PS : I add the log of the error on the update of the snappymail domain
Tu gardes des traces de ton ancien domaine principal dans ta configuration snappymail (regarde par exemple dans /var/www/snappymail/app/data/_data_/_default_/configs/application.ini).Ce ne doit pas être la seule.
Le plus simple me semble de réinstaller l’application.
Le changement de la ligne custom_logout_link m’a permis de remettre en place un comportement normal à la déconnexion. Bravo otm33.
J’ai aussi pu corriger le problème d’envoi de messages, c’était une erreur de config de ma part dans le panneau d’admin (je n’avais pas coché la case ‘Use authentication’ dans les paramètres SMTP du domaine).
Il me reste ce problème d’authentification au moment d’appeler l’app depuis le portail. Je ne sais pas si ça pourrait être du à un résidu de config du premier domaine en nohost.me ou si c’est du à une autre erreur de config.
Quelqu’un aurait une piste pour diagnostiquer ce qu’il se passe au moment où j’essaie de me connecter par le SSO ?
Effectivement, ça marche comme un charme. Merci bien de ton aide.
J’aimerais quand même comprendre ce qu’il se passe : ceci indique à l’app snappymail d’accepter les requêtes http demandant un document et émanant d’un autre sous-domaine du même domaine c’est bien ça ? C’est donc en théorie un affaiblissement de la politique de sécurité par défaut si je comprends bien.
Ce qui m’interpelle, c’est que cela n’a a priori pas à voir avec le changement de domaine principal du nohost.me vers le mondomain.tld, mais plutôt avec le fait que le sso est sur un autre sous-domaine que l’appli snappymail. Sinon il m’aurait fallu mettre “cross-site” à la place de “same-site” n’est-ce pas ? Ce qui signifie a priori que même en réinstallant l’appli, j’aurais eu le même problème, à cause du fait que j’ai installé snappymail sur un sous-domaine de mon domaine principal.
Si mon analyse est bonne, est-ce que ce ne serait pas quelque chose à signaler aux développeurs de yunohost ? les deux corrections (celle du logout après un changement de domaine et celle-ci) me paraissent utiles à corriger, non ? Quelle est la bonne marche à suivre.
Et j’aurais une dernière question pour ma culture : comment se fait-il que les changements faits dans le application.ini soient pris en compte immédiatement ? J’aurais imaginé qu’il aurait fallu relancer l’appli snappymail à chaque fois.
Les deux sont considérés “same_site” (car même nom de domaine)
En gros, c’est une application php : elle répond aux requêtes du serveur à la demande. Généralement, elle relit les fichiers (code et configurations) à la requête/ au rechargement d’une page. Dans certains cas, les modifications du code de l’application peuvent demander de recharger php.
Je me suis mal exprimé,j’avais (en gros) compris la signification du same-site, un peu plus permissif que same-origin. Ce qui me fait penser que, à partir du moment ou snappymail est installé sur un sous-domaine, même sur une installation yunohost “propre” (c’est-à-dire sans changement du domaine principal après l’installation de l’app) ce paramètre sera à corriger manuellement dans le application.ini, n’est-ce pas ? C’est ce point que je voulais signaler aux développeurs.
Bref, dans tous les cas, merci pour ces réponses, qui m’ont permis de comprendre mieux ce qui se passe sur mon serveur, et de le faire fonctionner comme attendu !