Search code examples
oauth-2.0geoserver

GeoServer OAuth 2.0


Is anyone out there using OAuth to authenticate GeoServer users? I've been through installing and configuring this extension. I've tried Google and GitHub providers. I end up with a 404 error trying to access the login page. Same issue as here. There are no errors in the log with the debug level elevated as suggested.


Solution

  • Answering my own question here...

    For me the 404 problem solved by building from source and accounting for the required dependencies using a maven plugin. Previously, I was attempting to use the prebuilt binaries and lib/ depedencies.

    I built the modules from source (2.18.3) and modified the file maven file to copy the dependencies to the target folder, which I then copied to WEB-INF/lib.

    Here is the pom file addition I made to get the dependencies.

    <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.8</version>
            <executions>
              <execution>
                <id>copy-dependencies</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
                  <includeScope>runtime</includeScope>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>