quickmic 1556 Posted September 15, 2018 Posted September 15, 2018 (edited) Hello With older versions of emby-kodi-plugin I was able to use a second level of authentication coming from the apache proxy. Therefore I just modified the ../userdata/addon_data/plugin.video.emby/settings.xml like that: <setting id="server" value="https://username:password@myurl:443"/> ...same to /userdata/addon_data/plugin.video.emby/data.txt / data.json Additionally I modded the database entries with the same concept. Seems that approach doesn't work any longer. I always get an authentication error reported. Can this be changed? btw, without additional authentication it works perfect fyi, I haven't tested with 3.1.15 yet. Just with 3.1.13 Edited September 15, 2018 by quickmic
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 Hmm. I don't know what would have changed? Are you able to provide your Kodi log?
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 Here is the log... auth1-kodi.log
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 This line seems to be the cause of the issue: 07:01:43.510 T:139923759806208 NOTICE: Emby.emby.core.http -> ERROR:: 401 Client Error: Unauthorized for url: https://multimedia.rms-systems.net:443/emby/system/info/public The url report, doesn't include my username and password?
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 How did you first set up? Did you sign in using emby connect, or setup a manual server or selected an already listed server?
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 (edited) manual, and I don't use the popup dialog for emby-server connection. I just edit the config files. btw, could this be cause by the emby-server itself? Should I check my settings? Edited September 15, 2018 by quickmic
sualfred 677 Posted September 15, 2018 Posted September 15, 2018 The certificate is not valid and secure. Maybe this is causing it?
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 I see... well you only need to edit data.json, for the rest... not sure.
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 (edited) Certificates should be fine. It's a cacert I'm using and I added class3 root certificates on the box/laptop/desktop and on the server site. But I check again... Edited September 15, 2018 by quickmic
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 (edited) But that might be it. Can you enable debug in the addon settings, instead of info. Is verify set to false at any point in the request while trying your secured url? Edited September 15, 2018 by Angelblue05
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 (edited) I added the class3 certificate to the proxyserver as well. I forgot that in the first place... It's better now, but still the issue appears when I try to play a video. And when I edit the data.json with my username:password, it gets overwritten. I always have to edit the file before I start kodi again. btw, At the moment I haven't modified the database directly. But I assume this is not required to play a video. Usually I trigger that sql commands: #MyMusic.db update path set strPath = replace(strPath, 'http://192.168.0.203:8096', 'https://username:password@[member="multimedia"].rms-systems.net:443') update album set strImage = replace(strImage, 'http://192.168.0.203:8096', 'https://username:password@[member="multimedia"].rms-systems.net:443') update art set url = replace(url, 'http://192.168.0.203:8096', 'https://username:password@[member="multimedia"].rms-systems.net:443') #MyVideo112.db update art set url = replace(url, 'http://192.168.0.203:8096', 'https://username:password@[member="multimedia"].rms-systems.net:443') #Textures.db update texture set url = replace(url, 'http://192.168.0.203:8096', 'https://username:password@[member="multimedia"].rms-systems.net:443') auth2-kodi.log Edited September 15, 2018 by quickmic
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 To confirm, in the addon settings > Verify connection is enabled?
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 More or less the same.. data.json/RemoteAddress is overwritten after I modified it. And still the playback issue appears. btw, what's the point of "verify connection"? I was thinking it's just a certificate verification (e.g. check for expired certificates etc.?). auth3-kodi.log
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 @@quickmic Can you try this and also, I've added additional logging to figure out where the overwrite happens... plugin.video.emby-3.1.15a.zip
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 Can you post your complete log. You are trying to play before the user id is set which is why you get this 401, so I need the full log to figure out how we got there.
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 Here it comes... auth4-kodi.log
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 Did you enable the setting verify connection? It simply validates the source of the cert. It should only be disabled if you are using a self signed certificate.
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 Yes, it's enabled at the moment.
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 (edited) I've send you the log via PM. Could it be, that the server is overwriting the setting? On server site I have the setup on the picture... I cannot add username/password in the external domain path. Actually I could, but it gets ignored. Edited September 15, 2018 by quickmic
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 (edited) Ok, the connection is working but then it gets overwritten by what's on the server. Can you add this in data.json, in the server, same level as RemoteAddress "ManualAddress" and enter that complete address with user pass. Change LastConnectionMode to 2 Edited September 15, 2018 by Angelblue05
quickmic 1556 Posted September 15, 2018 Author Posted September 15, 2018 (edited) I send you the log via PM. But I forgot to change LastConnectionMode to 2. I repeated my test with LastConnectionMode=2 but looks like the same. Please let me know if you need a new log. And I hope I got it right, I REPLACED "RemoteAddress" with "ManualAddress". Is this correct or should I add "ManualAddress"? The behavior is following after the modification. The address is no longer overwritten in data.json. On the other side, kodi asks me for a new login to the emby server. Just the emby-username not the server address. When I select my username and enter the password, nothing happens. No message e.g. like invalid password, just nothing. I think you can see it in the logs.. Edited September 15, 2018 by quickmic
Angelblue05 4131 Posted September 15, 2018 Posted September 15, 2018 For some reason when trying to send your login info, it returns an internal error on your server. So check your server logs, search "AuthenticateByName"
Solution quickmic 1556 Posted September 15, 2018 Author Solution Posted September 15, 2018 Finally I found a solution/workaround. I removed on server site "External domain" setting completely. This results in a fallback to my servers wan-IP. The I added ManualAddress as well. Now it works, but actually don't ask me why. The only difference I can see is, that the dns-name will redirected via proxy, using just the servers IP will point to the actual servers website witch is also protected. Anyway, it works now 1
Recommended Posts