diff --git a/README.md b/README.md index 78ef6b3..0c48830 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,11 @@ In order to generate the interface and models a build can be run on the overall ## caab-service the caab-service implements the api interface generated in the caab-api subproject. -This service directly interacts with the Transient Data Store in EBS. \ No newline at end of file +This service directly interacts with the Transient Data Store in EBS. + +## Common Components + +This API uses components from the [LAA CCMS Common Library](https://github.com/ministryofjustice/laa-ccms-spring-boot-common): + +- [laa-ccms-spring-boot-plugin](https://github.com/ministryofjustice/laa-ccms-spring-boot-common?tab=readme-ov-file#laa-ccms-spring-boot-gradle-plugin-for-java--spring-boot-projects) +- [laa-ccms-spring-boot-starter-auth](https://github.com/ministryofjustice/laa-ccms-spring-boot-common/tree/main/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-auth) diff --git a/build.gradle b/build.gradle index 4844488..7f3d1c2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'net.researchgate.release' version '3.0.2' - id 'uk.gov.laa.ccms.springboot.laa-ccms-spring-boot-gradle-plugin' version '0.0.2' apply false + id 'uk.gov.laa.ccms.springboot.laa-ccms-spring-boot-gradle-plugin' version '0.0.3' apply false } subprojects { diff --git a/caab-service/build.gradle b/caab-service/build.gradle index 45a150a..0855ede 100644 --- a/caab-service/build.gradle +++ b/caab-service/build.gradle @@ -8,7 +8,7 @@ dependencies { implementation files('lib/ojdbc8.jar') //Enable access token authentication - implementation 'uk.gov.laa.ccms.springboot:laa-ccms-spring-boot-starter-auth:0.0.3-b2f8726-SNAPSHOT' + implementation 'uk.gov.laa.ccms.springboot:laa-ccms-spring-boot-starter-auth' //Enable Swagger UI implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' diff --git a/caab-service/src/integrationTest/java/uk/gov/laa/ccms/data/api/IntegrationTestInterface.java b/caab-service/src/integrationTest/java/uk/gov/laa/ccms/data/api/IntegrationTestInterface.java index 3ddbccf..dae9a1b 100644 --- a/caab-service/src/integrationTest/java/uk/gov/laa/ccms/data/api/IntegrationTestInterface.java +++ b/caab-service/src/integrationTest/java/uk/gov/laa/ccms/data/api/IntegrationTestInterface.java @@ -19,10 +19,6 @@ static void properties(DynamicPropertyRegistry registry) { registry.add("spring.datasource.url", oracleContainerSingleton.getOracleContainer()::getJdbcUrl); registry.add("spring.datasource.username", oracleContainerSingleton.getOracleContainer()::getUsername); registry.add("spring.datasource.password", oracleContainerSingleton.getOracleContainer()::getPassword); - - registry.add("laa.ccms.springboot.starter.auth.authorized-clients", () -> "[{\"name\":\"caab-ui\",\"roles\":[\"ALL\"],\"token\":\"c196393a-f279-45ba-b5d5-f93e6d30465a\"}]"); - registry.add("laa.ccms.springboot.starter.auth.authorized-roles", () -> "[{\"name\":\"ALL\",\"URIs\":[\"/**\"]}]"); - registry.add("laa.ccms.springboot.starter.auth.unprotected-uris", () -> "[\"\"]"); } } diff --git a/caab-service/src/integrationTest/resources/application-local.yml b/caab-service/src/integrationTest/resources/application-local.yml index 93ab521..653e874 100644 --- a/caab-service/src/integrationTest/resources/application-local.yml +++ b/caab-service/src/integrationTest/resources/application-local.yml @@ -9,24 +9,3 @@ spring: database-platform: org.hibernate.dialect.OracleDialect hibernate: ddl-auto: none - -laa.ccms.springboot.starter.auth: - authentication-header: "Authorization" - authorized-clients: '[ - { - "name": "integration-test-runner", - "roles": [ - "ALL" - ], - "token": "c196393a-f279-45ba-b5d5-f93e6d30465a" - } - ]' - authorized-roles: '[ - { - "name": "ALL", - "URIs": [ - "/**" - ] - } - ]' - unprotected-uris: [ "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/favicon.ico", "/open-api-specification.yml"] diff --git a/caab-service/src/integrationTest/resources/application.yml b/caab-service/src/integrationTest/resources/application.yml new file mode 100644 index 0000000..a465f22 --- /dev/null +++ b/caab-service/src/integrationTest/resources/application.yml @@ -0,0 +1,31 @@ +laa: + ccms: + caab: + converters: + boolean: + true_values: + Y,Yes + false_values: + N,No + springboot: + starter: + auth: + authentication-header: "Authorization" + authorized-clients: '[ + { + "name": "integration-test-runner", + "roles": [ + "ALL" + ], + "token": "c196393a-f279-45ba-b5d5-f93e6d30465a" + } + ]' + authorized-roles: '[ + { + "name": "ALL", + "URIs": [ + "/**" + ] + } + ]' + unprotected-uris: [ "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/favicon.ico", "/open-api-specification.yml"]