Skip to content

Commit

Permalink
Revert "Another attempt at 5.23 compat for the signature change in lo…
Browse files Browse the repository at this point in the history
…gin context"

This reverts commit f804d1ffe8b1433dd1583189df05b38a695cceb1.
  • Loading branch information
knutwalker committed Aug 12, 2024
1 parent 4cd7d92 commit ea5817d
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 228 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,9 +39,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.KernelTransaction;
Expand Down Expand Up @@ -284,26 +280,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(IdLookup idLookup, String s, AbstractSecurityLog abstractSecurityLog) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,9 +39,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.KernelTransaction;
Expand Down Expand Up @@ -292,26 +288,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(IdLookup idLookup, String s, AbstractSecurityLog abstractSecurityLog) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,9 +39,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.KernelTransaction;
Expand Down Expand Up @@ -292,26 +288,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(IdLookup idLookup, String s, AbstractSecurityLog abstractSecurityLog) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,9 +39,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.KernelTransaction;
Expand Down Expand Up @@ -294,26 +290,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(IdLookup idLookup, String s, AbstractSecurityLog abstractSecurityLog) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,9 +39,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.CypherScope;
Expand Down Expand Up @@ -297,26 +293,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(IdLookup idLookup, String s, AbstractSecurityLog abstractSecurityLog) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,9 +39,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.CypherScope;
Expand Down Expand Up @@ -297,26 +293,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, startNodeReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(IdLookup idLookup, String s, AbstractSecurityLog abstractSecurityLog) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.neo4j.configuration.Config;
import org.neo4j.exceptions.KernelException;
import org.neo4j.gds.compat.CompatLoginContext;
import org.neo4j.gds.compat.GlobalProcedureRegistry;
import org.neo4j.gds.compat.Neo4jProxyApi;
import org.neo4j.gds.compat.Write;
Expand All @@ -40,15 +39,11 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.AbstractSecurityLog;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.CypherScope;
import org.neo4j.kernel.api.KernelTransaction;
import org.neo4j.kernel.api.procedure.GlobalProcedures;
import org.neo4j.kernel.database.PrivilegeDatabaseReference;
import org.neo4j.logging.internal.LogService;
import org.neo4j.procedure.Mode;
import org.neo4j.scheduler.JobScheduler;
Expand Down Expand Up @@ -298,30 +293,4 @@ public void relationshipProperties(
) {
read.relationshipProperties(relationshipReference, startNodeReference, reference, selection, cursor);
}

@Override
public LoginContext loginContext(CompatLoginContext compatLoginContext) {
final class LoginContextImpl extends LoginContext {
private final SecurityContext securityContext;

private LoginContextImpl(CompatLoginContext compatLoginContext) {
super(
compatLoginContext.subject(),
compatLoginContext.connectionInfo()
);
this.securityContext = compatLoginContext.securityContext();
}

@Override
public SecurityContext authorize(
IdLookup idLookup,
PrivilegeDatabaseReference privilegeDatabaseReference,
AbstractSecurityLog abstractSecurityLog
) {
return this.securityContext;
}
}

return new LoginContextImpl(compatLoginContext);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.neo4j.internal.kernel.api.procs.ProcedureSignature;
import org.neo4j.internal.kernel.api.procs.QualifiedName;
import org.neo4j.internal.kernel.api.procs.UserFunctionSignature;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.layout.DatabaseLayout;
import org.neo4j.kernel.api.KernelTransaction;
Expand Down Expand Up @@ -157,7 +156,4 @@ Estimates knownEstimates(
long sizeOfRelationshipProperties,
long numberOfNodeLabels
);

@CompatSince(minor = 23)
LoginContext loginContext(CompatLoginContext compatLoginContext);
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
import org.neo4j.internal.kernel.api.security.AccessMode;
import org.neo4j.internal.kernel.api.security.AuthSubject;
import org.neo4j.internal.kernel.api.security.AuthenticationResult;
import org.neo4j.internal.kernel.api.security.LoginContext;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.internal.recordstorage.RecordIdType;
import org.neo4j.io.fs.FileSystemAbstraction;
Expand Down Expand Up @@ -486,10 +485,6 @@ public static String versionLongToString(long storeVersion) {
return new String(result);
}

public static LoginContext loginContext(CompatLoginContext compatLoginContext) {
return IMPL.loginContext(compatLoginContext);
}

public static TestLog testLog() {
return new TestLogImpl();
}
Expand Down

0 comments on commit ea5817d

Please sign in to comment.