summaryrefslogtreecommitdiffstats
path: root/cps-rest/src/main
AgeCommit message (Collapse)AuthorFilesLines
2021-04-07Fix SonarQube violationsToineSiebelink1-1/+1
- Used @SupressWarning where issue was casued by 3PP we have not control over - Remove TODO's which are now addt to backlog as new JIRA's; CPS-324 and CPS-325 Issue-ID: CPS-89 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ieb64fd6d3f09144f6dea965c0aee3aefa6ec253c
2021-04-07Delete anchor part 2: cps restRuslan Kashapov1-7/+9
Issue-ID: CPS-312 Change-Id: I08f92dfff3188bd96a69ec2ae01e0d0891b81d87 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-04-06Fix for security hotspot related to safe archive expansionputhuparambil.aditya2-8/+97
https://sonarcloud.io/project/security_hotspots?id=onap_cps&hotspots=AXfObcsqA2pnU4Plp4-g Issue-ID: CPS-289 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ibe8627413fc9e3964cdc5bb98caf5e25fa4f3a95
2021-03-24Internal Server Error when creating the same data node twiceniamhcore1-6/+5
This change adds a generic exception handler class for a already defined object and handles a JsonSyntaxException. Issue-ID: CPS-290 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ie645237b5dd5b8e2b1d074c5613e7da560f57484
2021-03-18Fix code smellsRishi.Chail1-2/+2
1. removed typedefs annotation 2. chnaged final string constant name Issue-ID: CPS-89 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I524aa8c13e8bb4c6a00d810c6e89b30a48f37d10
2021-03-12Merge "Move web security configuration to application module"Toine Siebelink1-66/+0
2021-03-12Move web security configuration to application moduleRuslan Kashapov1-66/+0
Issue-ID: CPS-288 Change-Id: Ieba184c3e4727e354c19a3db31325052d15ced44 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-03-11Exception stack trace is exposedniamhcore1-20/+14
Issue-ID: CPS-249 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1e03c17364c925c6f976f2147cb17f8ac26ba995
2021-03-11Suppress csrf sonar security hotspot warningBruno Sakoto1-0/+5
Issue-ID: CPS-285 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I95d2b7d48714d21e2cdcaab36f3ba9903f0b5342
2021-03-09Improve error reporting for invalid cps path queryniamhcore1-2/+6
Issue-ID: CPS-276 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I0e0abbaff32c936c67fc1092dc8385a0bc5ae49e
2021-03-05Add basic authentication securityBruno Sakoto1-0/+61
Endpoints exposed outside from the cluster require basic authentication except actuator health and info endpoints. Default user credentials are embedded in the application, they can be overridden with system environment properties. Issue-ID: CPS-175 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I3dfa0e49e5f4538c923e6bbe9bef976d30359fe6
2021-03-02CPS-265 - updating cps path to support include-descendants option.niamhcore1-2/+5
Issue-ID: CPS-265 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9e9b84760dbc8b5eb4b31ab972fdb2d186c6bb48
2021-02-22Rest & Java API layer - Query Datanodes using cpsPath that contains contains ↵niamhcore1-0/+48
a leaf name and a leaf value Issue-ID: CPS-231 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I3bf2a9946746ad06ddb4bc832206a36b78ff2175
2021-02-18Data fragment update by xpath #3 - rest and service layersRuslan Kashapov1-3/+17
Issue-ID: CPS-58 Change-Id: Ie224da95b07748b63648226df6484cebae91cdec Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-26Ensure CPS REST API Specs conform to ONAP standardsRishi.Chail1-1/+1
Issue-ID: CPS-25 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I17fec852cf2dcb824dfc0ab7f00ebe4cfd9e09b5
2021-01-25Ensure CPS REST API Specs conform to ONAP standardsRishi.Chail1-28/+0
Issue-ID: CPS-25 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I289248b0f67949a2b9515932628edd4a7bd77a58
2021-02-04Fetching data node by xpath - rest and service layersRuslan Kashapov2-6/+19
IssueID: CPS-71 Change-Id: I54801fc12a8aa700d85e774780c9990b7f19c747 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-02-04Merge "Decouple configuration from application"Toine Siebelink5-87/+7
2021-02-01Decouple configuration from applicationClaudio D. Gasparini5-87/+7
- Decouple configuration from application - Generate all 3 types of docker variations Issue-ID: CPS-175 Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I1e2e0577c5911f7c79801e4c691d196515dc02a1
2021-02-01Merge "Retrieve an Anchor for a given dataspace by anchor name - REST layer"Toine Siebelink1-1/+2
2021-02-01Attach a (JSON) data instance for a container with children to a given Anchorniamhcore1-9/+9
Issue-ID: CPS-26 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I38fc1b1a6ccf84e64eff3218372b40c8fa2491ba
2021-01-26Loggers actuator config typo fixRuslan Kashapov1-1/+1
Issue-ID: CPS-158 Change-Id: I55abb9a459288d83eb7002e8f92c6e89148087db Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-23Retrieve an Anchor for a given dataspace by anchor name - REST layerRishi.Chail1-1/+2
Issue-ID: CPS-186 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I2dceb582c6277e56400dfbc46340c70d814603ee
2021-01-22Merge "Enable log level management via actuator, /cps/api path to use for ↵Toine Siebelink3-2/+12
REST controllers only only"
2021-01-22Merge "ZIP archive support for multiple YANG files delivery on Schema Set ↵Toine Siebelink1-9/+79
creation using REST"
2021-01-21Introduce caffeine cacheClaudio David Gasparini1-0/+5
Issue-ID: CPS-163 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: Iff9b831c2d895d82aff419f60a8dd86a38b545d0
2021-01-21Enable log level management via actuator, /cps/api path to use for REST ↵Ruslan Kashapov3-2/+12
controllers only only Issue-ID: CPS-158 Change-Id: I1f9ff4429f331ca4204d1acaf73ac896a68994d0 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-21ZIP archive support for multiple YANG files delivery on Schema Set creation ↵Ruslan Kashapov1-9/+79
using REST Issue-ID: CPS-180 Change-Id: I7e78a595593b170b981746e9aed1a7e5a45b202a Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-19Delete schema set - REST and service layersRuslan Kashapov2-0/+13
Issue-ID: CPS-121 Change-Id: I0fe885c79f98c994a8ac25a59b77b99eee4b3076 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-15Split OpenAPI yaml fileputhuparambil.aditya2-3/+3
1. components like schema, parameters, responses, requestBodies all moved to components.yml (https://swagger.io/docs/specification/components/) 2. CpAdmin.yml includes the configuration details for cpsAdmin APIs 3. CpsData.yml includes the API configuration details for cpsData Issue-ID: CPS-155 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I18fb9b8a2be85d180d4625657aca399dbf60b7bc
2021-01-12Enable spotbugs and fix spotbugs warnsClaudio David Gasparini1-2/+4
Issue-ID: CPS-159 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: Iee572fd740689a172ca599123b0751b5e909223a
2021-01-11Rework CpsModulePersistenceServiceClaudio David Gasparini1-0/+7
- remove getModuleReferences - provide service returning YangTextSchemaSourceSet Issue-ID: CPS-21 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I61cf6450c8ed8a5154990ea19467e016dc1155b4
2021-01-06Create dataspaceRuslan Kashapov1-0/+6
Issue-ID: CPS-134 Change-Id: Ie7f00f9c322a12a6c2a71c1407f6970a7dd24d2d Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-06Merge "Create schema set REST API and service level"Toine Siebelink2-2/+81
2020-12-24Create schema set REST API and service levelRuslan Kashapov2-2/+81
Issue-ID: CPS-123 Change-Id: Ie6d5fd4755454331415af7b80eaf85925efab395 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-17Merge "Redirecting logs to console"Toine Siebelink1-48/+0
2020-12-17Redirecting logs to consoleniamhcore1-48/+0
Issue-ID: CPS-10 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ib10a813cf33ad634fc9992b3b3a54a20e2323be1
2020-12-17Merge "Associate anchor to schema set"Rishi Chail2-12/+7
2020-12-17Associate anchor to schema setRuslan Kashapov2-12/+7
- db schema updated - db layer tests provided for ancor create and reading by dataspace - anchor model is removed from rest api as extra - api/spi updated to use string references instead of object Issue-ID: CPS-99 Change-Id: Ideeb83fa9e91ec1816308d8327a6589b999c64c5 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-17Adding logging exampleniamhcore1-0/+3
Logging example as part of CPS-10 Issue-ID: CPS-10 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I6428b01d112f27f9e4c9c72ac02236fcc49a6a1c
2020-12-17Split the CpsRestController.javaputhuparambil.aditya3-26/+59
1. Changes in openApi.yml tags to cps-admin and cps-data 2. 2 different controllers implementing the corresponding Interfaces generated by the openapi 3. CpsRestExceptionHandler.java modified to handle the exceptions from all the controllers Issue-ID: CPS-129 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: If4da380771093f2a06946340c015ffa5c39e105d
2020-12-16Few Sonar Fixesputhuparambil.aditya1-0/+3
Add spock-spring testing Issue-ID: CPS-89 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I1e12fb56916e2123fc1d29bdf1524accbb9eeffd
2020-12-11Remove depredcated code/classesniamhcore1-104/+0
Issue-ID: CPS-93 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I49db5244400d5eb4206d59e73aaf801b7f90c61c
2020-12-10Retrieve All anchors for a given Dataspaceputhuparambil.aditya2-2/+6
Issue-ID: CPS-8 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Idb2e4f83d390f078345e556d89781e0bf4a9a41f
2020-12-10Improve CPS Exception handlingToineSiebelink2-22/+26
- Removing unnecessary level of CPS(Validation)Exception - Moved exception inside spi package - Rename exceptions are per agreed new exception hierarchy - Use new exceptions - Added SchemaSetAlreadDefined Exception - Added AnchorAlreadyDefined Exception - Ensure unique serialVersionUIDs - Fixed CpsAdmin(Persistence)ServiceImplSpec tests (there was a mix-up about what this class was testing) - Replaced exception builder with dedicated exception (constructors) Issue-ID: CPS-8 Change-Id: I9cb80af4951e69ee7b0e99303853955de9d4399f Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2020-12-07Create Common Model objects in SPIniamhcore1-10/+18
Issue-ID: CPS-100 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I8ba54cc5d881d9d5f18b77a54ae28d3dda8412c1
2020-12-02Fix checkstyle violations for "final" keywordClaudio David Gasparini3-23/+23
Issue-ID: CPS-119 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I871a361937ed30047fe89ff2d2b17499cddad56c
2020-11-30REST level exception handling cleanupRuslan Kashapov2-62/+6
- removed direct handling of persistence exceptions - error message model is now described via OpenAPI config Issue-ID: CPS-79 Change-Id: Ib460b020ae9c650e1f81b46ab01dab641c953170 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-11-18VSE: Create an anchor in the given dataspaceRishi.Chail3-52/+71
Issue-ID: CPS-42 https://jira.onap.org/browse/CPS-42 Signed-off-by: Rishi Chail <rishi.chail@est.tech> Change-Id: If67be6f13889808da4d9fe830595766af67e4fdf
2020-11-16Fixing errors in openapi.yamlniamhcore1-3/+2
https://jira.onap.org/browse/CPS-83 Issue-ID: CPS-83 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I665b829b65cebcec6f03951aa1c8a91f59f2269b