Jump to content

Specific Users Password Saving


jurmb84

Recommended Posts

jurmb84

I don't know if this is by design but I found something interesting... In Emby I have multiple users... One for myself, one for my wife and one for my Kids... I have locked my kids down by checking the box "Disable access to user preferences" under advanced in the profile tab... Once that box is checked, Emby for Kodi no longer saves the password and it must be entered every time...

 

 

Link to comment
Share on other sites

Angelblue05

So you are saying that everytime you start kodi under the profile it's asking you for your Emby password?

 

Was the lock setting set before or after setting up emby for Kodi in the Kodi profile?

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

jurmb84

Here is a screenshot of Emby at the location of the setting "Disable access to user preferences"...

 

When it is checked it asks for a password everytime Kodi is started...

 

When unchecked it asks for a password only once and then remembers it for every session afterwards as expected...

 

559e724e5ad8a_userimg.png

 

Thanx for looking into this...

Edited by jurmb84
  • Like 2
Link to comment
Share on other sites

Angelblue05

Ok I'll look into it, quite strange.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

tired dad

I don't know if this is by design but I found something interesting... In Emby I have multiple users... One for myself, one for my wife and one for my Kids... I have locked my kids down by checking the box "Disable access to user preferences" under advanced in the profile tab... Once that box is checked, Emby for Kodi no longer saves the password and it must be entered every time...

I did the same with a single account, and Kodi asks for the Emby password every time as well.  As soon as the "Disable access to user preferences" is removed, it's fine.

Link to comment
Share on other sites

Angelblue05

It seems to be a server issue. @@Luke

 

The option to "disable access to user preferences" seems to prevent the retrieval of the access token? It correctly re-authenticate the user when re-entering the user's password and return the exact same token tried in the first place when getting the 401 response. Is there something wrong with the setting? 

