Jump to content

apache proxy authentification


quickmic
Go to solution Solved by quickmic,

Recommended Posts

quickmic

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 by quickmic
Link to comment
Share on other sites

Angelblue05

How did you first set up? Did you sign in using emby connect, or setup a manual server or selected an already listed server?

Link to comment
Share on other sites

quickmic

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 by quickmic
Link to comment
Share on other sites

quickmic

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 by quickmic
Link to comment
Share on other sites

Angelblue05

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 by Angelblue05
Link to comment
Share on other sites

quickmic

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 by quickmic
Link to comment
Share on other sites

quickmic

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

Link to comment
Share on other sites

Angelblue05

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.

Link to comment
Share on other sites

Angelblue05

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.

Link to comment
Share on other sites

quickmic

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.

post-192535-0-94894700-1536995473_thumb.png

Edited by quickmic
Link to comment
Share on other sites

Angelblue05

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 by Angelblue05
Link to comment
Share on other sites

quickmic

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 by quickmic
Link to comment
Share on other sites

Angelblue05

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"

Link to comment
Share on other sites

  • Solution
quickmic

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 :)

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...