Remove Basic Authentication References 08/140708/16
authorToineSiebelink <toine.siebelink@est.tech>
Wed, 16 Apr 2025 12:47:09 +0000 (13:47 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Thu, 24 Apr 2025 17:20:13 +0000 (18:20 +0100)
- Remove whole ‘security’ section from application.yml file(s) also in testware
- Remove whole ‘security’ section from  open api yml file(s) except Policy Executor
- Remove whole ‘component.securitySchemes’ section from  open api yml files
- Remove references to security.auth.username from xml config files
- Removed cps authentication details from Docker compose and readme files (tested)
- Removed authentication groovy test rom cps-application
- Side note: cps-application added test, coverage increased to 100%
- Updated Docker-Compose (CSIT & K6) to latest version
- Minor csit script updates to help troubleshooting
- Removed auth header from ALL csit tests files

Issue-ID: CPS-2600
Change-Id: Ie1cf02461943f4e43029a3dbfaef052e347a4d4d
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
31 files changed:
cps-application/pom.xml
cps-application/src/main/resources/application.yml
cps-application/src/test/groovy/org/onap/cps/ApplicationSpec.groovy [new file with mode: 0644]
cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy [deleted file]
cps-application/src/test/resources/application.yml
cps-ncmp-rest/docs/openapi/openapi-inventory.yml
cps-ncmp-rest/docs/openapi/openapi.yml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/data/DmiDataOperations.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/dmi/DmiRestClient.java
cps-rest/docs/openapi/openapi.yml
cps-service/src/main/resources/logback-spring.xml
csit/install-deps.sh
csit/install-robotframework.sh
csit/plans/cps/setup.sh
csit/plans/cps/test.properties
csit/prepare-csit.sh
csit/run-csit.sh
csit/run-project-csit.sh
csit/tests/cm-handle-query/cm-handle-query.robot
csit/tests/cps-admin/cps-admin.robot
csit/tests/cps-data-operations/cps-data-operations.robot
csit/tests/cps-data-sync/cps-data-sync.robot
csit/tests/cps-data/cps-data.robot
csit/tests/cps-model-sync/cps-model-sync.robot
csit/tests/cps-trust-level/cps-trust-level.robot
csit/tests/ncmp-passthrough/ncmp-passthrough.robot
docker-compose/README.md
docker-compose/docker-compose.yml
integration-test/src/test/resources/application.yml
k6-tests/install-deps.sh
test-tools/perf-test-ncmp-passthrough-read.sh

index eab39a0..76a2da9 100644 (file)
@@ -3,7 +3,7 @@
   ============LICENSE_START=======================================================
   Copyright (c) 2021 Pantheon.tech.
   Modifications Copyright (C) 2021 Bell Canada.
-  Modifications Copyright (C) 2021-2024 Nordix Foundation
+  Modifications Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
   Modifications Copyright (C) 2022 Deutsche Telekom AG
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,7 +37,6 @@
     <properties>
         <app>org.onap.cps.Application</app>
         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
-        <minimum-coverage>0.68</minimum-coverage>
         <base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image>
         <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
     </properties>
index c934b47..26cc9e0 100644 (file)
@@ -143,13 +143,6 @@ springdoc:
             - name: cps-ncmp-inventory
               url: /api-docs/cps-ncmp/openapi-inventory.yaml
 
-security:
-    # comma-separated uri patterns which do not require authorization
-    permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/**
-    auth:
-        username: ${CPS_USERNAME:cpsuser}
-        password: ${CPS_PASSWORD:cpsr0cks!}
-
 cps:
     monitoring:
         micrometer-jvm-extras: false
diff --git a/cps-application/src/test/groovy/org/onap/cps/ApplicationSpec.groovy b/cps-application/src/test/groovy/org/onap/cps/ApplicationSpec.groovy
new file mode 100644 (file)
index 0000000..3ad5fad
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps
+
+
+import spock.lang.Specification
+
+class ApplicationSpec extends Specification {
+
+    def 'Starting CPS application.'() {
+        when: 'start the application'
+            Application.main()
+        then: 'no exception is thrown'
+            noExceptionThrown()
+    }
+
+}
diff --git a/cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy b/cps-application/src/test/groovy/org/onap/cps/rest/controller/ControllerSecuritySpec.groovy
deleted file mode 100755 (executable)
index b86f824..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Pantheon.tech
- * Modifications Copyright (C) 2023 Nordix Foundation
- * ================================================================================
- * Licensed 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.cps.rest.controller
-
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
-
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest
-import org.springframework.http.HttpStatus
-import org.springframework.test.web.servlet.MockMvc
-import spock.lang.Ignore
-import spock.lang.Specification
-
-@WebMvcTest(TestController)
-class ControllerSecuritySpec extends Specification {
-
-    @Autowired
-    MockMvc mvc
-
-    def testEndpoint = '/test'
-
-    def 'Get request with authentication'() {
-        when: 'request is sent with authentication'
-            def response = mvc.perform(
-                    get(testEndpoint).header("Authorization", 'Basic Y3BzdXNlcjpjcHNyMGNrcyE=')
-            ).andReturn().response
-        then: 'HTTP OK status code is returned'
-            assert response.status == HttpStatus.OK.value()
-    }
-
-    @Ignore // CPS-2126
-    def 'Get request without authentication is not authorized'() {
-        when: 'request is sent without authentication'
-            def response = mvc.perform(get(testEndpoint)).andReturn().response
-        then: 'HTTP Unauthorized status code is returned'
-            assert response.status == HttpStatus.UNAUTHORIZED.value()
-    }
-
-    @Ignore // CPS-2126
-    def 'Get request with invalid authentication is not authorized'() {
-        when: 'request is sent with invalid authentication'
-            def response = mvc.perform(
-                    get(testEndpoint).header("Authorization", 'Basic invalid auth')
-            ).andReturn().response
-        then: 'HTTP Unauthorized status code is returned'
-            assert response.status == HttpStatus.UNAUTHORIZED.value()
-    }
-}
index 69e4feb..e20aa0c 100644 (file)
@@ -1,11 +1,12 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2021 Pantheon.tech
-# ================================================================================
-# Licensed 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
+#  ============LICENSE_START=======================================================
+#  Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
+#  ================================================================================
+#  Licensed 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.
 #  SPDX-License-Identifier: Apache-2.0
 #  ============LICENSE_END=========================================================
 
-security:
-  auth:
-    username: cpsuser
-    password: cpsr0cks!
+# This is a full copy of the real application.yml except that liquibase.enabled is set to false!
+# This is needed te be able to test Application.main () method (coverage and context loading test).
+# Cannot use a custom profile. That would require the test to be a springboot test which is even harder to achieve
+
+rest:
+    api:
+        cps-base-path: /cps/api
+        ncmp-base-path: /ncmp
+        ncmp-inventory-base-path: /ncmpInventory
+
+spring:
+    main:
+        banner-mode: "off"
+    application:
+        name: "cps-application"
+    jpa:
+        show-sql: false
+        ddl-auto: create
+        open-in-view: false
+        properties:
+            hibernate.enable_lazy_load_no_trans: true
+            hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
+            # Please ensure these values match those used in integration-test/src/test/resources/application.yml
+            hibernate.id.new_generator_mappings: true
+            hibernate.jdbc.batch_size: 100
+
+    datasource:
+        url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/cpsdb
+        username: ${DB_USERNAME}
+        password: ${DB_PASSWORD}
+        driverClassName: org.postgresql.Driver
+        hikari:
+            minimumIdle: 5
+            maximumPoolSize: 80
+            idleTimeout: 60000
+            connectionTimeout: 30000
+            leakDetectionThreshold: 30000
+            pool-name: CpsDatabasePool
+
+    cache:
+        type: caffeine
+        cache-names: yangSchema
+        caffeine:
+            spec: maximumSize=10000,expireAfterAccess=10m
+
+    liquibase:
+        enabled: false
+
+    servlet:
+        multipart:
+            enabled: true
+            max-file-size: 100MB
+            max-request-size: 100MB
+
+    kafka:
+        bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}
+        security:
+            protocol: PLAINTEXT
+        producer:
+            value-serializer: io.cloudevents.kafka.CloudEventSerializer
+            client-id: cps-core
+        consumer:
+            group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group}
+            key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
+            value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
+            properties:
+                spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
+                spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer
+                spring.json.use.type.headers: false
+
+    jackson:
+        default-property-inclusion: NON_NULL
+        serialization:
+            FAIL_ON_EMPTY_BEANS: false
+    sql:
+        init:
+            mode: ALWAYS
+app:
+    ncmp:
+        async-m2m:
+            topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m}
+        avc:
+            cm-subscription-ncmp-in: ${CM_SUBSCRIPTION_NCMP_IN_TOPIC:subscription}
+            cm-subscription-dmi-in: ${CM_SUBSCRIPTION_DMI_IN_TOPIC:ncmp-dmi-cm-avc-subscription}
+            cm-subscription-dmi-out: ${CM_SUBSCRIPTION_DMI_OUT_TOPIC:dmi-ncmp-cm-avc-subscription}
+            cm-subscription-ncmp-out: ${CM_SUBSCRIPTION_NCMP_OUT_TOPIC:subscription-response}
+            cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
+            inventory-events-topic: ncmp-inventory-events
+    lcm:
+        events:
+            topic: ${LCM_EVENTS_TOPIC:ncmp-events}
+    dmi:
+        cm-events:
+            topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events}
+        device-heartbeat:
+            topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
+    cps:
+        data-updated:
+            change-event-notifications-enabled: ${CPS_CHANGE_EVENT_NOTIFICATIONS_ENABLED:false}
+            topic: ${CPS_CHANGE_EVENT_TOPIC:cps-data-updated-events}
+
+notification:
+    enabled: true
+    async:
+        executor:
+            core-pool-size: 2
+            max-pool-size: 10
+            queue-capacity: 500
+            wait-for-tasks-to-complete-on-shutdown: true
+            thread-name-prefix: Async-
+            time-out-value-in-ms: 60000
+
+springdoc:
+    swagger-ui:
+        disable-swagger-default-url: true
+        urlsPrimaryName: cps-core
+        urls:
+            - name: cps-core
+              url: /api-docs/cps-core/openapi.yaml
+            - name: cps-ncmp
+              url: /api-docs/cps-ncmp/openapi.yaml
+            - name: cps-ncmp-inventory
+              url: /api-docs/cps-ncmp/openapi-inventory.yaml
+
+cps:
+    monitoring:
+        micrometer-jvm-extras: false
+    tracing:
+        sampler:
+            jaeger_remote:
+                endpoint: ${ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT:http://onap-otel-collector:14250}
+        exporter:
+            endpoint: ${ONAP_OTEL_EXPORTER_ENDPOINT:http://onap-otel-collector:4317}
+            protocol: ${ONAP_OTEL_EXPORTER_PROTOCOL:grpc}
+        enabled: ${ONAP_TRACING_ENABLED:false}
+        excluded-observation-names: ${ONAP_EXCLUDED_OBSERVATION_NAMES:tasks.scheduled.execution}
+
+# Actuator
+management:
+    tracing:
+        propagation:
+            produce: ${ONAP_PROPAGATOR_PRODUCE:[W3C]}
+        sampling:
+            probability: 1.0
+    endpoints:
+        web:
+            exposure:
+                include: info,health,loggers,prometheus,metrics,heapdump,threaddump
+    endpoint:
+        health:
+            show-details: always
+            # kubernetes probes: liveness and readiness
+            probes:
+                enabled: true
+
+    info:
+        git:
+            enabled: true
+            mode: full
+
+logging:
+    format: json
+    level:
+        org:
+            springframework: INFO
+            onap:
+                cps: INFO
+ncmp:
+    policy-executor:
+        enabled: ${POLICY_SERVICE_ENABLED:false}
+        defaultDecision: ${POLICY_SERVICE_DEFAULT_DECISION:"allow"}
+        server:
+            address: ${POLICY_SERVICE_URL:http://policy-executor-stub}
+            port: ${POLICY_SERVICE_PORT:8093}
+        httpclient:
+            all-services:
+                maximumInMemorySizeInMegabytes: 16
+                maximumConnectionsTotal: 100
+                pendingAcquireMaxCount: 50
+                connectionTimeoutInSeconds: 30
+                readTimeoutInSeconds: 30
+                writeTimeoutInSeconds: 30
+                responseTimeoutInSeconds: 60
+    dmi:
+        httpclient:
+            data-services:
+                maximumInMemorySizeInMegabytes: 16
+                maximumConnectionsTotal: 100
+                pendingAcquireMaxCount: 50
+                connectionTimeoutInSeconds: 30
+                readTimeoutInSeconds: 30
+                writeTimeoutInSeconds: 30
+                responseTimeoutInSeconds: 60
+            model-services:
+                maximumInMemorySizeInMegabytes: 16
+                maximumConnectionsTotal: 100
+                pendingAcquireMaxCount: 50
+                connectionTimeoutInSeconds: 30
+                readTimeoutInSeconds: 30
+                writeTimeoutInSeconds: 30
+                responseTimeoutInSeconds: 60
+        auth:
+            username: ${DMI_USERNAME:cpsuser}
+            password: ${DMI_PASSWORD:cpsr0cks!}
+            enabled: ${DMI_AUTH_ENABLED:true}
+        api:
+            base-path: dmi
+
+    timers:
+        advised-modules-sync:
+            initial-delay-ms: 40000
+            sleep-time-ms: 5000
+        cm-handle-data-sync:
+            initial-delay-ms: 40000
+            sleep-time-ms: 30000
+        subscription-forwarding:
+            dmi-response-timeout-ms: 30000
+        model-loader:
+            retry-time-ms: 1000
+        trust-level:
+            dmi-availability-watchdog-ms: 30000
+
+    model-loader:
+        maximum-attempt-count: 20
+
+# Custom Hazelcast Config.
+hazelcast:
+    cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"}
+    instance-config-name: ${CPS_NCMP_INSTANCE_CONFIG_NAME:"cps-and-ncmp-hazelcast-instance-config"}
+    mode:
+        kubernetes:
+            enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false}
+            service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"}
+
+otel:
+    exporter:
+        otlp:
+            traces:
+                protocol: ${ONAP_OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:grpc}
index cd497e7..7658075 100755 (executable)
@@ -24,11 +24,6 @@ info:
   version: "3.6.2"
 servers:
   - url: /ncmpInventory
-components:
-  securitySchemes:
-    basicAuth:
-      type: http
-      scheme: basic
 paths:
   /v1/ch:
     $ref: 'ncmp-inventory.yml#/updateDmiRegistration'
@@ -38,6 +33,3 @@ paths:
 
   /v1/ch/searches:
     $ref: 'ncmp-inventory.yml#/searchCmHandleIds'
-
-security:
-  - basicAuth: []
index 156aa6b..1f69cc6 100755 (executable)
@@ -25,11 +25,6 @@ info:
   version: "3.6.2"
 servers:
   - url: /ncmp
-components:
-  securitySchemes:
-    basicAuth:
-      type: http
-      scheme: basic
 paths:
   /v1/ch/{cm-handle}/data/ds/{datastore-name}:
     $ref: 'ncmp.yml#/resourceDataForCmHandle'
@@ -63,5 +58,3 @@ paths:
 
   /v1/ch/{cm-handle}/data-sync:
     $ref: 'ncmp.yml#/setDataSyncEnabledFlag'
-security:
-  - basicAuth: []
index 0e9db3d..ed67be6 100644 (file)
@@ -125,7 +125,7 @@ public class DmiDataOperations {
                 PASSTHROUGH_OPERATIONAL.getDatastoreName(), yangModelCmHandle, "/", null,
                 null);
         return dmiRestClient.synchronousPostOperationWithJsonData(DATA, urlTemplateParameters, jsonRequestBody, READ,
-                null);
+                DmiRestClient.NO_AUTHORIZATION);
     }
 
     /**
index ccda476..060051e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021-2025 Nordix Foundation
+ *  Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
  *  Modifications Copyright (C) 2022 Bell Canada
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
@@ -53,8 +53,9 @@ import reactor.core.publisher.Mono;
 @Slf4j
 public class DmiRestClient {
 
+    public static final String NO_AUTHORIZATION = null;
+
     private static final String NOT_SPECIFIED = "";
-    private static final String NO_AUTHORIZATION = null;
 
     private final DmiProperties dmiProperties;
     private final JsonObjectMapper jsonObjectMapper;
index 3aeee4a..747531b 100644 (file)
@@ -34,11 +34,6 @@ info:
 
 servers:
   - url: /cps/api
-components:
-  securitySchemes:
-    basicAuth:
-      type: http
-      scheme: basic
 tags:
   - name: cps-admin
     description: cps Admin
@@ -119,6 +114,3 @@ paths:
 
   /v2/notification-subscription:
     $ref: 'cpsAdminV2.yml#/notificationSubscription'
-
-security:
-  - basicAuth: []
index 0307602..6f7ba4d 100644 (file)
@@ -1,6 +1,6 @@
 <!--
  ============LICENSE_START=======================================================
- Copyright (C) 2021-2022 Nordix Foundation
+ Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
  ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
     <include resource="org/springframework/boot/logging/logback/console-appender.xml" />
 
     <springProperty scope="context" name="springAppName" source="spring.application.name"/>
-    <springProperty scope="context" name="username" source="security.auth.username"/>
     <springProperty scope="context" name="loggingFormat" source="logging.format"/>
 
     <property name="currentTimeStamp" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}"/>
index ef0b96a..1b4a0ae 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright 2024 Nordix Foundation.
+# Copyright 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ export PATH="$(pwd)/bin:$PATH"
 # Download docker-compose.
 if [ ! -x bin/docker-compose ]; then
   echo " Downloading docker-compose"
-  curl -s -L https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64 > bin/docker-compose
+  curl -s -L https://github.com/docker/compose/releases/download/v2.35.1/docker-compose-linux-x86_64 > bin/docker-compose
   chmod +x bin/docker-compose
 else
   echo " docker-compose already installed"
index 54dbce4..867ef3c 100644 (file)
@@ -1,3 +1,19 @@
+#
+# Copyright 2025 OpenInfra Foundation Europe. All rights reserved.
+#
+# Licensed 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.
+#
+
 set -exu
 
 ROBOT3_VENV=$(mktemp -d --suffix=robot_venv)
@@ -8,7 +24,6 @@ echo "Python version is: $(python3 --version)"
 python3 -m venv "${ROBOT3_VENV}"
 source "${ROBOT3_VENV}/bin/activate"
 
-
 # Make sure pip3 itself us up-to-date.
 python3 -m pip install --upgrade pip
 
index f22173a..5591e47 100755 (executable)
@@ -5,7 +5,7 @@
 # Modifications copyright (c) 2020-2021 Samsung Electronics Co., Ltd.
 # Modifications Copyright (C) 2021 Pantheon.tech
 # Modifications Copyright (C) 2021 Bell Canada.
-# Modifications Copyright (C) 2021-2025 OpenInfra Foundation Europe.
+# Modifications Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
index ce21832..53e3105 100644 (file)
@@ -9,8 +9,6 @@ SDNC_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
 
 CPS_CORE_HOST=$LOCAL_IP
 CPS_CORE_PORT=8883
-CPS_CORE_USERNAME=cpsuser
-CPS_CORE_PASSWORD=cpsr0cks!
 
 DMI_HOST=ncmp-dmi-plugin
 DMI_PORT=8080
index 1b8578e..c4c96c6 100755 (executable)
@@ -2,6 +2,7 @@
 #
 # Copyright 2019-2021 © Samsung Electronics Co., Ltd.
 # Modifications Copyright (C) 2021 Pantheon.tech
+# Modifications Copyright 2025 OpenInfra Foundation Europe. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -51,8 +52,10 @@ if [ -f ${WORKSPACE}/env.properties ]; then
     source ${WORKSPACE}/env.properties
 fi
 if [ -f ${ROBOT3_VENV}/bin/activate ]; then
+   echo "Activating existing Robot3 Env"
    source ${ROBOT3_VENV}/bin/activate
 else
+    echo "Installing Robot3 Env"
     rm -rf /tmp/ci-management
     rm -f ${WORKSPACE}/env.properties
     cd /tmp
@@ -67,11 +70,11 @@ rm -rf ${ROBOT3_VENV}/src/onap/testsuite
 
 python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==11.0.0.dev17' --pre
 
-echo "Versioning information:"
+echo "[Prepare] Versioning information:"
 python3 --version
 
 echo "Installing confluent kafka library for robot framework:"
 pip install robotframework-confluentkafkalibrary==2.4.0-2
 
 pip freeze
-python3 -m robot.run --version || :
\ No newline at end of file
+python3 -m robot.run --version || :
index 93941e2..f9c8f00 100755 (executable)
@@ -219,7 +219,7 @@ echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
 echo "Starting Robot test suites ${SUITES} ..."
 relax_set
 
-echo "Versioning information:"
+echo "[Run] Versioning information:"
 python3 --version
 pip freeze
 python3 -m robot.run --version || :
index f362cc7..958e925 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Copyright 2020-2021 © Samsung Electronics Co., Ltd.
 # Modifications Copyright (C) 2021 Pantheon.tech
-# Modifications Copyright (C) 2024 Nordix Foundation.
+# Modifications Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
index a16446a..00a27de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2022-2024 Nordix Foundation
+ *  Copyright (C) 2022-2025 OpenInfra Foundation Europe. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                                     Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${ncmpBasePath}                             /ncmp/v1
 ${jsonModuleAndPropertyQueryParameters}     {"cmHandleQueryParameters": [{"conditionName": "hasAllModules", "conditionParameters": [ {"moduleName": "iana-crypt-hash"} ]}, {"conditionName": "hasAllProperties", "conditionParameters": [ {"Contact": "newemailforstore@bookstore.com"} ]}]}
 ${jsonEmptyQueryParameters}                 {}
@@ -39,20 +38,20 @@ ${jsonMissingPropertyQueryParameters}       {"cmHandleQueryParameters": [{"condi
 *** Test Cases ***
 Retrieve CM Handle ids where query parameters Match (module and property query)
     ${uri}=              Set Variable       ${ncmpBasePath}/ch/id-searches
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonModuleAndPropertyQueryParameters}
     Should Be Equal As Strings              ${response.status_code}   200
     Should Contain       ${response.json()}    ietfYang-PNFDemo
 
 Retrieve CM Handle ids where query parameters Match (empty query)
     ${uri}=              Set Variable       ${ncmpBasePath}/ch/id-searches
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonEmptyQueryParameters}
     Should Be Equal As Strings              ${response.status_code}   200
     Should Contain       ${response.json()}    ietfYang-PNFDemo
 
 Throw 400 when Structure of Request is Incorrect
     ${uri}=              Set Variable       ${ncmpBasePath}/ch/id-searches
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonMissingPropertyQueryParameters}    expected_status=400
     Should Be Equal As Strings              ${response}   <Response [400]>
index 0df67b6..10b86bf 100644 (file)
@@ -1,5 +1,6 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021 Pantheon.tech.
+# Modifications Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -27,7 +28,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                 Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${basePath}             /cps/api
 ${dataspaceName}        CSIT-Dataspace
 ${schemaSetName}        CSIT-SchemaSet
@@ -38,8 +38,7 @@ ${ranDataspaceName}     NFP-Operational
 Create Dataspace
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces
     ${params}=          Create Dictionary   dataspace-name=${dataspaceName}
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        POST On Session     CPS_URL   ${uri}   params=${params}   headers=${headers}
+    ${response}=        POST On Session     CPS_URL   ${uri}   params=${params}
     Should Be Equal As Strings              ${response.status_code}   201
 
 Create Schema Set from YANG file
@@ -48,8 +47,7 @@ Create Schema Set from YANG file
     ${fileData}=        Get Binary File     ${DATADIR_CPS_CORE}${/}test-tree.yang
     ${fileTuple}=       Create List         test.yang   ${fileData}   application/zip
     &{files}=           Create Dictionary   file=${fileTuple}
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        POST On Session     CPS_URL   ${uri}   files=${files}   params=${params}   headers=${headers}
+    ${response}=        POST On Session     CPS_URL   ${uri}   files=${files}   params=${params}
     Should Be Equal As Strings              ${response.status_code}   201
 
 Create Schema Set from ZIP file
@@ -58,14 +56,12 @@ Create Schema Set from ZIP file
     ${fileData}=        Get Binary File     ${DATADIR_CPS_CORE}${/}yang-resources.zip
     ${fileTuple}=       Create List         test.zip   ${fileData}   application/zip
     &{files}=           Create Dictionary   file=${fileTuple}
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        POST On Session     CPS_URL   ${uri}   files=${files}   params=${params}   headers=${headers}
+    ${response}=        POST On Session     CPS_URL   ${uri}   files=${files}   params=${params}
     Should Be Equal As Strings              ${response.status_code}   201
 
 Get Schema Set info
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces/${dataspaceName}/schema-sets/${schemaSetName}
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        Get On Session      CPS_URL   ${uri}   headers=${headers}   expected_status=200
+    ${response}=        Get On Session      CPS_URL   ${uri}   expected_status=200
     ${responseJson}=    Set Variable        ${response.json()}
     Should Be Equal As Strings              ${responseJson['name']}   ${schemaSetName}
     Should Be Equal As Strings              ${responseJson['dataspaceName']}   ${dataspaceName}
@@ -73,6 +69,5 @@ Get Schema Set info
 Create Anchor
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces/${dataspaceName}/anchors
     ${params}=          Create Dictionary   schema-set-name=${schemaSetName}   anchor-name=${anchorName}
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        POST On Session     CPS_URL   ${uri}   params=${params}   headers=${headers}
+    ${response}=        POST On Session     CPS_URL   ${uri}   params=${params}
     Should Be Equal As Strings              ${response.status_code}   201
index 96212ff..5f6567e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023-2024 Nordix Foundation
+ *  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                                 Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${topic}                                data-operation-client-topic
 ${ncmpBasePath}                         /ncmp
 ${expectedRequestId}                    ${EMPTY}
@@ -45,11 +44,10 @@ NCMP Data Operation, forwarded to DMI, response on Client Topic
         ${uri}=                          Set Variable        ${ncmpBasePath}/v1/data
         ${dataOperationReqBody}=         Get Binary File     ${DATADIR_CPS_CORE}${/}dataOperationRequest.json
         ${params}=                       Create Dictionary   topic=${topic}
-        ${headers}=                      Create Dictionary   Content-Type=application/json         Authorization=${auth}
+        ${headers}=                      Create Dictionary   Content-Type=application/json
                                          POST On Session     CPS_URL   ncmpInventory/v1/ch         headers=${headers}     data=${newCmHandleRequestBody}
         ${getCmHandleUri}=               Set Variable        ${ncmpBasePath}/v1/ch/CMHandle1
-        ${getCmHandleHeaders}=           Create Dictionary   Authorization=${auth}
-        Wait Until Keyword Succeeds      20sec    200ms       Is CM Handle READY    ${getCmHandleUri}    ${getCmHandleHeaders}    CMHandle1
+        Wait Until Keyword Succeeds      20sec    200ms       Is CM Handle READY    ${getCmHandleUri}    CMHandle1
         ${response}=                     POST On Session     CPS_URL   ${uri}   params=${params}   headers=${headers}     data=${dataOperationReqBody}
         Set Global Variable              ${expectedRequestId}       ${response.json()}[requestId]
         Should Be Equal As Strings       ${response.status_code}   200
@@ -76,8 +74,8 @@ Compare Header Values
     END
 
 Is CM Handle READY
-    [Arguments]    ${uri}    ${headers}    ${cmHandle}
-    ${response}=    GET On Session    CPS_URL    ${uri}    headers=${headers}
+    [Arguments]    ${uri}    ${cmHandle}
+    ${response}=    GET On Session    CPS_URL    ${uri}
     Should Be Equal As Strings    ${response.status_code}    200
     ${number_of_items}=    Count Items In JSON Response    ${response}
     Should Be True    ${number_of_items} > 0
index b8ba479..94ee7cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2022-2024 Nordix Foundation
+ *  Copyright (C) 2022-2025 OpenInfra Foundation Europe. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                   Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${ncmpBasePath}           /ncmp
 
 *** Test Cases ***
@@ -38,22 +37,19 @@ ${ncmpBasePath}           /ncmp
 Operational state goes to UNSYNCHRONIZED when data sync (flag) is enabled
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data-sync
     ${params}=           Create Dictionary  dataSyncEnabled=true
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         PUT On Session     CPS_URL   ${uri}   params=${params}   headers=${headers}
+    ${response}=         PUT On Session     CPS_URL   ${uri}   params=${params}
     Should Be Equal As Strings              ${response.status_code}   200
     ${verifyUri}=        Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/state
-    ${verifyHeaders}=    Create Dictionary  Authorization=${auth}
-    ${verifyResponse}=   GET On Session     CPS_URL   ${verifyUri}   headers=${verifyHeaders}
+    ${verifyResponse}=   GET On Session     CPS_URL   ${verifyUri}
     Should Be Equal As Strings    ${verifyResponse.json()['state']['dataSyncState']['operational']['syncState']}   UNSYNCHRONIZED
 
 Operational state goes to SYNCHRONIZED after sometime when data sync (flag) is enabled
     ${uri}=        Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/state
-    ${headers}=    Create Dictionary  Authorization=${auth}
-    Wait Until Keyword Succeeds    40sec    100ms    Is CM Handle State SYNCHRONIZED    ${uri}    ${headers}
+    Wait Until Keyword Succeeds    40sec    100ms    Is CM Handle State SYNCHRONIZED    ${uri}
 
 *** Keywords ***
 
 Is CM Handle State SYNCHRONIZED
-    [Arguments]    ${uri}    ${headers}
-    ${response}=   GET On Session     CPS_URL    ${uri}    headers=${headers}
+    [Arguments]    ${uri}
+    ${response}=   GET On Session     CPS_URL    ${uri}
     Should Be Equal As Strings        ${response.json()['state']['dataSyncState']['operational']['syncState']}    SYNCHRONIZED
index e83857c..b0cd9e7 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021 Pantheon.tech.
 # Modifications Copyright (C) 2022 Bell Canada.
-# Modifications Copyright (C) 2022-2023 Nordix Foundation.
+# Modifications Copyright (C) 2022-2025 OpenInfra Foundation Europe. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -29,7 +29,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                 Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${basePath}             /cps/api
 ${dataspaceName}        CSIT-Dataspace
 ${anchorName}           CSIT-Anchor
@@ -37,7 +36,7 @@ ${anchorName}           CSIT-Anchor
 *** Test Cases ***
 Create Data Node
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/nodes
-    ${headers}          Create Dictionary   Content-Type=application/json   Authorization=${auth}
+    ${headers}          Create Dictionary   Content-Type=application/json
     ${jsonData}=        Get Binary File     ${DATADIR_CPS_CORE}${/}test-tree.json
     ${response}=        POST On Session     CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   201
@@ -45,7 +44,7 @@ Create Data Node
 Patch Data Node
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/nodes
     ${params}=          Create Dictionary   xpath=/test-tree/branch[@name='Right']
-    ${headers}          Create Dictionary   Content-Type=application/json   Authorization=${auth}
+    ${headers}          Create Dictionary   Content-Type=application/json
     ${jsonData}=        Get Binary File     ${DATADIR_CPS_CORE}${/}testTreePatchExample.json
     ${response}=        PATCH On Session    CPS_URL   ${uri}  params=${params}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -53,8 +52,7 @@ Patch Data Node
 Get Updated Data Node by XPath
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
     ${params}=          Create Dictionary   xpath=/test-tree/branch[@name='Right']/nest
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        Get On Session      CPS_URL   ${uri}   params=${params}   headers=${headers}   expected_status=200
+    ${response}=        Get On Session      CPS_URL   ${uri}   params=${params}   expected_status=200
     ${responseJson}=    Set Variable        ${response.json()['tree:nest']}
     Should Be Equal As Strings              ${responseJson['name']}   Bigger
     ${length_birds}=    Get Length          ${responseJson['birds']}
@@ -64,8 +62,7 @@ Get Updated Data Node by XPath
 Get Data Node by XPath
     ${uri}=             Set Variable        ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
     ${params}=          Create Dictionary   xpath=/test-tree/branch[@name='LEFT/left']/nest
-    ${headers}=         Create Dictionary   Authorization=${auth}
-    ${response}=        Get On Session      CPS_URL   ${uri}   params=${params}   headers=${headers}   expected_status=200
+    ${response}=        Get On Session      CPS_URL   ${uri}   params=${params}   expected_status=200
     Should Be Equal As Strings              ${response.json()['tree:nest']['name']}   SMALL/small
 
 
index b4e61b3..d8d17f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021-2024 Nordix Foundation
+ *  Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -31,7 +31,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                   Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${ncmpInventoryBasePath}  /ncmpInventory
 ${ncmpBasePath}           /ncmp
 ${dmiUrl}                 http://${DMI_HOST}:${DMI_PORT}
@@ -42,14 +41,13 @@ ${deletePayload}         {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPl
 *** Test Cases ***
 Register data node and sync modules.
     ${uri}=              Set Variable       ${ncmpInventoryBasePath}/v1/ch
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${createPayload}
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get CM Handle details and confirm it has been registered.
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         GET On Session     CPS_URL   ${uri}
     ${responseJson}=     Set Variable       ${response.json()}
     ${schemaCount}=      Get length         ${responseJson}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -61,14 +59,13 @@ Get CM Handle details and confirm it has been registered.
 
 Update data node and sync modules.
     ${uri}=              Set Variable       ${ncmpInventoryBasePath}/v1/ch
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${updatePayload}
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get CM Handle details and confirm it has been updated.
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         GET On Session     CPS_URL   ${uri}
     ${responseJson}=     Set Variable       ${response.json()}
     ${schemaCount}=      Get length         ${responseJson}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -80,13 +77,11 @@ Get CM Handle details and confirm it has been updated.
 
 Check if ietfYang-PNFDemo is READY
     ${uri}=        Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
-    ${headers}=    Create Dictionary  Authorization=${auth}
-    Wait Until Keyword Succeeds       20sec    200ms    Is CM Handle READY    ${uri}    ${headers}    ietfYang-PNFDemo
+    Wait Until Keyword Succeeds       20sec    200ms    Is CM Handle READY    ${uri}    ietfYang-PNFDemo
 
 Get modules for registered data node
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/modules
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         GET On Session     CPS_URL   ${uri}
     Should Be Equal As Strings              ${response.status_code}   200
     ${number_of_items}=    Count Items In JSON Response    ${response}
     Should Be True    ${number_of_items} > 0
@@ -98,20 +93,19 @@ Get modules for registered data node
 
 Delete cm handle
     ${uri}=              Set Variable       ${ncmpInventoryBasePath}/v1/ch
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${deletePayload}
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get cm handle details and confirm it has been deleted
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/CmHandleForDelete
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}   expected_status=404
+    ${response}=         GET On Session     CPS_URL   ${uri}   expected_status=404
 
 *** Keywords ***
 
 Is CM Handle READY
-    [Arguments]    ${uri}    ${headers}    ${cmHandle}
-    ${response}=    GET On Session    CPS_URL    ${uri}    headers=${headers}
+    [Arguments]    ${uri}    ${cmHandle}
+    ${response}=    GET On Session    CPS_URL    ${uri}
     Should Be Equal As Strings    ${response.status_code}    200
     ${number_of_items}=    Count Items In JSON Response    ${response}
     Should Be True    ${number_of_items} > 0
index 98ec665..767ad44 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023-2025 Nordix Foundation
+ *  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ Library               ConfluentKafkaLibrary
 Suite Setup           Create Session    CPS_URL    http://${CPS_CORE_HOST}:${CPS_CORE_PORT}
 
 *** Variables ***
-${auth}                                     Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${ncmpInventoryBasePath}                    /ncmpInventory
 ${ncmpBasePath}                             /ncmp/v1
 ${dmiUrl}                                   http://${DMI_HOST}:${DMI_PORT}
@@ -41,7 +40,7 @@ ${jsonTrustLevelEventPayload}               {"data":{"attributeValueChange":[{"a
 *** Test Cases ***
 Register data node
     ${uri}=         Set Variable         ${ncmpInventoryBasePath}/v1/ch
-    ${headers}=     Create Dictionary    Content-Type=application/json    Authorization=${auth}
+    ${headers}=     Create Dictionary    Content-Type=application/json
     ${response}=    POST On Session      CPS_URL   ${uri}    headers=${headers}    data=${jsonCreateCmHandles}
     Should Be Equal As Strings           ${response.status_code}    200
 
@@ -62,7 +61,7 @@ Verify notification
 
 Retrieve CM Handle ids where query parameters Match (trust level query)
     ${uri}=              Set Variable       ${ncmpBasePath}/ch/id-searches
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonTrustLevelPropertyQueryParameters}
     ${responseJson}=     Set Variable       ${response.json()}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -82,4 +81,4 @@ Compare Header Values
 Basic Teardown
     [Arguments]       ${group_id}
     Unsubscribe       ${group_id}
-    Close Consumer    ${group_id}
\ No newline at end of file
+    Close Consumer    ${group_id}
index 02689f3..fbfbc4d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021-2024 Nordix Foundation
+ *  Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ Suite Setup           Create Session      CPS_URL    http://${CPS_CORE_HOST}:${C
 
 *** Variables ***
 
-${auth}                 Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${ncmpBasePath}         /ncmp
 ${netconf}              NETCONF
 
@@ -38,14 +37,12 @@ ${netconf}              NETCONF
 
 Get for Passthrough Operational (CF, RO) with fields & topic
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=ietf-netconf-monitoring:netconf-state&options=(fields=schemas/schema)&topic=test-topic
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}   expected_status=200
+    ${response}=         Get On Session     CPS_URL   ${uri}   expected_status=200
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get for Passthrough Operational (CF, RO) with fields
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=ietf-netconf-monitoring:netconf-state&options=(fields=schemas/schema)
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}   expected_status=200
+    ${response}=         Get On Session     CPS_URL   ${uri}   expected_status=200
     ${responseJson}=     Set Variable       ${response.json()}
     ${schemaCount}=      Get length         ${responseJson['ietf-netconf-monitoring:netconf-state']['schemas']}
     Should Be True                          ${schemaCount} >0
@@ -53,15 +50,14 @@ Get for Passthrough Operational (CF, RO) with fields
 
 Create to bookstore using passthrough-running
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstoreCreateExample.json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   201
 
 Verify create to bookstore using passthrough-running
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         Get On Session     CPS_URL   ${uri}
     Should Be Equal As Strings              ${response.status_code}   200
     FOR   ${item}   IN  @{response.json()['stores:bookstore']['categories']}
         IF   "${item['code']}" == "01"
@@ -76,15 +72,14 @@ Verify create to bookstore using passthrough-running
 
 Update Bookstore using passthrough-running update Category 01 (replace category)
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstoreUpdateExample.json
     ${response}=         PUT On Session     CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   200
 
 Verify update to bookstore using passthrough-running updated category 01
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         Get On Session     CPS_URL   ${uri}
     Should Be Equal As Strings              ${response.status_code}   200
     FOR   ${item}   IN  @{response.json()['stores:categories']}
         IF   "${item['code']}" == "01"
@@ -94,22 +89,19 @@ Verify update to bookstore using passthrough-running updated category 01
 
 Verify update to bookstore using passthrough-running did not remove category 02
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         Get On Session     CPS_URL   ${uri}
     Should Be Equal As Strings              ${response.status_code}   200
     ${schemaCount}=      Get length         ${response.json()['stores:bookstore']['categories']}
     Should Be Equal As Numbers              ${schemaCount}  2
 
 Delete Bookstore using passthrough-running for Category 01
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
-    ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
-    ${response}=         DELETE On Session  CPS_URL   ${uri}   headers=${headers}
+    ${response}=         DELETE On Session  CPS_URL   ${uri}
     Should Be Equal As Strings              ${response.status_code}   204
 
 Verify delete to bookstore using passthrough-running removed only category 01
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
+    ${response}=         Get On Session     CPS_URL   ${uri}
     ${responseJson}=     Set Variable       ${response.json()['stores:bookstore']['categories']}
     Should Be Equal As Strings              ${response.status_code}   200
     ${schemaCount}=      Get length         ${responseJson}
@@ -122,13 +114,12 @@ Verify delete to bookstore using passthrough-running removed only category 01
 
 Patch will add new category with new book and add a new book to an existing category
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
-    ${headers}=          Create Dictionary  Content-Type=application/yang.patch+json   Authorization=${auth}
+    ${headers}=          Create Dictionary  Content-Type=application/yang.patch+json
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstorePatchExample.json
     ${response}=         PATCH On Session   CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   200
     ${verifyUri}=       Set Variable        ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=100
-    ${verifyHeaders}=    Create Dictionary  Authorization=${auth}
-    ${verifyResponse}=   Get On Session     CPS_URL   ${verifyUri}   headers=${verifyHeaders}
+    ${verifyResponse}=   Get On Session     CPS_URL   ${verifyUri}
     Should Be Equal As Strings              ${verifyResponse.status_code}   200
     FOR   ${item}   IN  @{verifyResponse.json()['stores:categories']}
         IF   "${item['code']}" == "100"
@@ -136,5 +127,5 @@ Patch will add new category with new book and add a new book to an existing cate
         END
     END
     ${verifyUri}=       Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=02/books=A%20New%20book%20in%20existing%20category
-    ${verifyResponse}=  Get On Session     CPS_URL   ${verifyUri}   headers=${verifyHeaders}
+    ${verifyResponse}=  Get On Session     CPS_URL   ${verifyUri}
     Should Be Equal As Strings             ${verifyResponse.status_code}   200
index ea5a2a7..b321c80 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2020 Pantheon.tech
-   Modifications Copyright (C) 2020-2024 Nordix Foundation.
+   Modifications Copyright (C) 2020-2025 OpenInfra Foundation Europe. All rights reserved.
    Modifications Copyright (C) 2021 Bell Canada.
    Modifications Copyright (C) 2022 TechMahindra Ltd.
   ================================================================================
@@ -113,7 +113,7 @@ Then CPS can be started either using a Java Archive previously built or directly
 Following command starts the application using JAR file:
 
 ```bash
-DB_HOST=localhost DB_USERNAME=cps DB_PASSWORD=cps CPS_USERNAME=cpsuser CPS_PASSWORD=cpsr0cks! \
+DB_HOST=localhost DB_USERNAME=cps DB_PASSWORD=cps \
   DMI_USERNAME=cpsuser DMI_PASSWORD=cpsr0cks! \
   java -jar cps-application/target/cps-application-x.y.z-SNAPSHOT.jar
 ```
@@ -125,7 +125,6 @@ Here are the steps to run or debug the application from Intellij:
 1. Enable the desired maven profile form Maven Tool Window
 2. Run a configuration from `Run -> Edit configurations` with following settings:
    * `Environment variables`: `DB_HOST=localhost;DB_USERNAME=cps;DB_PASSWORD=cps
-                                CPS_USERNAME=cpsuser CPS_PASSWORD=cpsr0cks!
                                 DMI_USERNAME=cpsuser DMI_PASSWORD=cpsr0cks!`
 
 ## Accessing services
index 568fab4..126b959 100644 (file)
@@ -61,8 +61,6 @@ services:
       ### DEBUG: Uncomment next line to enable java debugging (ensure 'ports' aligns with 'deploy')
       ### - ${CPS_CORE_DEBUG_PORT:-5005}:5005-
     environment:
-      CPS_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
-      CPS_PASSWORD: ${CPS_CORE_PASSWORD:-cpsr0cks!}
       DB_HOST: ${DB_HOST:-dbpostgresql}
       DB_USERNAME: ${DB_USERNAME:-cps}
       DB_PASSWORD: ${DB_PASSWORD:-cps}
index 024ff5b..104034a 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (C) 2023-2024 Nordix Foundation.
+# Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -135,13 +135,6 @@ springdoc:
       - name: cps-ncmp-inventory
         url: /api-docs/cps-ncmp/openapi-inventory.yaml
 
-security:
-  # comma-separated uri patterns which do not require authorization
-  permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/**
-  auth:
-    username: cps
-    password: cpsr0cks!
-
 # Actuator
 management:
   endpoints:
index bb5deb9..393a255 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright 2024 Nordix Foundation.
+# Copyright 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ export PATH="$(pwd)/bin:$PATH"
 # Download docker-compose.
 if [ ! -x bin/docker-compose ]; then
   echo " Downloading docker-compose"
-  curl -s -L https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64 > bin/docker-compose
+  curl -s -L https://github.com/docker/compose/releases/download/v2.35.1/docker-compose-linux-x86_64 > bin/docker-compose
   chmod +x bin/docker-compose
 else
   echo " docker-compose already installed"
index 21b031c..3460ddd 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright 2024 Nordix Foundation.
+# Copyright 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -28,8 +28,6 @@ set -o pipefail # Use last non-zero exit code in a pipeline
 ############################
 CPS_HOST=localhost
 CPS_PORT=8883
-CPS_USERNAME=cpsuser
-CPS_PASSWORD=cpsr0cks!
 PARALLEL_REQUESTS=12
 WARMUP_REQUESTS=600
 MEASUREMENT_REQUESTS=240
@@ -40,7 +38,7 @@ DMI_DATA_DELAY=$(grep 'DATA_FOR_CM_HANDLE_DELAY_MS:' "$SCRIPT_DIR"/../docker-com
 
 function cmHandleExists() {
   local cmHandleId=$1
-  curl --silent --fail --output /dev/null --user "$CPS_USERNAME:$CPS_PASSWORD" --basic "http://$CPS_HOST:$CPS_PORT/ncmp/v1/ch/$cmHandleId"
+  curl --silent --fail --output /dev/null "http://$CPS_HOST:$CPS_PORT/ncmp/v1/ch/$cmHandleId"
 }
 
 function failIfCmHandlesNotFound() {
@@ -66,7 +64,6 @@ function measureAverageResponseTimeInMillis() {
   curl --show-error --fail --fail-early \
     --output /dev/null --write-out '%{time_total}\n' \
     --parallel --parallel-max $PARALLEL_REQUESTS --parallel-immediate \
-    --user "$CPS_USERNAME:$CPS_PASSWORD" --basic \
     --request POST "http://$CPS_HOST:$CPS_PORT/ncmp/v1/ch/ch-[1-$totalRequests]/data/ds/ncmp-datastore%3Apassthrough-operational?resourceIdentifier=x&include-descendants=true" |
     awk '{ sum += $1; n++ } END { if (n > 0) print (sum / n) * 1000; }'
 }