20:53:14 T:1552  NOTICE: EMBY DownloadUtils -> logMsg : Header: {'Accept-Charset': 'UTF-8,*', 'Content-type': 'application/json', 'Accept-encoding': 'gzip', 'Authorization': 'MediaBrowser UserId="", Client="Kodi", Device="Kodi", DeviceId="C23AFA6F7F4F4A0781380CA786477963", Version="1.1.13"', 'X-MediaBrowser-Token': '805b5e95b2614b7bb4b5f9cfa2164536'}
20:53:14 T:1552  NOTICE: EMBY DownloadUtils -> logMsg : URL: http://192.168.0.190:8096/mediabrowser/Users/afdfa9843b8248a0bcb0c5372a5c99d6
20:53:14 T:1552  NOTICE: EMBY DownloadUtils -> logMsg : HTTP Error: 401 Client Error: SecurityException
2015-07-14 20:53:19.9366 Debug - HttpServer: HTTP POST http://192.168.0.190:8096/mediabrowser/Users/afdfa9843b8248a0bcb0c5372a5c99d6
	Ip: 192.168.0.189:55600. Headers: Host=192.168.0.190:8096,Content-Length=0,Accept-encoding=gzip,X-MediaBrowser-Token=805b5e95b2614b7bb4b5f9cfa2164536,Accept=*/*,User-Agent=python-requests/2.6.0 CPython/2.7.8 Windows/7,Accept-Charset=UTF-8,*,Connection=keep-alive,Content-type=application/json,Authorization=MediaBrowser UserId="", Client="Kodi", Device="Kodi", DeviceId="C23AFA6F7F4F4A0781380CA786477963", Version="1.1.13"
2015-07-14 20:53:19.9366 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
	*** Error Report ***
	Version: 3.0.5667.6
	Command line: C:\Users\Corruption\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
	Processor count: 4
	64-Bit OS: True
	64-Bit Process: False
	Program data path: C:\Users\Corruption\AppData\Roaming\MediaBrowser-Server
	Application Path: C:\Users\Corruption\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Unauthorized access.
	MediaBrowser.Controller.Net.SecurityException
	   at MediaBrowser.Api.BaseApiService.AssertCanUpdateUser(IUserManager userManager, String userId)
	   at MediaBrowser.Api.UserService.<PostAsync>d__26.MoveNext()
	
2015-07-14 20:53:19.9366 Error - HttpServer: Error processing request for /mediabrowser/Users/afdfa9843b8248a0bcb0c5372a5c99d6
	*** Error Report ***
	Version: 3.0.5667.6
	Command line: C:\Users\Corruption\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
	Processor count: 4
	64-Bit OS: True
	64-Bit Process: False
	Program data path: C:\Users\Corruption\AppData\Roaming\MediaBrowser-Server
	Application Path: C:\Users\Corruption\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Unauthorized access.
	ServiceStack.HttpError
	No Stack Trace Available
	
2015-07-14 20:53:19.9366 Debug - HttpServer: HTTP Response 401 to 192.168.0.189. Response time: 7.0004 ms.
	Url: http://192.168.0.190:8096/mediabrowser/Users/afdfa9843b8248a0bcb0c5372a5c99d6

After re-entering the password and successfully authenticating - notice the access token:

21:27:33 T:304  NOTICE: EMBY UserClient -> logMsg : Auth_Reponse: {u'ServerId': u'7e3d7e2ac0e54624829ac4e63ca067ff', u'SessionInfo': {u'UserName': u'Test', u'DeviceName': u'Kodi', u'ApplicationVersion': u'1.1.13', u'QueueableMediaTypes': [], u'LastActivityDate': u'2015-07-15T02:27:38.3284040Z', u'UserId': u'afdfa9843b8248a0bcb0c5372a5c99d6', u'SupportsRemoteControl': False, u'Client': u'Kodi', u'SupportedCommands': [u'MoveUp', u'MoveDown', u'MoveLeft', u'MoveRight', u'Select', u'Back', u'ToggleContextMenu', u'ToggleFullscreen', u'ToggleOsdMenu', u'GoHome', u'PageUp', u'NextLetter', u'GoToSearch', u'GoToSettings', u'PageDown', u'PreviousLetter', u'TakeScreenshot', u'VolumeUp', u'VolumeDown', u'ToggleMute', u'SendString', u'DisplayMessage', u'Mute', u'Unmute', u'SetVolume', u'Play', u'Playstate', u'PlayNext'], u'AdditionalUsers': [], u'PlayableMediaTypes': [u'Audio', u'Video'], u'PlayState': {u'CanSeek': False, u'IsMuted': False, u'IsPaused': False}, u'Id': u'5ad479019128b6c4a799884c3309a870', u'DeviceId': u'C23AFA6F7F4F4A0781380CA786477963'}, u'User': {u'Name': u'Test', u'HasConfiguredEasyPassword': False, u'LastActivityDate': u'2015-07-15T02:27:38.3284040Z', u'HasPassword': True, u'LastLoginDate': u'2015-07-15T02:27:38.3254039Z', u'Policy': {u'EnabledDevices': [], u'EnableMediaPlayback': True, u'EnableRemoteControlOfOtherUsers': False, u'BlockUnratedItems': [], u'EnableAllDevices': True, u'InvalidLoginAttemptCount': 0, u'EnableUserPreferenceAccess': False, u'EnableLiveTvManagement': True, u'EnableLiveTvAccess': True, u'EnableSync': True, u'IsAdministrator': False, u'EnableContentDeletion': False, u'EnabledChannels': [], u'IsDisabled': False, u'EnableSyncTranscoding': True, u'EnableAudioPlaybackTranscoding': True, u'EnableSharedDeviceControl': True, u'AccessSchedules': [], u'IsHidden': False, u'EnableContentDownloading': True, u'EnableVideoPlaybackTranscoding': True, u'EnabledFolders': [u'926fee454e2686ffee2e055ac4c268f7', u'df71f15b6993e315c5932b5fb2939e2e'], u'EnableAllChannels': False, u'BlockedTags': [], u'EnableAllFolders': False, u'EnablePublicSharing': True}, u'ServerId': u'7e3d7e2ac0e54624829ac4e63ca067ff', u'Configuration': {u'SubtitleMode': u'Default', u'DisplayChannelsWithinViews': [], u'HidePlayedInLatest': True, u'DisplayUnairedEpisodes': False, u'GroupedFolders': [], u'DisplayCollectionsView': True, u'OrderedViews': [], u'IncludeTrailersInSuggestions': True, u'PlainFolderViews': [], u'LatestItemsExcludes': [], u'EnableLocalPassword': False, u'DisplayFoldersView': False, u'EnableCinemaMode': True, u'DisplayMissingEpisodes': False, u'PlayDefaultAudioTrack': True, u'GroupMoviesIntoBoxSets': False}, u'Id': u'afdfa9843b8248a0bcb0c5372a5c99d6', u'HasConfiguredPassword': True}, u'AccessToken': u'805b5e95b2614b7bb4b5f9cfa2164536'}


Without the option enabled, it behaves normally and correctly re-uses the token without having to re-enter the password.

Edited by Angelblue05
Link to comment
Share on other sites

I'm not sure exactly what you mean. I just tested disabling user preference access for a user and was able to login to the web interface using that user. That setting shouldn't affect your ability to retrieve information, but it will prevent you from being able to update certain things, like the user record, user config,e tc.

Link to comment
Share on other sites

Angelblue05

Ok, then why when Kodi makes the following call....

Header: {'Accept-Charset': 'UTF-8,*', 'Content-type': 'application/json', 'Accept-encoding': 'gzip', 'Authorization': 'MediaBrowser UserId="", Client="Kodi", Device="Kodi", DeviceId="C23AFA6F7F4F4A0781380CA786477963", Version="1.1.13"', 'X-MediaBrowser-Token': '805b5e95b2614b7bb4b5f9cfa2164536'}

URL: http://192.168.0.190:8096/mediabrowser/Users/afdfa9843b8248a0bcb0c5372a5c99d6

does the server return 401 SecurityException error? There's nothing wrong with the call when the "Disable access to user preferences" is not enabled and the server responds correctly with 200 status. 

 

 

The issue here is not login in with the setting enabled. The issue is reusing the same api token with the setting enabled. It gives a 401 error. Then when re-login with password, it grants access with the same api token. I don't understand why it returns a 401 in the first place. Clearly the api key is still valid. Yet the server just returns "Unauthorized access".   :)

Edited by Angelblue05
Link to comment
Share on other sites

because you're sending a post to update a user record when it sounds like maybe just a get is what you want.

  • Like 1
Link to comment
Share on other sites

Angelblue05

@@Luke, OH!!! Thanks, that's exactly it! :) I totally didn't pay attention to the call itself, but the server response lol derp moment :)

Edited by Angelblue05
Link to comment
Share on other sites

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