Skip to content

Introduce AuthToken rotation and session auth support #1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
273 changes: 273 additions & 0 deletions bundle/pom.xml.versionsBackup
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver-parent</artifactId>
<version>5.7-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>neo4j-java-driver-all</artifactId>

<packaging>jar</packaging>
<name>Neo4j Java Driver (shaded package)</name>
<description>Access to the Neo4j graph database through Java</description>
<url>https://github.com/neo4j/neo4j-java-driver</url>

<properties>
<moduleName>org.neo4j.driver</moduleName>
<rootDir>${project.basedir}/..</rootDir>
<maven.compiler.xlint.extras>,-try</maven.compiler.xlint.extras>
<maven.deploy.skip>false</maven.deploy.skip>
</properties>

<dependencies>
<!-- The original driver that will be repackaged. -->
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>

<!-- Optional and / or provided dependencies, as they are not transitive to the original driver they must be declared again. -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
</dependency>

<!-- As we pretend the driver being provided only, we need be explicit about the one dependency we actually didn't shade. -->
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalOptions combine.children="append">
<option>--add-exports org.graalvm.sdk/com.oracle.svm.core.annotate=org.neo4j.driver</option>
</additionalOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Extract the original sources again -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-appCtx</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/generated-sources/neo4j-java-driver</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${rootDir}/driver/src/main/java</directory>
<includes>
<include>**\/*.java</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Attach them -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-original-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/neo4j-java-driver</source>
</sources>
</configuration>
</execution>
<execution>
<id>set-osgi-version</id>
<phase>validate</phase>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<index>true</index>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<packageName>org/neo4j/driver</packageName>
</manifest>
<manifestEntries>
<!-- This is used to programmatically determine the driver version -->
<Implementation-Version>${project.version}-${build.revision}</Implementation-Version>
<!-- Stable module name for JDK9 automatic modules -->
<Automatic-Module-Name>${moduleName}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>io.netty:*</include>
<include>io.projectreactor:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.neo4j.driver.internal.shaded.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>reactor</pattern>
<shadedPattern>org.neo4j.driver.internal.shaded.reactor</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>io.netty:*</artifact>
<excludes>
<exclude>META-INF/native-image/**</exclude>
</excludes>
</filter>
<filter>
<artifact>${groupId}:${artifactId}</artifact>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</filter>
</filters>
<shadeTestJar>true</shadeTestJar>
<createSourcesJar>true</createSourcesJar>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>add-module-info-to-sources</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<unzip src="${project.build.directory}/${artifactId}-${version}-sources.jar" dest="${project.build.directory}/sources-with-module"/>
<copy file="${project.basedir}/src/main/jpms/module-info.java" tofile="${project.build.directory}/sources-with-module/module-info.java" />
<zip basedir="${project.build.directory}/sources-with-module" destfile="${project.build.directory}/${artifactId}-${version}-sources.jar"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<overwriteExistingFiles>true</overwriteExistingFiles>
<module>
<moduleInfoFile>
${basedir}/src/main/jpms/module-info.java
</moduleInfoFile>
</module>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<scm>
<connection>scm:git:git://github.com/neo4j/neo4j-java-driver.git</connection>
<developerConnection>scm:git:[email protected]:neo4j/neo4j-java-driver.git</developerConnection>
<url>https://github.com/neo4j/neo4j-java-driver</url>
</scm>

</project>
30 changes: 30 additions & 0 deletions driver/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -538,4 +538,34 @@
<to>java/lang/Enum</to>
</difference>

<difference>
<className>org/neo4j/driver/Driver</className>
<differenceType>7012</differenceType>
<method>org.neo4j.driver.BaseSession session(java.lang.Class, org.neo4j.driver.AuthToken)</method>
</difference>

<difference>
<className>org/neo4j/driver/Driver</className>
<differenceType>7012</differenceType>
<method>org.neo4j.driver.BaseSession session(java.lang.Class, org.neo4j.driver.SessionConfig, org.neo4j.driver.AuthToken)</method>
</difference>

<difference>
<className>org/neo4j/driver/Driver</className>
<differenceType>7012</differenceType>
<method>boolean verifyAuthentication(org.neo4j.driver.AuthToken)</method>
</difference>

<difference>
<className>org/neo4j/driver/Driver</className>
<differenceType>7012</differenceType>
<method>boolean supportsSessionAuth()</method>
</difference>

<difference>
<className>org/neo4j/driver/AuthToken</className>
<differenceType>7012</differenceType>
<method>org.neo4j.driver.AuthTokenAndExpiration expiringAt(long)</method>
</difference>

</differences>
Loading