77import com .uid2 .shared .attest .AttestationTokenService ;
88import com .uid2 .shared .attest .IAttestationTokenService ;
99import com .uid2 .shared .attest .JwtService ;
10- import com .uid2 .shared .audit .AuditParams ;
1110import com .uid2 .shared .auth .IAuthorizableProvider ;
1211import com .uid2 .shared .auth .OperatorKey ;
1312import com .uid2 .shared .auth .Role ;
3635import java .net .URL ;
3736import java .time .Instant ;
3837import java .util .ArrayList ;
38+ import java .util .Arrays ;
3939import java .util .Collection ;
40- import java .util .List ;
4140import java .util .concurrent .atomic .AtomicReference ;
4241import java .util .stream .Collectors ;
4342
@@ -58,7 +57,6 @@ public class OptOutServiceVerticle extends AbstractVerticle {
5857 private final AtomicReference <Collection <String >> cloudPaths = new AtomicReference <>();
5958 private final ICloudStorage cloudStorage ;
6059 private final boolean enableOptOutPartnerMock ;
61- private final boolean enableAuditLogging ;
6260 private final String internalApiKey ;
6361 private final InternalAuthMiddleware internalAuth ;
6462
@@ -88,8 +86,6 @@ public OptOutServiceVerticle(Vertx vertx,
8886 this .listenPort = Const .Port .ServicePortForOptOut + Utils .getPortOffset ();
8987 this .deltaRotateInterval = jsonConfig .getInteger (Const .Config .OptOutDeltaRotateIntervalProp );
9088 this .isVerbose = jsonConfig .getBoolean (Const .Config .ServiceVerboseProp , false );
91- this .enableAuditLogging = true ;
92-
9389
9490 String replicaUrisConfig = jsonConfig .getString (Const .Config .OptOutReplicaUris );
9591 if (replicaUrisConfig == null ) {
@@ -170,11 +166,11 @@ private Router createRouter() {
170166 .allowedHeader ("Content-Type" ));
171167
172168 router .route (Endpoints .OPTOUT_WRITE .toString ())
173- .handler (internalAuth .handleWithAudit (this ::handleWrite , new AuditParams (), this . enableAuditLogging ));
169+ .handler (internalAuth .handleWithAudit (this ::handleWrite ));
174170 router .route (Endpoints .OPTOUT_REPLICATE .toString ())
175- .handler (auth .handleWithAudit (this ::handleReplicate , new AuditParams (), this . enableAuditLogging , Role .OPTOUT ));
171+ .handler (auth .handleWithAudit (this ::handleReplicate , Arrays . asList ( Role .OPTOUT ) ));
176172 router .route (Endpoints .OPTOUT_REFRESH .toString ())
177- .handler (auth .handleWithAudit (attest .handle (this ::handleRefresh , Role .OPERATOR ), new AuditParams (), this . enableAuditLogging , Role .OPERATOR ));
173+ .handler (auth .handleWithAudit (attest .handle (this ::handleRefresh , Role .OPERATOR ), Arrays . asList ( Role .OPERATOR ) ));
178174 router .get (Endpoints .OPS_HEALTHCHECK .toString ())
179175 .handler (this ::handleHealthCheck );
180176
0 commit comments