Open M-Davies opened 2 weeks ago
Thanks for sending such a detailed report! Really helpful. I'll look at it this weekend and see if I can replicate.
I have not been able to recreate the same issue yet but i did notice one thing thats not right. the environment variable needs to be just the domain. Faction will append the correct path: 'FACTION_OAUTH_CALLBACK=https://faction.internal.my.tld'
FACTION_OAUTH_CALLBACK
Thanks @summitt I still get the localhost redirect however. I'll try and dig into this a bit deeper when I have some more time
I've been trying to debug this. I'm fairly certain it's something in faction's code as the redirect_url
value seems to be coming from Faction, not authentik. I made the faction instance public (https://faction.my.tld
) and configured authentik appropriately to account for this to see if it behaves differently outside the VM. No joy though.
One thing I have noticed is there are a couple stack traces in the log immediately after starting up (docker-compose restart
):
24-Nov-2024 14:46:12.107 INFO [Thread-1] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
24-Nov-2024 14:46:12.108 INFO [Thread-1] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
24-Nov-2024 14:46:12.143 WARNING [Thread-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [cluster-ClusterId{value='67433c04e5e4c42cfa4e7b4b', description='null'}-faction-mongo:27017] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.25/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.25/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
java.base@11.0.25/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForSignalOrTimeout(DefaultServerMonitor.java:229)
com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.waitForNext(DefaultServerMonitor.java:210)
com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:157)
java.base@11.0.25/java.lang.Thread.run(Unknown Source)
24-Nov-2024 14:46:12.144 WARNING [Thread-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [CleanCursors-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.25/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.25/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
java.base@11.0.25/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
java.base@11.0.25/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.base@11.0.25/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
java.base@11.0.25/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
java.base@11.0.25/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base@11.0.25/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.base@11.0.25/java.lang.Thread.run(Unknown Source)
24-Nov-2024 14:46:12.149 INFO [Thread-1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
24-Nov-2024 14:46:12.160 INFO [Thread-1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-Nov-2024 14:46:14.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.96
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 3 2024 19:44:30 UTC
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.96.0
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.15.0-125-generic
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.25+9
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
24-Nov-2024 14:46:14.097 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
24-Nov-2024 14:46:14.098 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
24-Nov-2024 14:46:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
24-Nov-2024 14:46:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
24-Nov-2024 14:46:14.108 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.3.1] using APR version [1.7.2].
24-Nov-2024 14:46:14.108 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
24-Nov-2024 14:46:14.108 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
24-Nov-2024 14:46:14.110 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024]
24-Nov-2024 14:46:14.303 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
24-Nov-2024 14:46:14.318 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [350] milliseconds
24-Nov-2024 14:46:14.351 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-Nov-2024 14:46:14.351 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.96]
24-Nov-2024 14:46:14.362 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/ROOT.war]
24-Nov-2024 14:46:17.256 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[ERROR] 2024-11-24 14:46:17.995 [main] DefaultClassFinder - Unable to read class [com.fuse.actions.Cvss]
java.lang.IllegalArgumentException: null
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[asm-5.2.jar:5.2]
at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:461) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder.access$200(DefaultClassFinder.java:52) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.extractSuperInterfaces(DefaultClassFinder.java:514) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.visit(DefaultClassFinder.java:501) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:462) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder.access$200(DefaultClassFinder.java:52) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.extractSuperInterfaces(DefaultClassFinder.java:514) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.visit(DefaultClassFinder.java:501) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:462) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder.access$200(DefaultClassFinder.java:52) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.extractSuperInterfaces(DefaultClassFinder.java:514) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.visit(DefaultClassFinder.java:501) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:462) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder.<init>(DefaultClassFinder.java:93) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildClassFinder(PackageBasedActionConfigBuilder.java:395) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:377) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:333) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:52) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:206) [struts2-core-2.5.33.jar:2.5.33]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:970) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:244) [catalina.jar:9.0.96]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:226) [catalina.jar:9.0.96]
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:97) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3854) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4472) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:571) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:603) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1014) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1866) [catalina.jar:9.0.96]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.96]
at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source) [?:?]
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:816) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1584) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:385) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:332) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:776) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:721) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193) [catalina.jar:9.0.96]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.96]
at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source) [?:?]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:211) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:415) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:874) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.startup.Catalina.start(Catalina.java:735) [catalina.jar:9.0.96]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345) [bootstrap.jar:9.0.96]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.96]
[ERROR] 2024-11-24 14:46:18.034 [main] DefaultClassFinder - Unable to read class [com.fuse.actions.assessment.TrackChanges$1]
java.lang.IllegalArgumentException: null
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[asm-5.2.jar:5.2]
at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:461) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder.access$200(DefaultClassFinder.java:52) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.extractSuperInterfaces(DefaultClassFinder.java:514) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder$InfoBuildingVisitor.visit(DefaultClassFinder.java:501) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.2.jar:5.2]
at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:462) ~[struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.DefaultClassFinder.<init>(DefaultClassFinder.java:93) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildClassFinder(PackageBasedActionConfigBuilder.java:395) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:377) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:333) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:52) [struts2-convention-plugin-2.5.20.jar:2.5.20]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:206) [struts2-core-2.5.33.jar:2.5.33]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:970) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61) [struts2-core-2.5.33.jar:2.5.33]
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:244) [catalina.jar:9.0.96]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:226) [catalina.jar:9.0.96]
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:97) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3854) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4472) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:571) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:603) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1014) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1866) [catalina.jar:9.0.96]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.96]
at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source) [?:?]
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:816) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1584) [catalina.jar:9.0.96]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:385) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:332) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:776) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:721) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203) [catalina.jar:9.0.96]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193) [catalina.jar:9.0.96]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.96]
at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source) [?:?]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:211) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:415) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:874) [catalina.jar:9.0.96]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.96]
at org.apache.catalina.startup.Catalina.start(Catalina.java:735) [catalina.jar:9.0.96]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345) [bootstrap.jar:9.0.96]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.96]
24-Nov-2024 14:46:21.034 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/ROOT.war] has finished in [6,672] ms
24-Nov-2024 14:46:21.037 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
24-Nov-2024 14:46:21.043 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [6725] milliseconds
Is there a way to get verbose logging from Faction that spits out all the queries it makes?
Overview
I am selfhosting Faction on my cloud server and have an issue where Faction's OIDC redirection logic does not seem to redirect me to the correct callback URL.
Environement
Note all real domains have been replaced with
my.tld
and all real credentials replaced withOMITTED
for privacyhttps://auth.my.tld/application/o/faction/.well-known/openid-configuration
The faction interface itself is exposed with nginx to a network range only accessible via a Wireguard VPN range:
Error
The problem I have is with the redirect after the user has successfully authenticated to Authentik. If the configuration is identical to the above, the following error is shown after the user has authenticated to Authentik successfully:
An identical error log appears in Authentik:
This is the final URL:
https://auth.my.tld/application/o/authorize/?max_age=0&scope=openid+profile+email&display=popup&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Foauth%2Fcallback%3Fclient_name%3DOidcClient&state=0aff847c7c&code_challenge_method=S256&prompt=select_account&nonce=OMITTED&client_id=OMITTED&code_challenge=OMITTED
As you can see, the
redirect_uri
is incorrectly set to a localhost address. If I change theRedirect URIs/Origins (RegEx)
setting in Authentik to the insecure wildcard, you can see that I am redirected to an invalid localhost address:http://localhost:8080/oauth/callback?client_name=OidcClient&code=OMITTED
However, the code that I am provided is valid and I can now login to Faction if I change
http://localhost:8080
in the URL to the correcthttps://faction.internal.my.tld
. Authentik's logs also show that authentication was successful:My suspicion is that somewhere in either my Authentik or Faction settings, the
FACTION_OAUTH_CALLBACK
variable is not being honoured but I'm not 100% sure why or where. I'd appreciate a 2nd pair of eyes in discovering what I'm doing wrong. I'm also happy to send over more debugging info if it's needed. Thanks!