hjone72 / ldap-for-plex Goto Github PK
View Code? Open in Web Editor NEWAn LDAP server that uses Plex as the provider.
An LDAP server that uses Plex as the provider.
This is really cool (!).
Plex now supports different authentication methods (such as google, facebook etc).
How does it work for a user that has registered using one of those methods? I can see that they still show up in your script with their email, but it's a little bit uncertain what their password would be.
Any clue if it works with sub or airsonic?
LDAP URL: ldap://192.168.2.20:2389/ou=users,o=plex.tv
LDAP Search Filter: (cn={0})
Doesn't work. Neither does the sub/airsonic example which is:
LDAP URL | dap://192.168.2.20:2389/ou=users,dc=plex,dc=tv
LDAP search filter | (sAMAccountName={0})
LDAP manager DN | cn=admin,dc=plex,dc=tv
Any clue which I would have to use? I'm getting this after restarting airsonic:
2018-02-27 10:53:17.841 INFO --- org.airsonic.player.Application : Starting Application v10.1.1-RELEASE on b78f0f42bec8 with PID 54 (/opt/airsonic/airsonic.war started by nobody in /)
2018-02-27 10:53:17,848 DEBG 'start-script' stdout output:
2018-02-27 10:53:17.848 INFO --- org.airsonic.player.Application : The following profiles are active: legacy
2018-02-27 10:53:21,234 DEBG 'start-script' stdout output:
2018-02-27 10:53:21.233 INFO --- o.a.p.service.SettingsService : Java: 1.8.0_152, OS: Linux
2018-02-27 10:53:31,073 DEBG 'start-script' stdout output:
2018-02-27 10:53:31.072 ERROR --- o.s.b.c.e.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'jwtAuthenticationFilter' defined in class path resource \[org/airsonic/player/security/GlobalSecurityConfig$ExtSecurityConfiguration.class\]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate \[org.airsonic.player.security.JWTRequestParameterProcessingFilter\]: Factory method 'jwtAuthFilter' threw exception; nested exception is java.lang.IllegalStateException: managerPassword is required if managerDn is supplied
2018-02-27 10:53:31,125 DEBG 'start-script' stdout output:
2018-02-27 10:53:31.125 WARN --- ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2018-02-27 10:53:31,150 DEBG 'start-script' stdout output:
2018-02-27 10:53:31.148 ERROR --- o.s.boot.SpringApplication : Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~\[spring-context-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) \[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.airsonic.player.Application.main(Application.java:218) \[classes!/:10.1.1-RELEASE\]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~\[na:1.8.0_152\]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~\[na:1.8.0_152\]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~\[na:1.8.0_152\]
at java.lang.reflect.Method.invoke(Method.java:498) ~\[na:1.8.0_152\]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) \[airsonic.war:10.1.1-RELEASE\]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) \[airsonic.war:10.1.1-RELEASE\]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) \[airsonic.war:10.1.1-RELEASE\]
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) \[airsonic.war:10.1.1-RELEASE\]
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:123) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:84) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
... 15 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtAuthenticationFilter' defined in class path resource \[org/airsonic/player/security/GlobalSecurityConfig$ExtSecurityConfiguration.class\]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate \[org.airsonic.player.security.JWTRequestParameterProcessingFilter\]: Factory method 'jwtAuthFilter' threw exception; nested exception is java.lang.IllegalStateException: managerPassword is required if managerDn is supplied
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:182) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:177) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:159) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:80) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55) ~\[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE\]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) ~\[tomcat-embed-core-8.5.23.jar!/:8.5.23\]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~\[tomcat-embed-core-8.5.23.jar!/:8.5.23\]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) ~\[tomcat-embed-core-8.5.23.jar!/:8.5.23\]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) ~\[tomcat-embed-core-8.5.23.jar!/:8.5.23\]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~\[na:1.8.0_152\]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~\[na:1.8.0_152\]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~\[na:1.8.0_152\]
at java.lang.Thread.run(Thread.java:748) ~\[na:1.8.0_152\]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate \[org.airsonic.player.security.JWTRequestParameterProcessingFilter\]: Factory method 'jwtAuthFilter' threw exception; nested exception is java.lang.IllegalStateException: managerPassword is required if managerDn is supplied
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
... 26 common frames omitted
Caused by: java.lang.IllegalStateException: managerPassword is required if managerDn is supplied
at org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer$ContextSourceBuilder.build(LdapAuthenticationProviderConfigurer.java:545) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer$ContextSourceBuilder.access$500(LdapAuthenticationProviderConfigurer.java:447) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer.getContextSource(LdapAuthenticationProviderConfigurer.java:607) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer.build(LdapAuthenticationProviderConfigurer.java:77) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer.configure(LdapAuthenticationProviderConfigurer.java:391) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer.configure(LdapAuthenticationProviderConfigurer.java:59) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.configure(AbstractConfiguredSecurityBuilder.java:384) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:330) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration.getAuthenticationManager(AuthenticationConfiguration.java:105) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.authenticationManager(WebSecurityConfigurerAdapter.java:262) ~\[spring-security-config-4.2.3.RELEASE.jar!/:4.2.3.RELEASE\]
at org.airsonic.player.security.GlobalSecurityConfig$ExtSecurityConfiguration.jwtAuthFilter(GlobalSecurityConfig.java:83) ~\[classes!/:10.1.1-RELEASE\]
at org.airsonic.player.security.GlobalSecurityConfig$ExtSecurityConfiguration$$EnhancerBySpringCGLIB$$19629938.CGLIB$jwtAuthFilter$0(<generated>) ~\[classes!/:10.1.1-RELEASE\]
at org.airsonic.player.security.GlobalSecurityConfig$ExtSecurityConfiguration$$EnhancerBySpringCGLIB$$19629938$$FastClassBySpringCGLIB$$37e39c31.invoke(<generated>) ~\[classes!/:10.1.1-RELEASE\]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~\[spring-core-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~\[spring-context-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
at org.airsonic.player.security.GlobalSecurityConfig$ExtSecurityConfiguration$$EnhancerBySpringCGLIB$$19629938.jwtAuthFilter(<generated>) ~\[classes!/:10.1.1-RELEASE\]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~\[na:1.8.0_152\]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~\[na:1.8.0_152\]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~\[na:1.8.0_152\]
at java.lang.reflect.Method.invoke(Method.java:498) ~\[na:1.8.0_152\]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~\[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE\]
... 27 common frames omitted
2018-02-27 10:53:31,325 DEBG fd 8 closed, stopped monitoring <POutputDispatcher at 22890020392184 for <Subprocess at 22890020392472 with name start-script in state RUNNING> (stdout)>
2018-02-27 10:53:31,326 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 22890010785984 for <Subprocess at 22890020392472 with name start-script in state RUNNING> (stderr)>
2018-02-27 10:53:31,326 INFO exited: start-script (exit status 1; not expected)
2018-02-27 10:53:31,327 DEBG received SIGCLD indicating a child quit
Hi,
i would like so if it's work with komga ?
https://komga.org/installation/oauth2.html#advanced-configuration
Thanks
Hello,
My ldapsearch requests are coming up empty, and I see nothing beyond the initial load in the logs. I'm using the docker container, and options being passed to ldap-for-plex are:
/opt/LDAP-for-Plex/config # cat options.json
{
"debug": true,
"port": 2389,
"host": "0.0.0.0",
"rootDN": "ou=users, o=plex.tv",
"plexToken": "[removed]",
"plexMachineID": "ba28a71e-74a2-4957-b36c-59960c3bb1c9",
"plexServerName": "RanchoGrande"
}
ldapsearch seems to be making the connection, but doesn't find anything whether or not I include filters (included in the example below)
ldapsearch -x -P 2 -H 'ldap://localhost:2389' 'ou=users,o=plex.tv'
# extended LDIF
#
# LDAPv2
# base <> (default) with scope subtree
# filter: ou=users,o=plex.tv
# requesting: ALL
#
# search result
search: 2
result: 32 No such object
text: No tree found for:
# numResponses: 1
Am I doing something wrong?
I'm trying to use my Plex LDAP server and integrate it into a wordpress plugin so that my shared users can login to a webpage using their plex credentials.
The plugin is asking for the following:
Service Account DN:
Specify the Service Account DN(distinguished Name) of the LDAP server.
Service Account Password:
Password for the Service Account in the LDAP Server.
Thank you
Received this upon startup, please advise.
[email protected] start /opt/LDAP-for-Plex
node LDAPPlex.js
Preloading Plex users...
(node:603) UnhandledPromiseRejectionWarning: undefined
(Use node --trace-warnings ...
to show where the warning was created)
(node:603) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:603) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
┌──────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R
└──────────────────────────────────────────────┘
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.