diff --git a/.checkstyle/HEADER b/.checkstyle/HEADER new file mode 100644 index 000000000..eaa97d791 --- /dev/null +++ b/.checkstyle/HEADER @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ \ No newline at end of file diff --git a/.checkstyle/checkstyle.xml b/.checkstyle/checkstyle.xml index 32c0f31ea..b276e084a 100644 --- a/.checkstyle/checkstyle.xml +++ b/.checkstyle/checkstyle.xml @@ -2,20 +2,6 @@ - - - @@ -24,20 +10,21 @@ - - + + + + + - + - - @@ -49,7 +36,15 @@ + + + + + + + + COMPACT_CTOR_DEF, LITERAL_SWITCH"/> @@ -379,4 +374,4 @@ - + \ No newline at end of file diff --git a/.github/workflows/hotfix.yml b/.github/workflows/hotfix.yml index 62a625706..33effcb0f 100644 --- a/.github/workflows/hotfix.yml +++ b/.github/workflows/hotfix.yml @@ -9,6 +9,7 @@ on: jobs: create-branch: + name: Create Branch runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: @@ -18,7 +19,7 @@ jobs: fetch-depth: 0 token: ${{ secrets.CI_CD_TOKEN }} - - name: Create hotfix branch + - name: Create branch run: | START_TAG=v${{ github.event.inputs.tag_version }} echo "Start from tag $START_TAG" diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e3cc120dd..635494171 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -8,6 +8,7 @@ on: jobs: build: + name: Build runs-on: ubuntu-latest steps: - name: Checkout project diff --git a/.github/workflows/push_master.yml b/.github/workflows/push_master.yml index 832dc1b37..8a3caba75 100644 --- a/.github/workflows/push_master.yml +++ b/.github/workflows/push_master.yml @@ -7,6 +7,7 @@ on: jobs: build: + name: Build runs-on: ubuntu-latest steps: - name: Docker login diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15c47b762..5dbe5ce0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: jobs: build: + name: Release runs-on: ubuntu-latest steps: - name: Docker login diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 1b1154758..ef755d3b3 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -9,6 +9,7 @@ on: jobs: tag: + name: Tag runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/hotfix/v') steps: diff --git a/build.gradle b/build.gradle index eb25c119b..f73fbbd61 100644 --- a/build.gradle +++ b/build.gradle @@ -126,10 +126,11 @@ test { } checkstyle { - toolVersion = '10.12.3' + toolVersion = '10.12.4' configFile = file(".checkstyle/checkstyle.xml") ignoreFailures = false maxErrors = 0 maxWarnings = 0 + configDirectory = file(".checkstyle") } diff --git a/src/main/java/com/michelin/ns4kafka/Application.java b/src/main/java/com/michelin/ns4kafka/Application.java index 182a61ecb..fe55770fc 100644 --- a/src/main/java/com/michelin/ns4kafka/Application.java +++ b/src/main/java/com/michelin/ns4kafka/Application.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka; import io.micronaut.openapi.annotation.OpenAPIInclude; diff --git a/src/main/java/com/michelin/ns4kafka/controller/AkhqClaimProviderController.java b/src/main/java/com/michelin/ns4kafka/controller/AkhqClaimProviderController.java index b7fc6009a..c7a1eacad 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/AkhqClaimProviderController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/AkhqClaimProviderController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import com.michelin.ns4kafka.model.AccessControlEntry; diff --git a/src/main/java/com/michelin/ns4kafka/controller/ApiResourcesController.java b/src/main/java/com/michelin/ns4kafka/controller/ApiResourcesController.java index 1772b9b20..77998fb8b 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/ApiResourcesController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/ApiResourcesController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import com.michelin.ns4kafka.repository.RoleBindingRepository; diff --git a/src/main/java/com/michelin/ns4kafka/controller/ConnectorController.java b/src/main/java/com/michelin/ns4kafka/controller/ConnectorController.java index d6d605ddc..9f94e1d49 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/ConnectorController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/ConnectorController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidOwner; @@ -223,9 +242,9 @@ public Mono>> bulkDelete(String namespace, // Validate ownership List validationErrors = connectors.stream() - .filter(connector -> !connectorService.isNamespaceOwnerOfConnect(ns, connector.getMetadata().getName())) - .map(connector -> invalidOwner(connector.getMetadata().getName())) - .toList(); + .filter(connector -> !connectorService.isNamespaceOwnerOfConnect(ns, connector.getMetadata().getName())) + .map(connector -> invalidOwner(connector.getMetadata().getName())) + .toList(); if (!validationErrors.isEmpty()) { return Mono.error(new ResourceValidationException(CONNECTOR, name, validationErrors)); @@ -240,11 +259,11 @@ public Mono>> bulkDelete(String namespace, } return Flux.fromIterable(connectors) - .flatMap(connector -> { - sendEventLog(connector, ApplyStatus.deleted, connector.getSpec(), null, EMPTY_STRING); - return connectorService.delete(ns, connector); - }) - .then(Mono.just(HttpResponse.ok(connectors))); + .flatMap(connector -> { + sendEventLog(connector, ApplyStatus.deleted, connector.getSpec(), null, EMPTY_STRING); + return connectorService.delete(ns, connector); + }) + .then(Mono.just(HttpResponse.ok(connectors))); } /** diff --git a/src/main/java/com/michelin/ns4kafka/controller/ConsumerGroupController.java b/src/main/java/com/michelin/ns4kafka/controller/ConsumerGroupController.java index bdf8c5184..cb2378bad 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/ConsumerGroupController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/ConsumerGroupController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidConsumerGroupOperation; diff --git a/src/main/java/com/michelin/ns4kafka/controller/ExceptionHandlerController.java b/src/main/java/com/michelin/ns4kafka/controller/ExceptionHandlerController.java index 5babcd8a3..ab6676a71 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/ExceptionHandlerController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/ExceptionHandlerController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import com.michelin.ns4kafka.model.Status; diff --git a/src/main/java/com/michelin/ns4kafka/controller/NamespaceController.java b/src/main/java/com/michelin/ns4kafka/controller/NamespaceController.java index e98452c7d..4c157fe1f 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/NamespaceController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/NamespaceController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidImmutableValue; diff --git a/src/main/java/com/michelin/ns4kafka/controller/RoleBindingController.java b/src/main/java/com/michelin/ns4kafka/controller/RoleBindingController.java index 4572f0e7b..ce8ae036d 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/RoleBindingController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/RoleBindingController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static io.micronaut.core.util.StringUtils.EMPTY_STRING; @@ -40,7 +59,7 @@ public class RoleBindingController extends NamespacedResourceController { * List role bindings by namespace, filtered by name parameter. * * @param namespace The namespace - * @param name The name parameter + * @param name The name parameter * @return A list of role bindings */ @Get @@ -166,11 +185,11 @@ public HttpResponse> bulkDelete(String namespace, roleBindings.forEach(roleBinding -> { sendEventLog( - roleBinding, - ApplyStatus.deleted, - roleBinding.getSpec(), - null, - EMPTY_STRING + roleBinding, + ApplyStatus.deleted, + roleBinding.getSpec(), + null, + EMPTY_STRING ); roleBindingService.delete(roleBinding); }); diff --git a/src/main/java/com/michelin/ns4kafka/controller/SchemaController.java b/src/main/java/com/michelin/ns4kafka/controller/SchemaController.java index 0b321b7e0..bf570a927 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/SchemaController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/SchemaController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidOwner; @@ -58,9 +77,9 @@ public Flux list(String namespace, @QueryValue(defaultValue = "*") Strin .collectList() .flatMapMany(schemas -> schemas.size() == 1 ? Flux.fromIterable(schemas - .stream() - .map(schema -> schemaService.getSubjectLatestVersion(ns, schema.getMetadata().getName())) - .toList()).flatMap(schema -> schema) + .stream() + .map(schema -> schemaService.getSubjectLatestVersion(ns, schema.getMetadata().getName())) + .toList()).flatMap(schema -> schema) : Flux.fromIterable(schemas)); } @@ -157,10 +176,10 @@ public Mono> apply(String namespace, /** * Delete all schema versions or a specific schema version if specified, under all given subjects. * - * @param namespace The namespace - * @param name The subject name parameter - * @param versionOptional The version of the schemas to delete - * @param dryrun Run in dry mode or not? + * @param namespace The namespace + * @param name The subject name parameter + * @param versionOptional The version of the schemas to delete + * @param dryrun Run in dry mode or not? * @return A HTTP response */ @Delete @@ -197,17 +216,17 @@ public Mono>> bulkDelete(String namespace, .flatMap(schema -> (versionOptional.isEmpty() ? schemaService.deleteAllVersions(ns, schema.getMetadata().getName()) : schemaService.deleteVersion(ns, schema.getMetadata().getName(), versionOptional.get())) - .flatMap(deletedVersionIds -> { - sendEventLog( - schema, - ApplyStatus.deleted, - schema.getSpec(), - null, - versionOptional.map(v -> String.valueOf(deletedVersionIds)) - .orElse(EMPTY_STRING) - ); - return Mono.just(HttpResponse.noContent()); - })) + .flatMap(deletedVersionIds -> { + sendEventLog( + schema, + ApplyStatus.deleted, + schema.getSpec(), + null, + versionOptional.map(v -> String.valueOf(deletedVersionIds)) + .orElse(EMPTY_STRING) + ); + return Mono.just(HttpResponse.noContent()); + })) .then(Mono.just(HttpResponse.ok(schemas))); }); } @@ -215,10 +234,10 @@ public Mono>> bulkDelete(String namespace, /** * Delete all schema versions or a specific schema version if specified, under the given subject. * - * @param namespace The namespace - * @param subject The subject - * @param versionOptional The version of the schema to delete - * @param dryrun Run in dry mode or not? + * @param namespace The namespace + * @param subject The subject + * @param versionOptional The version of the schema to delete + * @param dryrun Run in dry mode or not? * @return A HTTP response * @deprecated use {@link #bulkDelete(String, String, Optional, boolean)} instead. */ diff --git a/src/main/java/com/michelin/ns4kafka/controller/StreamController.java b/src/main/java/com/michelin/ns4kafka/controller/StreamController.java index c5d8289bb..8b6dbf57d 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/StreamController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/StreamController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidOwner; @@ -184,11 +203,11 @@ HttpResponse> bulkDelete(String namespace, kafkaStreams.forEach(kafkaStream -> { sendEventLog( - kafkaStream, - ApplyStatus.deleted, - kafkaStream.getMetadata(), - null, - EMPTY_STRING + kafkaStream, + ApplyStatus.deleted, + kafkaStream.getMetadata(), + null, + EMPTY_STRING ); streamService.delete(ns, kafkaStream); diff --git a/src/main/java/com/michelin/ns4kafka/controller/UserController.java b/src/main/java/com/michelin/ns4kafka/controller/UserController.java index f1700158b..68d70665f 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/UserController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/UserController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidKafkaUser; diff --git a/src/main/java/com/michelin/ns4kafka/controller/acl/AclController.java b/src/main/java/com/michelin/ns4kafka/controller/acl/AclController.java index 49bc9e4c0..bf3ee08fe 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/acl/AclController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/acl/AclController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.acl; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidAclDeleteOnlyAdmin; diff --git a/src/main/java/com/michelin/ns4kafka/controller/acl/AclNonNamespacedController.java b/src/main/java/com/michelin/ns4kafka/controller/acl/AclNonNamespacedController.java index 6b6d1bb4d..1fbd06b8e 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/acl/AclNonNamespacedController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/acl/AclNonNamespacedController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.acl; import com.michelin.ns4kafka.controller.generic.NonNamespacedResourceController; diff --git a/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java b/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java index fb46e6f8f..acc90236f 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.connect; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidConnectClusterDeleteOperation; @@ -53,7 +72,7 @@ public class ConnectClusterController extends NamespacedResourceController { * List Kafka Connect clusters by namespace, filtered by name parameter. * * @param namespace The namespace - * @param name The name parameter + * @param name The name parameter * @return A list of Kafka Connect clusters */ @Get @@ -187,9 +206,9 @@ public HttpResponse delete(String namespace, /** * Delete Kafka Connect clusters. * - * @param namespace The current namespace - * @param name The name parameter - * @param dryrun Run in dry mode or not + * @param namespace The current namespace + * @param name The name parameter + * @param dryrun Run in dry mode or not * @return A HTTP response */ @Delete diff --git a/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterNonNamespacedController.java b/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterNonNamespacedController.java index 7fd89b3f7..ed3c4d422 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterNonNamespacedController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterNonNamespacedController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.connect; import com.michelin.ns4kafka.controller.generic.NonNamespacedResourceController; diff --git a/src/main/java/com/michelin/ns4kafka/controller/generic/NamespacedResourceController.java b/src/main/java/com/michelin/ns4kafka/controller/generic/NamespacedResourceController.java index d5db89433..82eef99b4 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/generic/NamespacedResourceController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/generic/NamespacedResourceController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.generic; import com.michelin.ns4kafka.model.Namespace; diff --git a/src/main/java/com/michelin/ns4kafka/controller/generic/NonNamespacedResourceController.java b/src/main/java/com/michelin/ns4kafka/controller/generic/NonNamespacedResourceController.java index f3e939d27..9ad89833d 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/generic/NonNamespacedResourceController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/generic/NonNamespacedResourceController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.generic; /** diff --git a/src/main/java/com/michelin/ns4kafka/controller/generic/ResourceController.java b/src/main/java/com/michelin/ns4kafka/controller/generic/ResourceController.java index 7a4eb0e33..58fdf0a0a 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/generic/ResourceController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/generic/ResourceController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.generic; import static io.micronaut.core.util.StringUtils.EMPTY_STRING; @@ -7,7 +26,6 @@ import com.michelin.ns4kafka.security.ResourceBasedSecurityRule; import com.michelin.ns4kafka.util.enumation.ApplyStatus; import io.micronaut.context.event.ApplicationEventPublisher; -import io.micronaut.core.util.StringUtils; import io.micronaut.http.HttpResponse; import io.micronaut.security.utils.SecurityService; import jakarta.inject.Inject; diff --git a/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java b/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java index 9b5dccb9c..34a596a83 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.quota; import static io.micronaut.core.util.StringUtils.EMPTY_STRING; diff --git a/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaNonNamespacedController.java b/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaNonNamespacedController.java index 973fd00b0..bcf7cd77e 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaNonNamespacedController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaNonNamespacedController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.quota; import com.michelin.ns4kafka.controller.generic.NonNamespacedResourceController; diff --git a/src/main/java/com/michelin/ns4kafka/controller/topic/TopicController.java b/src/main/java/com/michelin/ns4kafka/controller/topic/TopicController.java index 44e0d007e..4bc14e7c9 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/topic/TopicController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/topic/TopicController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.topic; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidNotFound; diff --git a/src/main/java/com/michelin/ns4kafka/controller/topic/TopicNonNamespacedController.java b/src/main/java/com/michelin/ns4kafka/controller/topic/TopicNonNamespacedController.java index bf5bbd47f..dd56acc36 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/topic/TopicNonNamespacedController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/topic/TopicNonNamespacedController.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller.topic; import com.michelin.ns4kafka.controller.generic.NonNamespacedResourceController; diff --git a/src/main/java/com/michelin/ns4kafka/log/ConsoleLogListener.java b/src/main/java/com/michelin/ns4kafka/log/ConsoleLogListener.java index dc484f227..5b76ab919 100644 --- a/src/main/java/com/michelin/ns4kafka/log/ConsoleLogListener.java +++ b/src/main/java/com/michelin/ns4kafka/log/ConsoleLogListener.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.log; import static io.micronaut.core.util.StringUtils.EMPTY_STRING; diff --git a/src/main/java/com/michelin/ns4kafka/log/KafkaLogListener.java b/src/main/java/com/michelin/ns4kafka/log/KafkaLogListener.java index 7d9573acb..5bb19276a 100644 --- a/src/main/java/com/michelin/ns4kafka/log/KafkaLogListener.java +++ b/src/main/java/com/michelin/ns4kafka/log/KafkaLogListener.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.log; import com.michelin.ns4kafka.model.AuditLog; diff --git a/src/main/java/com/michelin/ns4kafka/log/KafkaLogProducer.java b/src/main/java/com/michelin/ns4kafka/log/KafkaLogProducer.java index 2aed8ce35..009508e00 100644 --- a/src/main/java/com/michelin/ns4kafka/log/KafkaLogProducer.java +++ b/src/main/java/com/michelin/ns4kafka/log/KafkaLogProducer.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.log; import com.michelin.ns4kafka.model.AuditLog; diff --git a/src/main/java/com/michelin/ns4kafka/model/AccessControlEntry.java b/src/main/java/com/michelin/ns4kafka/model/AccessControlEntry.java index 787109078..c7b24fc99 100644 --- a/src/main/java/com/michelin/ns4kafka/model/AccessControlEntry.java +++ b/src/main/java/com/michelin/ns4kafka/model/AccessControlEntry.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.ACCESS_CONTROL_ENTRY; diff --git a/src/main/java/com/michelin/ns4kafka/model/AuditLog.java b/src/main/java/com/michelin/ns4kafka/model/AuditLog.java index c3e3bb75f..799489b0c 100644 --- a/src/main/java/com/michelin/ns4kafka/model/AuditLog.java +++ b/src/main/java/com/michelin/ns4kafka/model/AuditLog.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/src/main/java/com/michelin/ns4kafka/model/DeleteRecordsResponse.java b/src/main/java/com/michelin/ns4kafka/model/DeleteRecordsResponse.java index dcc3d6ac1..223aedf6c 100644 --- a/src/main/java/com/michelin/ns4kafka/model/DeleteRecordsResponse.java +++ b/src/main/java/com/michelin/ns4kafka/model/DeleteRecordsResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.DELETE_RECORDS_RESPONSE; diff --git a/src/main/java/com/michelin/ns4kafka/model/KafkaStream.java b/src/main/java/com/michelin/ns4kafka/model/KafkaStream.java index eb3babc66..618c49387 100644 --- a/src/main/java/com/michelin/ns4kafka/model/KafkaStream.java +++ b/src/main/java/com/michelin/ns4kafka/model/KafkaStream.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.KAFKA_STREAM; diff --git a/src/main/java/com/michelin/ns4kafka/model/KafkaUserResetPassword.java b/src/main/java/com/michelin/ns4kafka/model/KafkaUserResetPassword.java index 2363c93bf..fb3ed2978 100644 --- a/src/main/java/com/michelin/ns4kafka/model/KafkaUserResetPassword.java +++ b/src/main/java/com/michelin/ns4kafka/model/KafkaUserResetPassword.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.KAFKA_USER_RESET_PASSWORD; diff --git a/src/main/java/com/michelin/ns4kafka/model/Metadata.java b/src/main/java/com/michelin/ns4kafka/model/Metadata.java index 4508323c9..bdf454479 100644 --- a/src/main/java/com/michelin/ns4kafka/model/Metadata.java +++ b/src/main/java/com/michelin/ns4kafka/model/Metadata.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.security.ResourceBasedSecurityRule.RESOURCE_PATTERN; diff --git a/src/main/java/com/michelin/ns4kafka/model/MetadataResource.java b/src/main/java/com/michelin/ns4kafka/model/MetadataResource.java index 075e46148..a172bc2ea 100644 --- a/src/main/java/com/michelin/ns4kafka/model/MetadataResource.java +++ b/src/main/java/com/michelin/ns4kafka/model/MetadataResource.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import com.michelin.ns4kafka.util.enumation.Kind; diff --git a/src/main/java/com/michelin/ns4kafka/model/Namespace.java b/src/main/java/com/michelin/ns4kafka/model/Namespace.java index c17d6b8ed..3ec6b0b6d 100644 --- a/src/main/java/com/michelin/ns4kafka/model/Namespace.java +++ b/src/main/java/com/michelin/ns4kafka/model/Namespace.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.NAMESPACE; diff --git a/src/main/java/com/michelin/ns4kafka/model/Resource.java b/src/main/java/com/michelin/ns4kafka/model/Resource.java index 928644d36..fe926c35f 100644 --- a/src/main/java/com/michelin/ns4kafka/model/Resource.java +++ b/src/main/java/com/michelin/ns4kafka/model/Resource.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import com.michelin.ns4kafka.util.enumation.Kind; diff --git a/src/main/java/com/michelin/ns4kafka/model/RoleBinding.java b/src/main/java/com/michelin/ns4kafka/model/RoleBinding.java index ba74ed79d..6e5acc52f 100644 --- a/src/main/java/com/michelin/ns4kafka/model/RoleBinding.java +++ b/src/main/java/com/michelin/ns4kafka/model/RoleBinding.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.ROLE_BINDING; diff --git a/src/main/java/com/michelin/ns4kafka/model/Status.java b/src/main/java/com/michelin/ns4kafka/model/Status.java index 9ee1af540..6ca31e513 100644 --- a/src/main/java/com/michelin/ns4kafka/model/Status.java +++ b/src/main/java/com/michelin/ns4kafka/model/Status.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.STATUS; diff --git a/src/main/java/com/michelin/ns4kafka/model/Topic.java b/src/main/java/com/michelin/ns4kafka/model/Topic.java index b2a9066b9..a3556dd28 100644 --- a/src/main/java/com/michelin/ns4kafka/model/Topic.java +++ b/src/main/java/com/michelin/ns4kafka/model/Topic.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static com.michelin.ns4kafka.util.enumation.Kind.TOPIC; diff --git a/src/main/java/com/michelin/ns4kafka/model/connect/cluster/ConnectCluster.java b/src/main/java/com/michelin/ns4kafka/model/connect/cluster/ConnectCluster.java index 09f3b0015..9b8a2f9ca 100644 --- a/src/main/java/com/michelin/ns4kafka/model/connect/cluster/ConnectCluster.java +++ b/src/main/java/com/michelin/ns4kafka/model/connect/cluster/ConnectCluster.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.connect.cluster; import static com.michelin.ns4kafka.util.enumation.Kind.CONNECT_CLUSTER; diff --git a/src/main/java/com/michelin/ns4kafka/model/connect/cluster/VaultResponse.java b/src/main/java/com/michelin/ns4kafka/model/connect/cluster/VaultResponse.java index f6d96cd7c..88e137c7d 100644 --- a/src/main/java/com/michelin/ns4kafka/model/connect/cluster/VaultResponse.java +++ b/src/main/java/com/michelin/ns4kafka/model/connect/cluster/VaultResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.connect.cluster; import static com.michelin.ns4kafka.util.enumation.Kind.VAULT_RESPONSE; diff --git a/src/main/java/com/michelin/ns4kafka/model/connector/ChangeConnectorState.java b/src/main/java/com/michelin/ns4kafka/model/connector/ChangeConnectorState.java index 319d9d620..005a2500d 100644 --- a/src/main/java/com/michelin/ns4kafka/model/connector/ChangeConnectorState.java +++ b/src/main/java/com/michelin/ns4kafka/model/connector/ChangeConnectorState.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.connector; import static com.michelin.ns4kafka.util.enumation.Kind.CHANGE_CONNECTOR_STATE; diff --git a/src/main/java/com/michelin/ns4kafka/model/connector/Connector.java b/src/main/java/com/michelin/ns4kafka/model/connector/Connector.java index bf601302c..ba8c5c96a 100644 --- a/src/main/java/com/michelin/ns4kafka/model/connector/Connector.java +++ b/src/main/java/com/michelin/ns4kafka/model/connector/Connector.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.connector; import static com.michelin.ns4kafka.util.enumation.Kind.CONNECTOR; diff --git a/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsets.java b/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsets.java index 418191832..16acd1e92 100644 --- a/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsets.java +++ b/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsets.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.consumer.group; import static com.michelin.ns4kafka.util.enumation.Kind.CONSUMER_GROUP_RESET_OFFSET; diff --git a/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsetsResponse.java b/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsetsResponse.java index 4424be7b8..8760188a0 100644 --- a/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsetsResponse.java +++ b/src/main/java/com/michelin/ns4kafka/model/consumer/group/ConsumerGroupResetOffsetsResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.consumer.group; import static com.michelin.ns4kafka.util.enumation.Kind.CONSUMER_GROUP_RESET_OFFSET_RESPONSE; diff --git a/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuota.java b/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuota.java index a9b841718..d76c6a136 100644 --- a/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuota.java +++ b/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuota.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.quota; import static com.michelin.ns4kafka.util.enumation.Kind.RESOURCE_QUOTA; diff --git a/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuotaResponse.java b/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuotaResponse.java index 89aa9244d..789a17eed 100644 --- a/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuotaResponse.java +++ b/src/main/java/com/michelin/ns4kafka/model/quota/ResourceQuotaResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.quota; import static com.michelin.ns4kafka.util.enumation.Kind.RESOURCE_QUOTA_RESPONSE; diff --git a/src/main/java/com/michelin/ns4kafka/model/schema/Schema.java b/src/main/java/com/michelin/ns4kafka/model/schema/Schema.java index 2d48a6352..1fc9c9e54 100644 --- a/src/main/java/com/michelin/ns4kafka/model/schema/Schema.java +++ b/src/main/java/com/michelin/ns4kafka/model/schema/Schema.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.schema; import static com.michelin.ns4kafka.util.enumation.Kind.SCHEMA; diff --git a/src/main/java/com/michelin/ns4kafka/model/schema/SchemaCompatibilityState.java b/src/main/java/com/michelin/ns4kafka/model/schema/SchemaCompatibilityState.java index 208b6f145..a262885f4 100644 --- a/src/main/java/com/michelin/ns4kafka/model/schema/SchemaCompatibilityState.java +++ b/src/main/java/com/michelin/ns4kafka/model/schema/SchemaCompatibilityState.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model.schema; import static com.michelin.ns4kafka.util.enumation.Kind.SCHEMA_COMPATIBILITY_STATE; diff --git a/src/main/java/com/michelin/ns4kafka/property/AkhqProperties.java b/src/main/java/com/michelin/ns4kafka/property/AkhqProperties.java index cfc9dbab4..b29ea0506 100644 --- a/src/main/java/com/michelin/ns4kafka/property/AkhqProperties.java +++ b/src/main/java/com/michelin/ns4kafka/property/AkhqProperties.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.property; import com.michelin.ns4kafka.model.AccessControlEntry; diff --git a/src/main/java/com/michelin/ns4kafka/property/ConfluentCloudProperties.java b/src/main/java/com/michelin/ns4kafka/property/ConfluentCloudProperties.java index 5350ec2df..536cd8fd3 100644 --- a/src/main/java/com/michelin/ns4kafka/property/ConfluentCloudProperties.java +++ b/src/main/java/com/michelin/ns4kafka/property/ConfluentCloudProperties.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.property; import io.micronaut.context.annotation.ConfigurationProperties; diff --git a/src/main/java/com/michelin/ns4kafka/property/KafkaStoreProperties.java b/src/main/java/com/michelin/ns4kafka/property/KafkaStoreProperties.java index 9ee27ad83..47fd7184f 100644 --- a/src/main/java/com/michelin/ns4kafka/property/KafkaStoreProperties.java +++ b/src/main/java/com/michelin/ns4kafka/property/KafkaStoreProperties.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.property; import io.micronaut.context.annotation.ConfigurationProperties; diff --git a/src/main/java/com/michelin/ns4kafka/property/ManagedClusterProperties.java b/src/main/java/com/michelin/ns4kafka/property/ManagedClusterProperties.java index 12e99f74e..b42dbc98e 100644 --- a/src/main/java/com/michelin/ns4kafka/property/ManagedClusterProperties.java +++ b/src/main/java/com/michelin/ns4kafka/property/ManagedClusterProperties.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.property; import io.micronaut.context.annotation.ConfigurationProperties; diff --git a/src/main/java/com/michelin/ns4kafka/property/SecurityProperties.java b/src/main/java/com/michelin/ns4kafka/property/SecurityProperties.java index 50c183594..0d0898366 100644 --- a/src/main/java/com/michelin/ns4kafka/property/SecurityProperties.java +++ b/src/main/java/com/michelin/ns4kafka/property/SecurityProperties.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.property; import com.michelin.ns4kafka.security.auth.local.LocalUser; diff --git a/src/main/java/com/michelin/ns4kafka/repository/AccessControlEntryRepository.java b/src/main/java/com/michelin/ns4kafka/repository/AccessControlEntryRepository.java index 5b159322b..ea84a538f 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/AccessControlEntryRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/AccessControlEntryRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.AccessControlEntry; diff --git a/src/main/java/com/michelin/ns4kafka/repository/ConnectClusterRepository.java b/src/main/java/com/michelin/ns4kafka/repository/ConnectClusterRepository.java index 9afac70f0..c45f5d9c2 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/ConnectClusterRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/ConnectClusterRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.connect.cluster.ConnectCluster; diff --git a/src/main/java/com/michelin/ns4kafka/repository/ConnectorRepository.java b/src/main/java/com/michelin/ns4kafka/repository/ConnectorRepository.java index 73a5f81d1..375c741ae 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/ConnectorRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/ConnectorRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.connector.Connector; diff --git a/src/main/java/com/michelin/ns4kafka/repository/NamespaceRepository.java b/src/main/java/com/michelin/ns4kafka/repository/NamespaceRepository.java index adb4452a0..3e8a67b8d 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/NamespaceRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/NamespaceRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.Namespace; diff --git a/src/main/java/com/michelin/ns4kafka/repository/ResourceQuotaRepository.java b/src/main/java/com/michelin/ns4kafka/repository/ResourceQuotaRepository.java index fa6f948d5..1f0ddb505 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/ResourceQuotaRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/ResourceQuotaRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.quota.ResourceQuota; diff --git a/src/main/java/com/michelin/ns4kafka/repository/RoleBindingRepository.java b/src/main/java/com/michelin/ns4kafka/repository/RoleBindingRepository.java index 8aa087fd3..10473d9c7 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/RoleBindingRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/RoleBindingRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.RoleBinding; diff --git a/src/main/java/com/michelin/ns4kafka/repository/StreamRepository.java b/src/main/java/com/michelin/ns4kafka/repository/StreamRepository.java index 926ae26bb..675f6b6e9 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/StreamRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/StreamRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.KafkaStream; diff --git a/src/main/java/com/michelin/ns4kafka/repository/TopicRepository.java b/src/main/java/com/michelin/ns4kafka/repository/TopicRepository.java index 9bee49149..98068b5e5 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/TopicRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/TopicRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository; import com.michelin.ns4kafka.model.Topic; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/DelayStartupListener.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/DelayStartupListener.java index 6a80d24c6..e21a15603 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/DelayStartupListener.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/DelayStartupListener.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import io.micronaut.context.event.ApplicationEventListener; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaAccessControlEntryRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaAccessControlEntryRepository.java index 69110e6dd..ad80c05f3 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaAccessControlEntryRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaAccessControlEntryRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.AccessControlEntry; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectClusterRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectClusterRepository.java index fe6bf2958..9ac779149 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectClusterRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectClusterRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.connect.cluster.ConnectCluster; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectorRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectorRepository.java index 25a6ac5d1..fcf746789 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectorRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaConnectorRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.connector.Connector; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaNamespaceRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaNamespaceRepository.java index df854295b..4958481d1 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaNamespaceRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaNamespaceRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.Namespace; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaResourceQuotaRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaResourceQuotaRepository.java index 39c48e4bf..1b4a33138 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaResourceQuotaRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaResourceQuotaRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.quota.ResourceQuota; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaRoleBindingRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaRoleBindingRepository.java index 880e0fd86..fb4ea6923 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaRoleBindingRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaRoleBindingRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.RoleBinding; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStore.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStore.java index 8dd2aa722..9074c8201 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStore.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStore.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.property.KafkaStoreProperties; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStoreException.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStoreException.java index f08339b42..b457aa747 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStoreException.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStoreException.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; /** diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStreamRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStreamRepository.java index 187ccea75..1e7522c9b 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStreamRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaStreamRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.KafkaStream; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaTopicRepository.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaTopicRepository.java index 2f7b5171b..00dd89c50 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaTopicRepository.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/KafkaTopicRepository.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.repository.kafka; import com.michelin.ns4kafka.model.Topic; diff --git a/src/main/java/com/michelin/ns4kafka/repository/kafka/package-info.java b/src/main/java/com/michelin/ns4kafka/repository/kafka/package-info.java index 001a203ca..a195db2b4 100644 --- a/src/main/java/com/michelin/ns4kafka/repository/kafka/package-info.java +++ b/src/main/java/com/michelin/ns4kafka/repository/kafka/package-info.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + @Configuration @Requires(property = "ns4kafka.store.kafka.enabled", notEquals = StringUtils.FALSE) package com.michelin.ns4kafka.repository.kafka; diff --git a/src/main/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRule.java b/src/main/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRule.java index 9cf148107..3d43da52c 100644 --- a/src/main/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRule.java +++ b/src/main/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRule.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security; import static com.michelin.ns4kafka.security.auth.JwtCustomClaimNames.ROLE_BINDINGS; diff --git a/src/main/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacement.java b/src/main/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacement.java index 6ffd8975d..2f3ffc161 100644 --- a/src/main/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacement.java +++ b/src/main/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacement.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security; import static com.michelin.ns4kafka.security.ResourceBasedSecurityRule.IS_ADMIN; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationArgumentBinder.java b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationArgumentBinder.java index 3d303c560..55a588ff7 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationArgumentBinder.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationArgumentBinder.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import io.micronaut.core.convert.ArgumentConversionContext; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationInfo.java b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationInfo.java index a42b6e4b9..80e57581c 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationInfo.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationInfo.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import static com.michelin.ns4kafka.security.auth.JwtCustomClaimNames.ROLE_BINDINGS; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationRoleBinding.java b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationRoleBinding.java index 7fc19b93d..204b0bc3d 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationRoleBinding.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationRoleBinding.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import com.michelin.ns4kafka.model.RoleBinding; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationService.java b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationService.java index 9da7968c2..b65a6b5ae 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationService.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/AuthenticationService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import static com.michelin.ns4kafka.security.auth.JwtCustomClaimNames.ROLE_BINDINGS; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/JwtCustomClaimNames.java b/src/main/java/com/michelin/ns4kafka/security/auth/JwtCustomClaimNames.java index 82e986050..b24018105 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/JwtCustomClaimNames.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/JwtCustomClaimNames.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import lombok.AccessLevel; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabApiClient.java b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabApiClient.java index d6d141659..03d29dbb4 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabApiClient.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabApiClient.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.gitlab; import io.micronaut.http.HttpResponse; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProvider.java b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProvider.java index 160c15f51..0b7572bcd 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProvider.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProvider.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.gitlab; import com.michelin.ns4kafka.security.auth.AuthenticationService; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationService.java b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationService.java index 48b3e6d91..e9538e500 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationService.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.gitlab; import io.micronaut.core.util.StringUtils; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/package-info.java b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/package-info.java index f37a7710f..36b496a50 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/package-info.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/gitlab/package-info.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + @Configuration @Requires(property = "micronaut.security.gitlab.enabled", notEquals = StringUtils.FALSE) package com.michelin.ns4kafka.security.auth.gitlab; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapper.java b/src/main/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapper.java index 28f8b924e..05bc2b576 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapper.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapper.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.ldap; import com.michelin.ns4kafka.security.auth.AuthenticationService; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUser.java b/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUser.java index cfbb4eff3..15ff51789 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUser.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUser.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.local; import io.micronaut.core.annotation.Introspected; diff --git a/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProvider.java b/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProvider.java index f8bc620a4..7f85f1df8 100644 --- a/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProvider.java +++ b/src/main/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProvider.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.local; import com.michelin.ns4kafka.property.SecurityProperties; diff --git a/src/main/java/com/michelin/ns4kafka/service/AclService.java b/src/main/java/com/michelin/ns4kafka/service/AclService.java index 8b7ad7d01..0a7ae653c 100644 --- a/src/main/java/com/michelin/ns4kafka/service/AclService.java +++ b/src/main/java/com/michelin/ns4kafka/service/AclService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidAclCollision; diff --git a/src/main/java/com/michelin/ns4kafka/service/ConnectClusterService.java b/src/main/java/com/michelin/ns4kafka/service/ConnectClusterService.java index c9da3e638..cab371946 100644 --- a/src/main/java/com/michelin/ns4kafka/service/ConnectClusterService.java +++ b/src/main/java/com/michelin/ns4kafka/service/ConnectClusterService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidConnectClusterEncryptionConfig; @@ -283,7 +302,7 @@ public Mono> validateConnectClusterCreation(ConnectCluster connectC /** * Validate the given connect worker has configuration for vault. * - * @param namespace The namespace + * @param namespace The namespace * @param connectClusterName The Kafka connect worker to validate * @return A list of validation errors */ diff --git a/src/main/java/com/michelin/ns4kafka/service/ConnectorService.java b/src/main/java/com/michelin/ns4kafka/service/ConnectorService.java index beb1ad9ab..77fe6a393 100644 --- a/src/main/java/com/michelin/ns4kafka/service/ConnectorService.java +++ b/src/main/java/com/michelin/ns4kafka/service/ConnectorService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidConnectorConnectCluster; diff --git a/src/main/java/com/michelin/ns4kafka/service/ConsumerGroupService.java b/src/main/java/com/michelin/ns4kafka/service/ConsumerGroupService.java index 257fc79e4..feda84889 100644 --- a/src/main/java/com/michelin/ns4kafka/service/ConsumerGroupService.java +++ b/src/main/java/com/michelin/ns4kafka/service/ConsumerGroupService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidConsumerGroupDatetime; diff --git a/src/main/java/com/michelin/ns4kafka/service/NamespaceService.java b/src/main/java/com/michelin/ns4kafka/service/NamespaceService.java index 201062772..a72d196bf 100644 --- a/src/main/java/com/michelin/ns4kafka/service/NamespaceService.java +++ b/src/main/java/com/michelin/ns4kafka/service/NamespaceService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidNamespaceNoCluster; diff --git a/src/main/java/com/michelin/ns4kafka/service/ResourceQuotaService.java b/src/main/java/com/michelin/ns4kafka/service/ResourceQuotaService.java index 4b3b55f31..f05f34cd0 100644 --- a/src/main/java/com/michelin/ns4kafka/service/ResourceQuotaService.java +++ b/src/main/java/com/michelin/ns4kafka/service/ResourceQuotaService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.model.quota.ResourceQuota.ResourceQuotaSpecKey.COUNT_CONNECTORS; diff --git a/src/main/java/com/michelin/ns4kafka/service/RoleBindingService.java b/src/main/java/com/michelin/ns4kafka/service/RoleBindingService.java index 1000ddcd0..0d4f8c8a4 100644 --- a/src/main/java/com/michelin/ns4kafka/service/RoleBindingService.java +++ b/src/main/java/com/michelin/ns4kafka/service/RoleBindingService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import com.michelin.ns4kafka.model.RoleBinding; @@ -65,7 +84,7 @@ public Optional findByName(String namespace, String name) { .filter(t -> t.getMetadata().getName().equals(name)) .findFirst(); } - + /** * Delete a role binding. * diff --git a/src/main/java/com/michelin/ns4kafka/service/SchemaService.java b/src/main/java/com/michelin/ns4kafka/service/SchemaService.java index 47ff396f8..3e5b8df85 100644 --- a/src/main/java/com/michelin/ns4kafka/service/SchemaService.java +++ b/src/main/java/com/michelin/ns4kafka/service/SchemaService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidSchemaReference; @@ -109,8 +128,8 @@ public Flux getAllSubjectVersions(Namespace namespace, String subject) { /** * Build the schema spec from the SchemaResponse. * - * @param namespace The namespace - * @param subjectOptional The subject object from Http response + * @param namespace The namespace + * @param subjectOptional The subject object from Http response * @return A Subject */ public Mono buildSchemaSpec(Namespace namespace, SchemaResponse subjectOptional) { @@ -205,7 +224,7 @@ public Mono> validateSchema(Namespace namespace, Schema schema) { private Mono> validateReferences(Namespace ns, Schema schema) { return Flux.fromIterable(schema.getSpec().getReferences()) .flatMap(reference -> getSubjectByVersion(ns, reference.getSubject(), - String.valueOf(reference.getVersion())) + String.valueOf(reference.getVersion())) .map(Optional::of) .defaultIfEmpty(Optional.empty()) .mapNotNull(schemaOptional -> { @@ -266,7 +285,7 @@ public Mono deleteVersion(Namespace namespace, String subject, String v .flatMap(softDeletedVersionIds -> schemaRegistryClient .deleteSubjectVersion(namespace.getMetadata().getCluster(), subject, Integer.toString(softDeletedVersionIds), true) - ); + ); } /** diff --git a/src/main/java/com/michelin/ns4kafka/service/StreamService.java b/src/main/java/com/michelin/ns4kafka/service/StreamService.java index f8f8ced84..054118fb5 100644 --- a/src/main/java/com/michelin/ns4kafka/service/StreamService.java +++ b/src/main/java/com/michelin/ns4kafka/service/StreamService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import com.michelin.ns4kafka.model.AccessControlEntry; @@ -44,7 +63,7 @@ public List findAllForNamespace(Namespace namespace) { * Find all Kafka Streams of a given namespace, filtered by name parameter. * * @param namespace The namespace - * @param name The name filter + * @param name The name filter * @return A list of Kafka Streams */ public List findByWildcardName(Namespace namespace, String name) { diff --git a/src/main/java/com/michelin/ns4kafka/service/TopicService.java b/src/main/java/com/michelin/ns4kafka/service/TopicService.java index 31926346f..a55809a70 100644 --- a/src/main/java/com/michelin/ns4kafka/service/TopicService.java +++ b/src/main/java/com/michelin/ns4kafka/service/TopicService.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidImmutableValue; @@ -76,7 +95,7 @@ public List findAllForNamespace(Namespace namespace) { * Find all topics of a given namespace, filtered by name parameter. * * @param namespace The namespace - * @param name The name filter + * @param name The name filter * @return A list of topics */ public List findByWildcardName(Namespace namespace, String name) { diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/KafkaConnectClient.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/KafkaConnectClient.java index 3510e1ff0..47dcd92ff 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/KafkaConnectClient.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/KafkaConnectClient.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.connect; import com.michelin.ns4kafka.model.connect.cluster.ConnectCluster; @@ -64,7 +83,7 @@ public Mono> version(String kafkaCluster, String connec KafkaConnectHttpConfig config = getKafkaConnectConfig(kafkaCluster, connectCluster); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), "/"))) + URI.create(StringUtils.prependUri(config.getUrl(), "/"))) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.exchange(request, ServerInfo.class)); @@ -105,8 +124,8 @@ public Mono validate(String kafkaCluster, String encodedConnectorClass = URLEncoder.encode(connectorClass, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.PUT( - URI.create(StringUtils.prependUri(config.getUrl(), - "/connector-plugins/" + encodedConnectorClass + "/config/validate")), + URI.create(StringUtils.prependUri(config.getUrl(), + "/connector-plugins/" + encodedConnectorClass + "/config/validate")), connectorSpecs) .basicAuth(config.getUsername(), config.getPassword()); @@ -130,8 +149,8 @@ public Mono createOrUpdate(String kafkaCluster, String encodedConnector = URLEncoder.encode(connector, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.PUT( - URI.create(StringUtils.prependUri(config.getUrl(), - CONNECTORS + encodedConnector + "/config")), + URI.create(StringUtils.prependUri(config.getUrl(), + CONNECTORS + encodedConnector + "/config")), connectorSpecs) .basicAuth(config.getUsername(), config.getPassword()); @@ -151,8 +170,8 @@ public Mono> delete(String kafkaCluster, String connectCluste String encodedConnector = URLEncoder.encode(connector, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.DELETE( - URI.create(StringUtils.prependUri(config.getUrl(), - CONNECTORS + encodedConnector))) + URI.create(StringUtils.prependUri(config.getUrl(), + CONNECTORS + encodedConnector))) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.exchange(request, Void.class)); @@ -169,8 +188,8 @@ public Mono> connectPlugins(String kafkaCluster, Strin KafkaConnectHttpConfig config = getKafkaConnectConfig(kafkaCluster, connectCluster); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), - "/connector-plugins"))) + URI.create(StringUtils.prependUri(config.getUrl(), + "/connector-plugins"))) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.retrieve(request, Argument.listOf(ConnectorPluginInfo.class))); @@ -189,8 +208,8 @@ public Mono status(String kafkaCluster, String connectCluste String encodedConnector = URLEncoder.encode(connector, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), - CONNECTORS + encodedConnector + "/status"))) + URI.create(StringUtils.prependUri(config.getUrl(), + CONNECTORS + encodedConnector + "/status"))) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.retrieve(request, ConnectorStateInfo.class)); @@ -210,8 +229,8 @@ public Mono> restart(String kafkaCluster, String connectClust String encodedConnector = URLEncoder.encode(connector, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.POST( - URI.create(StringUtils.prependUri(config.getUrl(), - CONNECTORS + encodedConnector + "/tasks/" + taskId + "/restart")), null) + URI.create(StringUtils.prependUri(config.getUrl(), + CONNECTORS + encodedConnector + "/tasks/" + taskId + "/restart")), null) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.exchange(request, Void.class)); @@ -230,8 +249,8 @@ public Mono> pause(String kafkaCluster, String connectCluster String encodedConnector = URLEncoder.encode(connector, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.PUT( - URI.create(StringUtils.prependUri(config.getUrl(), - CONNECTORS + encodedConnector + "/pause")), null) + URI.create(StringUtils.prependUri(config.getUrl(), + CONNECTORS + encodedConnector + "/pause")), null) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.exchange(request, Void.class)); @@ -250,8 +269,8 @@ public Mono> resume(String kafkaCluster, String connectCluste String encodedConnector = URLEncoder.encode(connector, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.PUT( - URI.create(StringUtils.prependUri(config.getUrl(), - CONNECTORS + encodedConnector + "/resume")), null) + URI.create(StringUtils.prependUri(config.getUrl(), + CONNECTORS + encodedConnector + "/resume")), null) .basicAuth(config.getUsername(), config.getPassword()); return Mono.from(httpClient.exchange(request, Void.class)); diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfo.java index 4e388376b..5d10ec5a4 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfos.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfos.java index 1a4c18b6a..35c5c4ad7 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfos.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigInfos.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigKeyInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigKeyInfo.java index a4bb4d2ae..ceb2ae275 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigKeyInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigKeyInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigValueInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigValueInfo.java index 98faf38cb..4d077e399 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigValueInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConfigValueInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorInfo.java index cb48c706e..2e35ba303 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorPluginInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorPluginInfo.java index 58942a13d..f46f47416 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorPluginInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorPluginInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorSpecs.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorSpecs.java index c010dca83..2b53c349b 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorSpecs.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorSpecs.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.connect.entities; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStateInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStateInfo.java index d639aa458..4890c984c 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStateInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStateInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStatus.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStatus.java index 38b907b45..63400fc5c 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStatus.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorStatus.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.connect.entities; /** diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorTaskId.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorTaskId.java index 341091a72..5a7061230 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorTaskId.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorTaskId.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorType.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorType.java index 6ebd4bb9b..bd9333b4b 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorType.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ConnectorType.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ServerInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ServerInfo.java index 312031bca..63f52d9e7 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ServerInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/connect/entities/ServerInfo.java @@ -1,18 +1,20 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package com.michelin.ns4kafka.service.client.connect.entities; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/SchemaRegistryClient.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/SchemaRegistryClient.java index 6c2579bf6..b9acb568a 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/SchemaRegistryClient.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/SchemaRegistryClient.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema; import com.michelin.ns4kafka.property.ManagedClusterProperties; @@ -77,8 +96,8 @@ public Mono getSubject(String kafkaCluster, String subject, Stri String encodedVersion = URLEncoder.encode(version, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), - SUBJECTS + encodedSubject + VERSIONS + encodedVersion))) + URI.create(StringUtils.prependUri(config.getUrl(), + SUBJECTS + encodedSubject + VERSIONS + encodedVersion))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, SchemaResponse.class)) @@ -98,8 +117,8 @@ public Flux getAllSubjectVersions(String kafkaCluster, String su String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), - SUBJECTS + encodedSubject + "/versions"))) + URI.create(StringUtils.prependUri(config.getUrl(), + SUBJECTS + encodedSubject + "/versions"))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Flux.from(httpClient.retrieve(request, Integer[].class)) @@ -128,8 +147,8 @@ public Mono register(String kafkaCluster, String subject, Schema String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.POST( - URI.create(StringUtils.prependUri(config.getUrl(), - SUBJECTS + encodedSubject + "/versions")), body) + URI.create(StringUtils.prependUri(config.getUrl(), + SUBJECTS + encodedSubject + "/versions")), body) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, SchemaResponse.class)); @@ -148,8 +167,8 @@ public Mono deleteSubject(String kafkaCluster, String subject, boolea String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); MutableHttpRequest request = HttpRequest.DELETE( - URI.create(StringUtils.prependUri(config.getUrl(), - SUBJECTS + encodedSubject + "?permanent=" + hardDelete))) + URI.create(StringUtils.prependUri(config.getUrl(), + SUBJECTS + encodedSubject + "?permanent=" + hardDelete))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, Integer[].class)); @@ -170,8 +189,8 @@ public Mono deleteSubjectVersion(String kafkaCluster, String subject, S String encodedVersion = URLEncoder.encode(version, StandardCharsets.UTF_8); MutableHttpRequest request = HttpRequest.DELETE( - URI.create(StringUtils.prependUri(config.getUrl(), - SUBJECTS + encodedSubject + VERSIONS + encodedVersion + "?permanent=" + hardDelete))) + URI.create(StringUtils.prependUri(config.getUrl(), + SUBJECTS + encodedSubject + VERSIONS + encodedVersion + "?permanent=" + hardDelete))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, Integer.class)); @@ -192,8 +211,8 @@ public Mono validateSchemaCompatibility(String String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.POST( - URI.create(StringUtils.prependUri(config.getUrl(), - "/compatibility/subjects/" + encodedSubject + "/versions?verbose=true")), body) + URI.create(StringUtils.prependUri(config.getUrl(), + "/compatibility/subjects/" + encodedSubject + "/versions?verbose=true")), body) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, SchemaCompatibilityCheckResponse.class)) @@ -216,8 +235,8 @@ public Mono updateSubjectCompatibility(String kafka String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.PUT( - URI.create(StringUtils.prependUri(config.getUrl(), - CONFIG + encodedSubject)), body) + URI.create(StringUtils.prependUri(config.getUrl(), + CONFIG + encodedSubject)), body) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, SchemaCompatibilityResponse.class)); @@ -235,8 +254,8 @@ public Mono getCurrentCompatibilityBySubject(String String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), - CONFIG + encodedSubject))) + URI.create(StringUtils.prependUri(config.getUrl(), + CONFIG + encodedSubject))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, SchemaCompatibilityResponse.class)) @@ -256,8 +275,8 @@ public Mono deleteCurrentCompatibilityBySubject(Str String encodedSubject = URLEncoder.encode(subject, StandardCharsets.UTF_8); MutableHttpRequest request = HttpRequest.DELETE( - URI.create(StringUtils.prependUri(config.getUrl(), - CONFIG + encodedSubject))) + URI.create(StringUtils.prependUri(config.getUrl(), + CONFIG + encodedSubject))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, SchemaCompatibilityResponse.class)); @@ -274,8 +293,8 @@ public Mono> associateTags(String kafkaCluster, List request = HttpRequest.POST( - URI.create(StringUtils.prependUri(config.getUrl(), - "/catalog/v1/entity/tags")), tagSpecs) + URI.create(StringUtils.prependUri(config.getUrl(), + "/catalog/v1/entity/tags")), tagSpecs) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, Argument.listOf(TagTopicInfo.class))); @@ -292,8 +311,8 @@ public Mono> createTags(String kafkaCluster, List tags) { ManagedClusterProperties.SchemaRegistryProperties config = getSchemaRegistry(kafkaCluster); HttpRequest request = HttpRequest.POST( - URI.create(StringUtils.prependUri(config.getUrl(), - "/catalog/v1/types/tagdefs")), tags) + URI.create(StringUtils.prependUri(config.getUrl(), + "/catalog/v1/types/tagdefs")), tags) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, Argument.listOf(TagInfo.class))); @@ -311,8 +330,8 @@ public Mono> dissociateTag(String kafkaCluster, String entity ManagedClusterProperties.SchemaRegistryProperties config = getSchemaRegistry(kafkaCluster); HttpRequest request = HttpRequest.DELETE( - URI.create(StringUtils.prependUri(config.getUrl(), - "/catalog/v1/entity/type/kafka_topic/name/" + entityName + "/tags/" + tagName))) + URI.create(StringUtils.prependUri(config.getUrl(), + "/catalog/v1/entity/type/kafka_topic/name/" + entityName + "/tags/" + tagName))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.exchange(request, Void.class)); @@ -328,8 +347,8 @@ public Mono getTopicWithCatalogInfo(String kafkaCluster, int ManagedClusterProperties.SchemaRegistryProperties config = getSchemaRegistry(kafkaCluster); HttpRequest request = HttpRequest.GET( - URI.create(StringUtils.prependUri(config.getUrl(), - "/catalog/v1/search/basic?type=kafka_topic&limit=" + limit + "&offset=" + offset))) + URI.create(StringUtils.prependUri(config.getUrl(), + "/catalog/v1/search/basic?type=kafka_topic&limit=" + limit + "&offset=" + offset))) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.retrieve(request, TopicListResponse.class)); @@ -347,8 +366,8 @@ public Mono> updateDescription(Stri ManagedClusterProperties.SchemaRegistryProperties config = getSchemaRegistry(kafkaCluster); HttpRequest request = HttpRequest.PUT( - URI.create(StringUtils.prependUri(config.getUrl(), - "/catalog/v1/entity")), body) + URI.create(StringUtils.prependUri(config.getUrl(), + "/catalog/v1/entity")), body) .basicAuth(config.getBasicAuthUsername(), config.getBasicAuthPassword()); return Mono.from(httpClient.exchange(request, TopicDescriptionUpdateResponse.class)); diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityCheckResponse.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityCheckResponse.java index 5f4cac119..35f37162e 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityCheckResponse.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityCheckResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityRequest.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityRequest.java index 423f69c80..b1dfab3cc 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityRequest.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityRequest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityResponse.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityResponse.java index 9c0dd0d2c..5632a5322 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityResponse.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaCompatibilityResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import com.michelin.ns4kafka.model.schema.Schema; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaRequest.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaRequest.java index cbb39688f..ff27086d7 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaRequest.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaRequest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import com.michelin.ns4kafka.model.schema.Schema; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaResponse.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaResponse.java index 9f14db1b3..9b26c7e2d 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaResponse.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/SchemaResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import com.michelin.ns4kafka.model.schema.Schema; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagInfo.java index 83ad643ce..8d09cef0f 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagInfo.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagTopicInfo.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagTopicInfo.java index e98dc60f6..cc54b6f03 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagTopicInfo.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TagTopicInfo.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateAttributes.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateAttributes.java index c959da9a8..31ca6c9e0 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateAttributes.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateAttributes.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import com.fasterxml.jackson.annotation.JsonInclude; @@ -7,7 +26,7 @@ * Topic description update body's entity's information. * * @param qualifiedName topic entity name - * @param description topic description + * @param description topic description */ @Builder @JsonInclude diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateBody.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateBody.java index adf702072..7afca68ec 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateBody.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateBody.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateEntity.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateEntity.java index c35537be8..10f6b426b 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateEntity.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateEntity.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; @@ -6,7 +25,7 @@ * Topic description update body's entity. * * @param attributes attributes of the topic - * @param typeName topic type name + * @param typeName topic type name */ @Builder public record TopicDescriptionUpdateEntity(TopicDescriptionUpdateAttributes attributes, String typeName) { diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateResponse.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateResponse.java index c585060f7..010b30689 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateResponse.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicDescriptionUpdateResponse.java @@ -1,10 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; /** * Update topic description response. - * */ @Builder public record TopicDescriptionUpdateResponse() { diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntity.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntity.java index d3c3dbe40..3aae9fd89 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntity.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntity.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import java.util.List; diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntityAttributes.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntityAttributes.java index d5d367781..b9431edd2 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntityAttributes.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicEntityAttributes.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import lombok.Builder; @@ -6,8 +25,8 @@ * Topics list response's entity's attributes. * * @param qualifiedName topic entity name - * @param description topic description if any - * @param name topic name + * @param description topic description if any + * @param name topic name */ @Builder public record TopicEntityAttributes(String qualifiedName, String description, String name) { diff --git a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicListResponse.java b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicListResponse.java index c82f67234..a079a55b8 100644 --- a/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicListResponse.java +++ b/src/main/java/com/michelin/ns4kafka/service/client/schema/entities/TopicListResponse.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.client.schema.entities; import java.util.List; @@ -7,7 +26,6 @@ * Topics list response. * * @param entities List of entities - * */ @Builder public record TopicListResponse(List entities) { diff --git a/src/main/java/com/michelin/ns4kafka/service/executor/AccessControlEntryAsyncExecutor.java b/src/main/java/com/michelin/ns4kafka/service/executor/AccessControlEntryAsyncExecutor.java index bb50f8d57..5d7e16fe6 100644 --- a/src/main/java/com/michelin/ns4kafka/service/executor/AccessControlEntryAsyncExecutor.java +++ b/src/main/java/com/michelin/ns4kafka/service/executor/AccessControlEntryAsyncExecutor.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import static com.michelin.ns4kafka.model.AccessControlEntry.ResourceType.GROUP; diff --git a/src/main/java/com/michelin/ns4kafka/service/executor/ConnectorAsyncExecutor.java b/src/main/java/com/michelin/ns4kafka/service/executor/ConnectorAsyncExecutor.java index 4d0a9b514..3bdd8d83e 100644 --- a/src/main/java/com/michelin/ns4kafka/service/executor/ConnectorAsyncExecutor.java +++ b/src/main/java/com/michelin/ns4kafka/service/executor/ConnectorAsyncExecutor.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import com.michelin.ns4kafka.model.Metadata; diff --git a/src/main/java/com/michelin/ns4kafka/service/executor/ConsumerGroupAsyncExecutor.java b/src/main/java/com/michelin/ns4kafka/service/executor/ConsumerGroupAsyncExecutor.java index bc94caf0b..7aebe4e14 100644 --- a/src/main/java/com/michelin/ns4kafka/service/executor/ConsumerGroupAsyncExecutor.java +++ b/src/main/java/com/michelin/ns4kafka/service/executor/ConsumerGroupAsyncExecutor.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import com.michelin.ns4kafka.property.ManagedClusterProperties; @@ -42,7 +61,7 @@ private Admin getAdminClient() { * * @param groupIds The consumer group ids * @return A map of consumer group id and consumer group description - * @throws ExecutionException Any execution exception during consumer groups description + * @throws ExecutionException Any execution exception during consumer groups description * @throws InterruptedException Any interrupted exception during consumer groups description */ public Map describeConsumerGroups(List groupIds) diff --git a/src/main/java/com/michelin/ns4kafka/service/executor/KafkaAsyncExecutorScheduler.java b/src/main/java/com/michelin/ns4kafka/service/executor/KafkaAsyncExecutorScheduler.java index 710db89cf..f7609dbba 100644 --- a/src/main/java/com/michelin/ns4kafka/service/executor/KafkaAsyncExecutorScheduler.java +++ b/src/main/java/com/michelin/ns4kafka/service/executor/KafkaAsyncExecutorScheduler.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import io.micronaut.runtime.event.ApplicationStartupEvent; diff --git a/src/main/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutor.java b/src/main/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutor.java index 72b100fd3..03b8ef541 100644 --- a/src/main/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutor.java +++ b/src/main/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutor.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import com.michelin.ns4kafka.model.Metadata; @@ -267,7 +286,7 @@ public void alterDescriptions(List ns4kafkaTopics, Map bro managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" + topic.getMetadata().getName() + ": " + topic.getSpec().getDescription()), error); topic.setStatus(Topic.TopicStatus.ofFailed("Error while updating topic description: " - + error.getMessage())); + + error.getMessage())); topicRepository.create(topic); }); } @@ -480,9 +499,9 @@ public void createAndAssociateTags(Map> topicTagsMappi log.info(String.format("Success associating tag %s.", managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" + topic.getMetadata().getName() + "/" + String.join(", ", tags - .stream() - .map(TagTopicInfo::typeName) - .toList()))); + .stream() + .map(TagTopicInfo::typeName) + .toList()))); topic.getMetadata().setGeneration(topic.getMetadata().getGeneration() + 1); topic.setStatus(Topic.TopicStatus.ofSuccess("Topic tags updated")); topicRepository.create(topic); @@ -492,9 +511,9 @@ public void createAndAssociateTags(Map> topicTagsMappi log.error(String.format("Error associating tag %s.", managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" + topic.getMetadata().getName() + "/" + String.join(", ", tags - .stream() - .map(TagTopicInfo::typeName) - .toList())), error); + .stream() + .map(TagTopicInfo::typeName) + .toList())), error); topic.setStatus(Topic.TopicStatus.ofFailed( "Error while associating topic tags: " + error.getMessage())); topicRepository.create(topic); @@ -512,27 +531,31 @@ public void createAndAssociateTags(Map> topicTagsMappi * @param topic The topic */ private void dissociateTags(Collection tagsToDissociate, Topic topic) { - tagsToDissociate - .forEach(tag -> schemaRegistryClient.dissociateTag(managedClusterProperties.getName(), - managedClusterProperties.getConfig().getProperty(CLUSTER_ID) - + ":" + topic.getMetadata().getName(), tag) - .subscribe( - success -> { - log.info(String.format("Success dissociating tag %s.", - managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" - + topic.getMetadata().getName() + "/" + tag)); - topic.getMetadata().setGeneration(topic.getMetadata().getGeneration() + 1); - topic.setStatus(Topic.TopicStatus.ofSuccess("Topic tags updated")); - topicRepository.create(topic); - }, - error -> { - log.error(String.format("Error dissociating tag %s.", - managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" - + topic.getMetadata().getName() + "/" + tag), error); - topic.setStatus(Topic.TopicStatus.ofFailed("Error while dissociating topic tags: " - + error.getMessage())); - topicRepository.create(topic); - }) + tagsToDissociate.forEach(tag -> schemaRegistryClient + .dissociateTag( + managedClusterProperties.getName(), + managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + + ":" + topic.getMetadata().getName(), tag + ) + .subscribe( + success -> { + log.info(String.format("Success dissociating tag %s.", + managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" + + topic.getMetadata().getName() + "/" + tag) + ); + topic.getMetadata().setGeneration(topic.getMetadata().getGeneration() + 1); + topic.setStatus(Topic.TopicStatus.ofSuccess("Topic tags updated")); + topicRepository.create(topic); + }, + error -> { + log.error(String.format("Error dissociating tag %s.", + managedClusterProperties.getConfig().getProperty(CLUSTER_ID) + ":" + + topic.getMetadata().getName() + "/" + tag), error + ); + topic.setStatus(Topic.TopicStatus.ofFailed("Error while dissociating topic tags: " + + error.getMessage())); + topicRepository.create(topic); + }) ); } diff --git a/src/main/java/com/michelin/ns4kafka/service/executor/UserAsyncExecutor.java b/src/main/java/com/michelin/ns4kafka/service/executor/UserAsyncExecutor.java index 5b149cd09..94ec444c9 100644 --- a/src/main/java/com/michelin/ns4kafka/service/executor/UserAsyncExecutor.java +++ b/src/main/java/com/michelin/ns4kafka/service/executor/UserAsyncExecutor.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidResetPasswordProvider; diff --git a/src/main/java/com/michelin/ns4kafka/util/BytesUtils.java b/src/main/java/com/michelin/ns4kafka/util/BytesUtils.java index c0ca5315c..ed0ddd541 100644 --- a/src/main/java/com/michelin/ns4kafka/util/BytesUtils.java +++ b/src/main/java/com/michelin/ns4kafka/util/BytesUtils.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import java.math.BigDecimal; diff --git a/src/main/java/com/michelin/ns4kafka/util/EncryptionUtils.java b/src/main/java/com/michelin/ns4kafka/util/EncryptionUtils.java index 1e0b53777..0b0431611 100644 --- a/src/main/java/com/michelin/ns4kafka/util/EncryptionUtils.java +++ b/src/main/java/com/michelin/ns4kafka/util/EncryptionUtils.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import com.nimbusds.jose.EncryptionMethod; diff --git a/src/main/java/com/michelin/ns4kafka/util/FormatErrorUtils.java b/src/main/java/com/michelin/ns4kafka/util/FormatErrorUtils.java index 7e0abcbf1..acf92b708 100644 --- a/src/main/java/com/michelin/ns4kafka/util/FormatErrorUtils.java +++ b/src/main/java/com/michelin/ns4kafka/util/FormatErrorUtils.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import static com.michelin.ns4kafka.util.BytesUtils.BYTE; diff --git a/src/main/java/com/michelin/ns4kafka/util/RegexUtils.java b/src/main/java/com/michelin/ns4kafka/util/RegexUtils.java index 7afdb3ea4..6884a5531 100644 --- a/src/main/java/com/michelin/ns4kafka/util/RegexUtils.java +++ b/src/main/java/com/michelin/ns4kafka/util/RegexUtils.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import java.util.List; @@ -30,7 +49,7 @@ public static List convertWildcardStringsToRegex(List wildcardSt /** * Check if a string matches any pattern of a given list. * - * @param resourceName The string + * @param resourceName The string * @param regexPatterns The regex patterns * @return true if any regex pattern matches the resourceName, false otherwise */ diff --git a/src/main/java/com/michelin/ns4kafka/util/config/ConnectorConfig.java b/src/main/java/com/michelin/ns4kafka/util/config/ConnectorConfig.java index 3a04676a9..4e172b5ac 100644 --- a/src/main/java/com/michelin/ns4kafka/util/config/ConnectorConfig.java +++ b/src/main/java/com/michelin/ns4kafka/util/config/ConnectorConfig.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.config; import lombok.AccessLevel; diff --git a/src/main/java/com/michelin/ns4kafka/util/config/TopicConfig.java b/src/main/java/com/michelin/ns4kafka/util/config/TopicConfig.java index 87ad6038f..17a2e9d46 100644 --- a/src/main/java/com/michelin/ns4kafka/util/config/TopicConfig.java +++ b/src/main/java/com/michelin/ns4kafka/util/config/TopicConfig.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.config; import lombok.AccessLevel; diff --git a/src/main/java/com/michelin/ns4kafka/util/enumation/ApplyStatus.java b/src/main/java/com/michelin/ns4kafka/util/enumation/ApplyStatus.java index 9235b953d..b3863f108 100644 --- a/src/main/java/com/michelin/ns4kafka/util/enumation/ApplyStatus.java +++ b/src/main/java/com/michelin/ns4kafka/util/enumation/ApplyStatus.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.enumation; /** diff --git a/src/main/java/com/michelin/ns4kafka/util/enumation/Kind.java b/src/main/java/com/michelin/ns4kafka/util/enumation/Kind.java index b06a3211c..55dd1e44d 100644 --- a/src/main/java/com/michelin/ns4kafka/util/enumation/Kind.java +++ b/src/main/java/com/michelin/ns4kafka/util/enumation/Kind.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.enumation; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/src/main/java/com/michelin/ns4kafka/util/exception/ForbiddenNamespaceException.java b/src/main/java/com/michelin/ns4kafka/util/exception/ForbiddenNamespaceException.java index 0550812a5..7e88d3293 100644 --- a/src/main/java/com/michelin/ns4kafka/util/exception/ForbiddenNamespaceException.java +++ b/src/main/java/com/michelin/ns4kafka/util/exception/ForbiddenNamespaceException.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.exception; /** diff --git a/src/main/java/com/michelin/ns4kafka/util/exception/ResourceValidationException.java b/src/main/java/com/michelin/ns4kafka/util/exception/ResourceValidationException.java index 1ad96ca75..5c78a6108 100644 --- a/src/main/java/com/michelin/ns4kafka/util/exception/ResourceValidationException.java +++ b/src/main/java/com/michelin/ns4kafka/util/exception/ResourceValidationException.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.exception; import com.michelin.ns4kafka.model.MetadataResource; diff --git a/src/main/java/com/michelin/ns4kafka/util/exception/UnknownNamespaceException.java b/src/main/java/com/michelin/ns4kafka/util/exception/UnknownNamespaceException.java index 145a4ec76..7b0e06c1d 100644 --- a/src/main/java/com/michelin/ns4kafka/util/exception/UnknownNamespaceException.java +++ b/src/main/java/com/michelin/ns4kafka/util/exception/UnknownNamespaceException.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util.exception; /** diff --git a/src/main/java/com/michelin/ns4kafka/validation/ConnectValidator.java b/src/main/java/com/michelin/ns4kafka/validation/ConnectValidator.java index ea5f48548..5bae79927 100644 --- a/src/main/java/com/michelin/ns4kafka/validation/ConnectValidator.java +++ b/src/main/java/com/michelin/ns4kafka/validation/ConnectValidator.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.validation; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidNameEmpty; diff --git a/src/main/java/com/michelin/ns4kafka/validation/FieldValidationException.java b/src/main/java/com/michelin/ns4kafka/validation/FieldValidationException.java index c2e9301a3..5d244447b 100644 --- a/src/main/java/com/michelin/ns4kafka/validation/FieldValidationException.java +++ b/src/main/java/com/michelin/ns4kafka/validation/FieldValidationException.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.validation; import java.io.Serial; diff --git a/src/main/java/com/michelin/ns4kafka/validation/ResourceValidator.java b/src/main/java/com/michelin/ns4kafka/validation/ResourceValidator.java index 2008e2062..9f2979076 100644 --- a/src/main/java/com/michelin/ns4kafka/validation/ResourceValidator.java +++ b/src/main/java/com/michelin/ns4kafka/validation/ResourceValidator.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.validation; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidFieldValidationAtLeast; diff --git a/src/main/java/com/michelin/ns4kafka/validation/TopicValidator.java b/src/main/java/com/michelin/ns4kafka/validation/TopicValidator.java index e968af075..ce690278a 100644 --- a/src/main/java/com/michelin/ns4kafka/validation/TopicValidator.java +++ b/src/main/java/com/michelin/ns4kafka/validation/TopicValidator.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.validation; import static com.michelin.ns4kafka.util.FormatErrorUtils.invalidFieldValidationNull; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2f0bff162..75dfaf662 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,168 +1,153 @@ +endpoints: + beans: + enabled: false + env: + enabled: false + info: + enabled: false + loggers: + enabled: false + metrics: + enabled: false + refresh: + enabled: false + routes: + enabled: false + threaddump: + enabled: false +jackson: + serialization: + indent-output: true + serialization-inclusion: 'NON_ABSENT' +kafka: + bootstrap.servers: 'localhost:9092' + consumers: + default: + session.timeout.ms: 30000 + health: + enabled: false + producers: + default: + acks: 'all' + delivery.timeout.ms: 10000 + request.timeout.ms: 10000 + retries: 1 micronaut: application: - name: ns4kafka + name: 'ns4kafka' + codec: + json: + additional-types: + - 'application/vnd.schemaregistry.v1+json' + http: + services: + kafka-connect: + event-loop-group: 'connect' + schema-registry: + event-loop-group: 'schema' netty: event-loops: - default: - num-threads: 8 connect: num-threads: 4 prefer-native-transport: true + default: + num-threads: 8 schema: num-threads: 4 prefer-native-transport: true - - http: - services: - kafka-connect: - event-loop-group: connect - schema-registry: - event-loop-group: schema - + router: + static-resources: + rapidoc: + mapping: '/rapidoc/**' + paths: 'classpath:META-INF/swagger/views/rapidoc' + swagger: + mapping: '/swagger/**' + paths: 'classpath:META-INF/swagger' security: + authentication: 'bearer' enabled: true - authentication: bearer + endpoints: + introspection: + enabled: true gitlab: enabled: true - url: https://gitlab.com + url: 'https://gitlab.com' + intercept-url-map: + - access: + - 'isAnonymous()' + http-method: 'GET' + pattern: '/rapidoc/**' + - access: + - 'isAnonymous()' + http-method: 'GET' + pattern: '/swagger/**' ldap: enabled: false - endpoints: - introspection: - enabled: true token: jwt: signatures: secret: generator: secret: '"${JWT_GENERATOR_SIGNATURE_SECRET:pleaseChangeThisSecretForANewOne}"' - intercept-url-map: - - pattern: /swagger/** - http-method: GET - access: - - isAnonymous() - - pattern: /rapidoc/** - http-method: GET - access: - - isAnonymous() - - codec: - json: - additional-types: - - application/vnd.schemaregistry.v1+json - - router: - static-resources: - swagger: - paths: classpath:META-INF/swagger - mapping: /swagger/** - rapidoc: - paths: classpath:META-INF/swagger/views/rapidoc - mapping: /rapidoc/** - -jackson: - serialization-inclusion: NON_ABSENT - serialization: - indent-output: true # Pretty-print JSON - -endpoints: - env: - enabled: false - beans: - enabled: false - info: - enabled: false - loggers: - enabled: false - metrics: - enabled: false - refresh: - enabled: false - routes: - enabled: false - threaddump: - enabled: false - -kafka: - health: - enabled: false - bootstrap.servers: "localhost:9092" - producers: - default: - retries: 1 - acks: all - request.timeout.ms: 10000 - delivery.timeout.ms: 10000 - consumers: - default: - session.timeout.ms: 30000 - ns4kafka: akhq: - # Namespace label to use to find which namespace the authenticating user belongs to - group-label: support-group - # AKHQ > 0.24.0 - roles: - TOPIC: topic-read - CONNECT: connect-rw - SCHEMA: registry-read - GROUP: group-read - CONNECT_CLUSTER: connect-cluster-read - # AKHQ <= 0.24.0 - former-roles: - - topic/read - - topic/data/read - - group/read - - registry/read - - connect/read - - connect/state/update - - # Special group which will be granted ".*" on topics, connects, and groups - admin-group: _ - # Roles to be granted to admin group + admin-group: '_' # AKHQ >= 0.25.0 admin-roles: - TOPIC: topic-admin - CONNECT: connect-admin - SCHEMA: registry-admin - GROUP: group-read - CONNECT_CLUSTER: connect-cluster-read + CONNECT: 'connect-admin' + CONNECT_CLUSTER: 'connect-cluster-read' + GROUP: 'group-read' + SCHEMA: 'registry-admin' + TOPIC: 'topic-admin' # AKHQ <= 0.24.0 former-admin-roles: - - topic/read - - topic/data/read - - group/read - - registry/read - - connect/read - - connect/state/update - - users/reset-password - + - 'connect/read' + - 'connect/state/update' + - 'group/read' + - 'registry/read' + - 'topic/data/read' + - 'topic/read' + - 'users/reset-password' + # AKHQ <= 0.24.0 + former-roles: + - 'connect/read' + - 'connect/state/update' + - 'group/read' + - 'registry/read' + - 'topic/data/read' + - 'topic/read' + group-label: 'support-group' + roles: + CONNECT: 'connect-rw' + CONNECT_CLUSTER: 'connect-cluster-read' + GROUP: 'group-read' + SCHEMA: 'registry-read' + TOPIC: 'topic-read' + log: + console: + enabled: true + kafka: + enabled: false security: - aes256-encryption-key: changeitchangeitchangeitchangeit - admin-group: _ - # local-users: # Not for production use. - # - username: admin - # # SHA-256 password. - # password: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 - # groups: - # - "admin" + admin-group: '_' + aes256-encryption-key: 'changeitchangeitchangeitchangeit' + # Not for production use. + # local-users: + # - groups: + # - 'admin' + # password: '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918' + # username: 'admin' store: kafka: enabled: true - group-id: ns4kafka.group + group-id: 'ns4kafka.group' init-timeout: 60000 topics: - prefix: ns4kafka - replication-factor: 1 + prefix: 'ns4kafka' props: + cleanup.policy: 'compact' + max.compaction.lag.ms: '604800000' + min.compaction.lag.ms: '0' min.insync.replicas: 1 - cleanup.policy: "compact" - min.compaction.lag.ms: "0" - max.compaction.lag.ms: "604800000" - segment.ms: "600000" - - log: - console: - enabled: true - kafka: - enabled: false \ No newline at end of file + segment.ms: '600000' + replication-factor: 1 diff --git a/src/test/java/com/michelin/ns4kafka/controller/AclControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/AclControllerTest.java index ea51bb5c3..2bb0ba14d 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/AclControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/AclControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.security.auth.JwtCustomClaimNames.ROLES; @@ -892,7 +911,7 @@ void shouldNotBulkDeleteSelfAssignedAclsWhenNotAdmin() { () -> accessControlListController.bulkDelete(authentication, "test", "ace*", false)); assertEquals("Invalid value \"ace*\" for field \"name\":" - + " only administrators can delete the following self-assigned ACLs: ace1.", + + " only administrators can delete the following self-assigned ACLs: ace1.", actual.getValidationErrors().getFirst()); } diff --git a/src/test/java/com/michelin/ns4kafka/controller/AclNonNamespacedControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/AclNonNamespacedControllerTest.java index ad723bf97..a3d91aa40 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/AclNonNamespacedControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/AclNonNamespacedControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerTest.java index 197573791..faffa5139 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerV3Test.java b/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerV3Test.java index c22ee9d9c..b9e7dc038 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerV3Test.java +++ b/src/test/java/com/michelin/ns4kafka/controller/AkhqClaimProviderControllerV3Test.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java index 6e61c249a..6ae2b6168 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -419,13 +438,13 @@ void shouldNotBulkDeleteConnectClustersWithConnectors() { .thenReturn(List.of(connector)); ResourceValidationException result = assertThrows(ResourceValidationException.class, - () -> connectClusterController.bulkDelete("test", "connect-cluster*", false)); + () -> connectClusterController.bulkDelete("test", "connect-cluster*", false)); assertEquals(1, result.getValidationErrors().size()); assertEquals( - "Invalid \"delete\" operation: The Kafka Connect \"connect-cluster2\" has 1 deployed connector(s): " - + "connect1. Please remove the associated connector(s) before deleting it.", - result.getValidationErrors().getFirst()); + "Invalid \"delete\" operation: The Kafka Connect \"connect-cluster2\" has 1 deployed connector(s): " + + "connect1. Please remove the associated connector(s) before deleting it.", + result.getValidationErrors().getFirst()); } @Test diff --git a/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterNonNamespacedControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterNonNamespacedControllerTest.java index 699713218..ebe20c5df 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterNonNamespacedControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterNonNamespacedControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/ConnectorControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ConnectorControllerTest.java index 89038cedf..783ed66f5 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ConnectorControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ConnectorControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/ConsumerGroupControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ConsumerGroupControllerTest.java index be244b940..cfb5c35d6 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ConsumerGroupControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ConsumerGroupControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/ExceptionHandlerControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ExceptionHandlerControllerTest.java index d265eab7a..c4b2e15a8 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ExceptionHandlerControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ExceptionHandlerControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static com.michelin.ns4kafka.util.enumation.Kind.TOPIC; diff --git a/src/test/java/com/michelin/ns4kafka/controller/NamespaceControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/NamespaceControllerTest.java index 6ba3eaef5..930d2f34f 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/NamespaceControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/NamespaceControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java index 4db09a354..21a6af43a 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaNonNamespacedControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaNonNamespacedControllerTest.java index 645be231c..d5ce0c376 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaNonNamespacedControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaNonNamespacedControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/RoleBindingControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/RoleBindingControllerTest.java index b2d1aa139..88d639a2b 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/RoleBindingControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/RoleBindingControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; diff --git a/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java index 3bedef174..66b40abf8 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/SchemaControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -475,7 +494,7 @@ void shouldNotDeleteAllSchemaVersionsWhenNotOwner() { assertEquals(ResourceValidationException.class, error.getClass()); assertEquals(1, ((ResourceValidationException) error).getValidationErrors().size()); assertEquals("Invalid value \"prefix.subject-value\" for field \"name\": " - + "namespace is not owner of the resource.", + + "namespace is not owner of the resource.", ((ResourceValidationException) error).getValidationErrors().getFirst()); }) .verify(); diff --git a/src/test/java/com/michelin/ns4kafka/controller/StreamControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/StreamControllerTest.java index 933555bbf..aad6de8b6 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/StreamControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/StreamControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/controller/TopicControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/TopicControllerTest.java index 180038b47..ad2fe3db9 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/TopicControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/TopicControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -1210,8 +1229,8 @@ void shouldNotDeleteRecordsWhenTopicNotExist() { @Test void shouldNotCreateTopicWhenNameCollidesOnSpecialChar() throws InterruptedException, - ExecutionException, - TimeoutException { + ExecutionException, + TimeoutException { Namespace ns = Namespace.builder() .metadata(Metadata.builder() .name("test") diff --git a/src/test/java/com/michelin/ns4kafka/controller/TopicNonNamespacedControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/TopicNonNamespacedControllerTest.java index 3a893ba0a..3cf0f99f6 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/TopicNonNamespacedControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/TopicNonNamespacedControllerTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/AclIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/AclIntegrationTest.java index 727b1396f..3b17afe38 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/AclIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/AclIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/ApiResourcesIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/ApiResourcesIntegrationTest.java index b2d6942a5..fcd645c17 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/ApiResourcesIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/ApiResourcesIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/ConfigIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/ConfigIntegrationTest.java index 26163b655..bac193cb2 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/ConfigIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/ConfigIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/ConnectClusterIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/ConnectClusterIntegrationTest.java index e790905ae..242a9d406 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/ConnectClusterIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/ConnectClusterIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -73,11 +92,11 @@ void init() { .spec(RoleBindingSpec.builder() .role(Role.builder() .resourceTypes(List.of( - "topics", - "acls", - "connect-clusters", - "connect-clusters/vaults", - "connectors")) + "topics", + "acls", + "connect-clusters", + "connect-clusters/vaults", + "connectors")) .verbs(List.of(Verb.POST, Verb.GET, Verb.PUT, Verb.DELETE)) .build()) .subject(Subject.builder() @@ -109,46 +128,46 @@ void init() { .body(roleBinding)); AccessControlEntry aclConnect = AccessControlEntry.builder() - .metadata(Metadata.builder() - .name("ns1-acl") - .namespace("ns1") - .build()) - .spec(AccessControlEntrySpec.builder() - .resourceType(ResourceType.CONNECT) - .resource("ns1-") - .resourcePatternType(ResourcePatternType.PREFIXED) - .permission(Permission.OWNER) - .grantedTo("ns1") - .build()) - .build(); + .metadata(Metadata.builder() + .name("ns1-acl") + .namespace("ns1") + .build()) + .spec(AccessControlEntrySpec.builder() + .resourceType(ResourceType.CONNECT) + .resource("ns1-") + .resourcePatternType(ResourcePatternType.PREFIXED) + .permission(Permission.OWNER) + .grantedTo("ns1") + .build()) + .build(); ns4KafkaClient - .toBlocking() - .exchange(HttpRequest - .create(HttpMethod.POST, "/api/namespaces/ns1/acls") - .bearerAuth(token) - .body(aclConnect)); + .toBlocking() + .exchange(HttpRequest + .create(HttpMethod.POST, "/api/namespaces/ns1/acls") + .bearerAuth(token) + .body(aclConnect)); AccessControlEntry aclConnectCluster = AccessControlEntry.builder() - .metadata(Metadata.builder() - .name("ns1-acl-cc") - .namespace("ns1") - .build()) - .spec(AccessControlEntrySpec.builder() - .resourceType(ResourceType.CONNECT_CLUSTER) - .resource("ns1-") - .resourcePatternType(ResourcePatternType.PREFIXED) - .permission(Permission.OWNER) - .grantedTo("ns1") - .build()) - .build(); + .metadata(Metadata.builder() + .name("ns1-acl-cc") + .namespace("ns1") + .build()) + .spec(AccessControlEntrySpec.builder() + .resourceType(ResourceType.CONNECT_CLUSTER) + .resource("ns1-") + .resourcePatternType(ResourcePatternType.PREFIXED) + .permission(Permission.OWNER) + .grantedTo("ns1") + .build()) + .build(); ns4KafkaClient - .toBlocking() - .exchange(HttpRequest - .create(HttpMethod.POST, "/api/namespaces/ns1/acls") - .bearerAuth(token) - .body(aclConnectCluster)); + .toBlocking() + .exchange(HttpRequest + .create(HttpMethod.POST, "/api/namespaces/ns1/acls") + .bearerAuth(token) + .body(aclConnectCluster)); AccessControlEntry aclTopic = AccessControlEntry.builder() .metadata(Metadata.builder() @@ -197,10 +216,10 @@ void shouldCreateConnectCluster() { .body(connectCluster)); HttpResponse> connectClusters = ns4KafkaClient - .toBlocking() - .exchange(HttpRequest - .create(HttpMethod.GET, "/api/namespaces/ns1/connect-clusters") - .bearerAuth(token), Argument.listOf(ConnectCluster.class)); + .toBlocking() + .exchange(HttpRequest + .create(HttpMethod.GET, "/api/namespaces/ns1/connect-clusters") + .bearerAuth(token), Argument.listOf(ConnectCluster.class)); assertEquals(1, connectClusters.getBody().get().size()); assertEquals("ns1-connectCluster", connectClusters.getBody().get().get(0).getMetadata().getName()); @@ -210,9 +229,9 @@ void shouldCreateConnectCluster() { HttpResponse> vaultResponse = ns4KafkaClient .toBlocking() .exchange(HttpRequest - .create(HttpMethod.POST, "/api/namespaces/ns1/connect-clusters/ns1-connectCluster/vaults") - .bearerAuth(token) - .body(passwordsToVault), Argument.listOf(VaultResponse.class)); + .create(HttpMethod.POST, "/api/namespaces/ns1/connect-clusters/ns1-connectCluster/vaults") + .bearerAuth(token) + .body(passwordsToVault), Argument.listOf(VaultResponse.class)); assertEquals(2, vaultResponse.getBody().get().size()); assertEquals("password1", vaultResponse.getBody().get().get(0).getSpec().getClearText()); @@ -225,10 +244,10 @@ void shouldCreateConnectCluster() { .bearerAuth(token)); connectClusters = ns4KafkaClient - .toBlocking() - .exchange(HttpRequest - .create(HttpMethod.GET, "/api/namespaces/ns1/connect-clusters") - .bearerAuth(token), Argument.listOf(ConnectCluster.class)); + .toBlocking() + .exchange(HttpRequest + .create(HttpMethod.GET, "/api/namespaces/ns1/connect-clusters") + .bearerAuth(token), Argument.listOf(ConnectCluster.class)); assertEquals(0, connectClusters.getBody().get().size()); } diff --git a/src/test/java/com/michelin/ns4kafka/integration/ConnectorIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/ConnectorIntegrationTest.java index ff607783b..86ad4cc29 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/ConnectorIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/ConnectorIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; diff --git a/src/test/java/com/michelin/ns4kafka/integration/ExceptionHandlerIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/ExceptionHandlerIntegrationTest.java index 6b091ab21..011939ec9 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/ExceptionHandlerIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/ExceptionHandlerIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/LoginIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/LoginIntegrationTest.java index afcb4314b..48f69c2d2 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/LoginIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/LoginIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/NamespaceIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/NamespaceIntegrationTest.java index 1bc601116..4c448583f 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/NamespaceIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/NamespaceIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java index 49ea21c8c..7308df042 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/SchemaIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/StreamIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/StreamIntegrationTest.java index 5d8275376..e0a6f9798 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/StreamIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/StreamIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/TopicIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/TopicIntegrationTest.java index f62342316..f3f7b9489 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/TopicIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/TopicIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -224,12 +243,12 @@ void shouldValidateAkhqClaims() { assertLinesMatch( List.of( - "topic/read", - "topic/data/read", + "connect/read", + "connect/state/update", "group/read", "registry/read", - "connect/read", - "connect/state/update" + "topic/data/read", + "topic/read" ), response.getRoles()); diff --git a/src/test/java/com/michelin/ns4kafka/integration/UserIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/UserIntegrationTest.java index e78c227f4..9d35de120 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/UserIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/UserIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/integration/container/KafkaConnectIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/container/KafkaConnectIntegrationTest.java index 634cddc11..76e6964d7 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/container/KafkaConnectIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/container/KafkaConnectIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration.container; import io.micronaut.core.annotation.NonNull; diff --git a/src/test/java/com/michelin/ns4kafka/integration/container/KafkaIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/container/KafkaIntegrationTest.java index 71f86c9dd..007c7df6a 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/container/KafkaIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/container/KafkaIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration.container; import static org.apache.kafka.clients.CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG; diff --git a/src/test/java/com/michelin/ns4kafka/integration/container/SchemaRegistryIntegrationTest.java b/src/test/java/com/michelin/ns4kafka/integration/container/SchemaRegistryIntegrationTest.java index 6d5c23626..d37db6f5f 100644 --- a/src/test/java/com/michelin/ns4kafka/integration/container/SchemaRegistryIntegrationTest.java +++ b/src/test/java/com/michelin/ns4kafka/integration/container/SchemaRegistryIntegrationTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.integration.container; import io.micronaut.core.annotation.NonNull; diff --git a/src/test/java/com/michelin/ns4kafka/model/AccessControlEntryTest.java b/src/test/java/com/michelin/ns4kafka/model/AccessControlEntryTest.java index 94e0fd1f2..dd3a807b6 100644 --- a/src/test/java/com/michelin/ns4kafka/model/AccessControlEntryTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/AccessControlEntryTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/ConnectValidatorTest.java b/src/test/java/com/michelin/ns4kafka/model/ConnectValidatorTest.java index caffc56eb..982a841bd 100644 --- a/src/test/java/com/michelin/ns4kafka/model/ConnectValidatorTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/ConnectValidatorTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/ConnectorTest.java b/src/test/java/com/michelin/ns4kafka/model/ConnectorTest.java index 7856282c0..fc6eb7450 100644 --- a/src/test/java/com/michelin/ns4kafka/model/ConnectorTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/ConnectorTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/MetadataTest.java b/src/test/java/com/michelin/ns4kafka/model/MetadataTest.java index d1c906ee8..d311aec1a 100644 --- a/src/test/java/com/michelin/ns4kafka/model/MetadataTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/MetadataTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/NamespaceTest.java b/src/test/java/com/michelin/ns4kafka/model/NamespaceTest.java index 91ab31769..c763e1f2b 100644 --- a/src/test/java/com/michelin/ns4kafka/model/NamespaceTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/NamespaceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/ResourceValidatorTest.java b/src/test/java/com/michelin/ns4kafka/model/ResourceValidatorTest.java index f211f5275..2170b5f82 100644 --- a/src/test/java/com/michelin/ns4kafka/model/ResourceValidatorTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/ResourceValidatorTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; @@ -20,7 +39,6 @@ void shouldValidateNonEmptyString() { // test ensureValid assertThrows(FieldValidationException.class, () -> original.ensureValid("k", null)); assertThrows(FieldValidationException.class, () -> original.ensureValid("k", "")); - //assertThrows(FieldValidationException.class, () -> original.ensureValid("k", " ")); assertDoesNotThrow(() -> original.ensureValid("k", "v")); } diff --git a/src/test/java/com/michelin/ns4kafka/model/RoleBindingTest.java b/src/test/java/com/michelin/ns4kafka/model/RoleBindingTest.java index 08dc44f1a..982a86552 100644 --- a/src/test/java/com/michelin/ns4kafka/model/RoleBindingTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/RoleBindingTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/SchemaTest.java b/src/test/java/com/michelin/ns4kafka/model/SchemaTest.java index 7e7e47bfb..796b300e7 100644 --- a/src/test/java/com/michelin/ns4kafka/model/SchemaTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/SchemaTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/StreamTest.java b/src/test/java/com/michelin/ns4kafka/model/StreamTest.java index 6acea6ddd..f6d90f32b 100644 --- a/src/test/java/com/michelin/ns4kafka/model/StreamTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/StreamTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/TopicTest.java b/src/test/java/com/michelin/ns4kafka/model/TopicTest.java index 41fa3dc63..4a4587632 100644 --- a/src/test/java/com/michelin/ns4kafka/model/TopicTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/TopicTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/model/TopicValidatorTest.java b/src/test/java/com/michelin/ns4kafka/model/TopicValidatorTest.java index 20db920e1..3373554e4 100644 --- a/src/test/java/com/michelin/ns4kafka/model/TopicValidatorTest.java +++ b/src/test/java/com/michelin/ns4kafka/model/TopicValidatorTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.model; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRuleTest.java b/src/test/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRuleTest.java index 67ac11a9c..0eef84bc9 100644 --- a/src/test/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRuleTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/ResourceBasedSecurityRuleTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security; import static com.michelin.ns4kafka.model.RoleBinding.Verb.GET; diff --git a/src/test/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacementTest.java b/src/test/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacementTest.java index 12a346cef..d10fb1b70 100644 --- a/src/test/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacementTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/SensitiveEndpointRuleReplacementTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security; import static com.michelin.ns4kafka.security.auth.JwtCustomClaimNames.ROLES; diff --git a/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationInfoTest.java b/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationInfoTest.java index 880a7419a..5dad5bd0b 100644 --- a/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationInfoTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationInfoTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import static com.michelin.ns4kafka.model.RoleBinding.Verb.GET; diff --git a/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationServiceTest.java b/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationServiceTest.java index 7eeacb136..fb743f98a 100644 --- a/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/auth/AuthenticationServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth; import static com.michelin.ns4kafka.security.auth.JwtCustomClaimNames.ROLE_BINDINGS; diff --git a/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProviderTest.java b/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProviderTest.java index d4af8f02e..63cf477bf 100644 --- a/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProviderTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationProviderTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.gitlab; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationServiceTest.java b/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationServiceTest.java index f96a217dd..94958da6f 100644 --- a/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/auth/gitlab/GitlabAuthenticationServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.gitlab; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapperTest.java b/src/test/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapperTest.java index 8232fba20..bf2adba3a 100644 --- a/src/test/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapperTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/auth/ldap/LdapAuthenticationMapperTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.ldap; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProviderTest.java b/src/test/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProviderTest.java index 36f113577..be7e558a9 100644 --- a/src/test/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProviderTest.java +++ b/src/test/java/com/michelin/ns4kafka/security/auth/local/LocalUserAuthenticationProviderTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.security.auth.local; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/service/AclServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/AclServiceTest.java index 7c3caa28e..e40b1dd8a 100644 --- a/src/test/java/com/michelin/ns4kafka/service/AclServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/AclServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/service/ConnectClusterServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/ConnectClusterServiceTest.java index 3b33dd07a..d4418ee62 100644 --- a/src/test/java/com/michelin/ns4kafka/service/ConnectClusterServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/ConnectClusterServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -131,33 +150,33 @@ void shouldFindAllConnectClustersIncludingThoseDeclaredInNs4KafkaConfig() { @Test void shouldFindAllConnectClustersIncludingThoseDeclaredInNs4KafkaConfigEvenIfNull() { ConnectCluster connectCluster = ConnectCluster.builder() - .metadata(Metadata.builder() - .name("connect-cluster") - .build()) - .spec(ConnectCluster.ConnectClusterSpec.builder() - .url("https://after") - .build()) - .build(); + .metadata(Metadata.builder() + .name("connect-cluster") + .build()) + .spec(ConnectCluster.ConnectClusterSpec.builder() + .url("https://after") + .build()) + .build(); when(connectClusterRepository.findAll()) - .thenReturn(new ArrayList<>(List.of(connectCluster))); + .thenReturn(new ArrayList<>(List.of(connectCluster))); ManagedClusterProperties kafka = new ManagedClusterProperties("local"); kafka.setConnects(null); when(managedClusterPropertiesList.stream()) - .thenReturn(Stream.of(kafka)); + .thenReturn(Stream.of(kafka)); when(kafkaConnectClient.version(any(), any())) - .thenReturn(Mono.just(HttpResponse.ok())) - .thenReturn(Mono.error(new Exception("error"))); + .thenReturn(Mono.just(HttpResponse.ok())) + .thenReturn(Mono.error(new Exception("error"))); StepVerifier.create(connectClusterService.findAll(true)) - .consumeNextWith(result -> { - assertEquals("connect-cluster", result.getMetadata().getName()); - assertEquals(ConnectCluster.Status.HEALTHY, result.getSpec().getStatus()); - assertNull(result.getSpec().getStatusMessage()); - }) - .verifyComplete(); + .consumeNextWith(result -> { + assertEquals("connect-cluster", result.getMetadata().getName()); + assertEquals(ConnectCluster.Status.HEALTHY, result.getSpec().getStatus()); + assertNull(result.getSpec().getStatusMessage()); + }) + .verifyComplete(); } @Test @@ -1018,15 +1037,15 @@ void shouldNotValidateConnectClusterVaultWhenNoConnectClusterAvailableWithAes256 when(securityProperties.getAes256EncryptionKey()).thenReturn(encryptKey); assertEquals(List.of("Invalid empty value for fields \"aes256Key, aes256Salt\": " - + "Both AES key and salt are required for encryption."), + + "Both AES key and salt are required for encryption."), connectClusterService.validateConnectClusterVault(namespace, "prefix.noAesKeyAndSalt")); assertEquals(List.of("Invalid empty value for fields \"aes256Key, aes256Salt\": " - + "Both AES key and salt are required for encryption."), + + "Both AES key and salt are required for encryption."), connectClusterService.validateConnectClusterVault(namespace, "prefix.noAesSalt")); assertEquals(List.of("Invalid empty value for fields \"aes256Key, aes256Salt\": " - + "Both AES key and salt are required for encryption."), + + "Both AES key and salt are required for encryption."), connectClusterService.validateConnectClusterVault(namespace, "prefix.noAesKey")); } diff --git a/src/test/java/com/michelin/ns4kafka/service/ConnectorServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/ConnectorServiceTest.java index 447f84c1e..91b25aa1b 100644 --- a/src/test/java/com/michelin/ns4kafka/service/ConnectorServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/ConnectorServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.service.client.connect.entities.ConnectorType.SOURCE; diff --git a/src/test/java/com/michelin/ns4kafka/service/ConsumerGroupServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/ConsumerGroupServiceTest.java index 1a68921d8..4990d79eb 100644 --- a/src/test/java/com/michelin/ns4kafka/service/ConsumerGroupServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/ConsumerGroupServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/service/NamespaceServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/NamespaceServiceTest.java index 1fefba091..60280ae7a 100644 --- a/src/test/java/com/michelin/ns4kafka/service/NamespaceServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/NamespaceServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.property.ManagedClusterProperties.KafkaProvider.CONFLUENT_CLOUD; diff --git a/src/test/java/com/michelin/ns4kafka/service/ResourceQuotaServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/ResourceQuotaServiceTest.java index 1b18e8d9c..8f8b6ce3e 100644 --- a/src/test/java/com/michelin/ns4kafka/service/ResourceQuotaServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/ResourceQuotaServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static com.michelin.ns4kafka.model.quota.ResourceQuota.ResourceQuotaSpecKey.COUNT_CONNECTORS; diff --git a/src/test/java/com/michelin/ns4kafka/service/RoleBindingServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/RoleBindingServiceTest.java index 83938c9ec..709305c70 100644 --- a/src/test/java/com/michelin/ns4kafka/service/RoleBindingServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/RoleBindingServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java index 49ff85546..a16e4d7a3 100644 --- a/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/SchemaServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/service/StreamServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/StreamServiceTest.java index cad17c771..6afe20dfa 100644 --- a/src/test/java/com/michelin/ns4kafka/service/StreamServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/StreamServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/service/TopicServiceTest.java b/src/test/java/com/michelin/ns4kafka/service/TopicServiceTest.java index 64cafc6ba..dc7bcc556 100644 --- a/src/test/java/com/michelin/ns4kafka/service/TopicServiceTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/TopicServiceTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -404,8 +423,8 @@ void shouldListUnsynchronizedTopics() throws InterruptedException, ExecutionExce @Test void shouldListUnsynchronizedWhenAllExistingTopics() throws InterruptedException, - ExecutionException, - TimeoutException { + ExecutionException, + TimeoutException { // init ns4kfk namespace Namespace ns = Namespace.builder() .metadata(Metadata.builder() @@ -509,8 +528,8 @@ void shouldListUnsynchronizedWhenAllExistingTopics() throws InterruptedException @Test void shouldListUnsynchronizedWhenNotAllTopicsAlreadyExist() throws InterruptedException, - ExecutionException, - TimeoutException { + ExecutionException, + TimeoutException { // init ns4kfk namespace Namespace ns = Namespace.builder() .metadata(Metadata.builder() @@ -642,8 +661,8 @@ void shouldFindCollidingTopicWhenIdenticalName() throws ExecutionException, Inte @Test void shouldFindCollidingTopicsWhenCollidingName() throws ExecutionException, - InterruptedException, - TimeoutException { + InterruptedException, + TimeoutException { Namespace ns = Namespace.builder() .metadata(Metadata.builder() .name("namespace") @@ -671,8 +690,8 @@ void shouldFindCollidingTopicsWhenCollidingName() throws ExecutionException, @Test void shouldHandleInterruptedExceptionWhenFindingCollidingTopics() throws ExecutionException, - InterruptedException, - TimeoutException { + InterruptedException, + TimeoutException { Namespace ns = Namespace.builder() .metadata(Metadata.builder() .name("namespace") @@ -700,8 +719,8 @@ void shouldHandleInterruptedExceptionWhenFindingCollidingTopics() throws Executi @Test void shouldHandleOtherExceptionWhenFindingCollidingTopics() throws ExecutionException, - InterruptedException, - TimeoutException { + InterruptedException, + TimeoutException { Namespace ns = Namespace.builder() .metadata(Metadata.builder() .name("namespace") diff --git a/src/test/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutorTest.java b/src/test/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutorTest.java index c70f544c2..3983c82dd 100644 --- a/src/test/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutorTest.java +++ b/src/test/java/com/michelin/ns4kafka/service/executor/TopicAsyncExecutorTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.service.executor; import static com.michelin.ns4kafka.service.executor.TopicAsyncExecutor.CLUSTER_ID; @@ -126,9 +145,9 @@ void shouldDeleteTagsAndCreateAssociateIfNotEmpty() { properties.put(CLUSTER_ID, CLUSTER_ID_TEST); when(schemaRegistryClient.dissociateTag(anyString(), - anyString(), anyString())) - .thenReturn(Mono.empty()) - .thenReturn(Mono.error(new Exception("error"))); + anyString(), anyString())) + .thenReturn(Mono.empty()) + .thenReturn(Mono.error(new Exception("error"))); when(managedClusterProperties.getName()).thenReturn(LOCAL_CLUSTER); when(managedClusterProperties.getConfig()).thenReturn(properties); @@ -223,12 +242,12 @@ void shouldNotAssociateTagsWhenFail() { .build(); TagTopicInfo tagTopicInfo = TagTopicInfo.builder() - .entityName(managedClusterProperties - .getConfig() - .getProperty(CLUSTER_ID) + ":" + topic.getMetadata().getName()) - .typeName(TAG1) - .entityType(TOPIC_ENTITY_TYPE) - .build(); + .entityName(managedClusterProperties + .getConfig() + .getProperty(CLUSTER_ID) + ":" + topic.getMetadata().getName()) + .typeName(TAG1) + .entityType(TOPIC_ENTITY_TYPE) + .build(); Map> topicTagsMapping = Map.of(topic, List.of(tagTopicInfo)); List response = List.of(TagInfo.builder().name(TAG1).build()); @@ -417,14 +436,14 @@ void shouldUpdateDescriptionWhenSucceed() { Map brokerTopics = Map.of( TOPIC_NAME, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME) - .generation(0) - .build()) - .spec(Topic.TopicSpec.builder() - .description(DESCRIPTION2) - .build()) - .build()); + .metadata(Metadata.builder() + .name(TOPIC_NAME) + .generation(0) + .build()) + .spec(Topic.TopicSpec.builder() + .description(DESCRIPTION2) + .build()) + .build()); when(managedClusterProperties.getConfig()).thenReturn(properties); when(schemaRegistryClient.updateDescription(any(), any())).thenReturn(Mono.just(HttpResponse.ok())); @@ -452,14 +471,14 @@ void shouldUpdateDescriptionWhenFail() { Map brokerTopics = Map.of( TOPIC_NAME, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME) - .generation(0) - .build()) - .spec(Topic.TopicSpec.builder() - .description(DESCRIPTION2) - .build()) - .build()); + .metadata(Metadata.builder() + .name(TOPIC_NAME) + .generation(0) + .build()) + .spec(Topic.TopicSpec.builder() + .description(DESCRIPTION2) + .build()) + .build()); when(managedClusterProperties.getConfig()).thenReturn(properties); when(schemaRegistryClient.updateDescription(any(), any())).thenReturn(Mono.error(new IOException())); @@ -475,12 +494,12 @@ void shouldNotEnrichWithCatalogInfoWhenNotConfluentCloud() { Map brokerTopics = Map.of( TOPIC_NAME, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME) - .build()) - .spec(Topic.TopicSpec.builder() - .build()) - .build()); + .metadata(Metadata.builder() + .name(TOPIC_NAME) + .build()) + .spec(Topic.TopicSpec.builder() + .build()) + .build()); topicAsyncExecutor.enrichWithCatalogInfo(brokerTopics); @@ -514,17 +533,17 @@ void shouldEnrichWithCatalogInfoWhenConfluentCloud() { Map brokerTopics = Map.of( TOPIC_NAME, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build()); + .metadata(Metadata.builder() + .name(TOPIC_NAME) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build()); topicAsyncExecutor.enrichWithCatalogInfo(brokerTopics); assertEquals(Topic.TopicSpec.builder() - .description(DESCRIPTION1) - .tags(List.of(TAG1)).build(), brokerTopics.get(TOPIC_NAME).getSpec()); + .description(DESCRIPTION1) + .tags(List.of(TAG1)).build(), brokerTopics.get(TOPIC_NAME).getSpec()); } @Test @@ -569,7 +588,7 @@ void shouldEnrichWithCatalogInfoForMultipleTopics() { .build(); TopicListResponse response1 = TopicListResponse.builder() - .entities(List.of(entity1, entity2, entity3, entity4)).build(); + .entities(List.of(entity1, entity2, entity3, entity4)).build(); TopicListResponse response2 = TopicListResponse.builder().entities(List.of()).build(); when(schemaRegistryClient.getTopicWithCatalogInfo(LOCAL_CLUSTER, limit, 0)) @@ -579,32 +598,32 @@ void shouldEnrichWithCatalogInfoForMultipleTopics() { Map brokerTopics = Map.of( TOPIC_NAME, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build(), + .metadata(Metadata.builder() + .name(TOPIC_NAME) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build(), TOPIC_NAME2, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME2) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build(), + .metadata(Metadata.builder() + .name(TOPIC_NAME2) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build(), TOPIC_NAME3, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME3) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build(), + .metadata(Metadata.builder() + .name(TOPIC_NAME3) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build(), TOPIC_NAME4, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME4) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build()); + .metadata(Metadata.builder() + .name(TOPIC_NAME4) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build()); topicAsyncExecutor.enrichWithCatalogInfo(brokerTopics); @@ -632,18 +651,18 @@ void shouldEnrichWithCatalogInfoWhenConfluentCloudAndResponseIsNull() { Map brokerTopics = Map.of( TOPIC_NAME, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build(), + .metadata(Metadata.builder() + .name(TOPIC_NAME) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build(), TOPIC_NAME2, Topic.builder() - .metadata(Metadata.builder() - .name(TOPIC_NAME2) - .build()) - .spec(Topic.TopicSpec.builder().build()) - .build()); + .metadata(Metadata.builder() + .name(TOPIC_NAME2) + .build()) + .spec(Topic.TopicSpec.builder().build()) + .build()); topicAsyncExecutor.enrichWithCatalogInfo(brokerTopics); diff --git a/src/test/java/com/michelin/ns4kafka/util/BytesUtilsTest.java b/src/test/java/com/michelin/ns4kafka/util/BytesUtilsTest.java index 6b67e2239..4dcec0614 100644 --- a/src/test/java/com/michelin/ns4kafka/util/BytesUtilsTest.java +++ b/src/test/java/com/michelin/ns4kafka/util/BytesUtilsTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/util/EncryptionUtilsTest.java b/src/test/java/com/michelin/ns4kafka/util/EncryptionUtilsTest.java index dd2116905..5d08be2c8 100644 --- a/src/test/java/com/michelin/ns4kafka/util/EncryptionUtilsTest.java +++ b/src/test/java/com/michelin/ns4kafka/util/EncryptionUtilsTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/michelin/ns4kafka/util/RegexUtilsTest.java b/src/test/java/com/michelin/ns4kafka/util/RegexUtilsTest.java index b2e6f67f4..380312fd5 100644 --- a/src/test/java/com/michelin/ns4kafka/util/RegexUtilsTest.java +++ b/src/test/java/com/michelin/ns4kafka/util/RegexUtilsTest.java @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package com.michelin.ns4kafka.util; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/resources/application-test.yml b/src/test/resources/application-test.yml index 0725322a1..8e4acc599 100644 --- a/src/test/resources/application-test.yml +++ b/src/test/resources/application-test.yml @@ -1,32 +1,28 @@ +kafka: + bootstrap.servers: 'localhost:9092' # Replaced by Testcontainers + sasl.jaas.config: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin";' + sasl.mechanism: 'PLAIN' + security.protocol: 'SASL_PLAINTEXT' micronaut: security: gitlab: enabled: false - -kafka: - bootstrap.servers: "localhost:9092" # Replaced by Testcontainers - sasl.mechanism: "PLAIN" - security.protocol: "SASL_PLAINTEXT" - sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"admin\";" - ns4kafka: - security: - admin-group: adminGroup - local-users: - - username: admin - password: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 - groups: - - "adminGroup" - - username: user - password: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 - groups: - - "userGroup" managed-clusters: test-cluster: + config: + bootstrap.servers: 'localhost:9092' # Replaced by Testcontainers + sasl.jaas.config: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin";' + sasl.mechanism: 'PLAIN' + security.protocol: 'SASL_PLAINTEXT' + connects: + test-connect: + url: 'localhost:8083' # Replaced by Testcontainers manage-acls: true manage-connectors: true - manage-users: true manage-topics: true + manage-users: true + provider: 'SELF_MANAGED' timeout: acl: create: 15000 @@ -35,19 +31,21 @@ ns4kafka: topic: alter-configs: 15003 create: 15004 - describe-configs: 15005 delete: 15006 + describe-configs: 15005 list: 15007 user: alter-quotas: 15008 alter-scram-credentials: 15009 describe-quotas: 15010 - provider: SELF_MANAGED - config: - bootstrap.servers: "localhost:9092" # Replaced by Testcontainers - sasl.mechanism: "PLAIN" - security.protocol: "SASL_PLAINTEXT" - sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"admin\";" - connects: - test-connect: - url: "localhost:8083" # Replaced by Testcontainers \ No newline at end of file + security: + admin-group: 'adminGroup' + local-users: + - groups: + - 'adminGroup' + password: '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918' + username: 'admin' + - groups: + - 'userGroup' + password: '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918' + username: 'user'