Skip to content

Commit

Permalink
review comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
farrell-m committed Jun 7, 2024
1 parent 74e80ec commit 3c050d7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 29 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# laa-ccms-caab-assessment-api
# laa-ccms-caab-assessment-api

## 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)
3 changes: 1 addition & 2 deletions assessment-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -28,7 +28,6 @@ dependencies {
testImplementation 'org.testcontainers:testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:oracle-xe'
testImplementation 'com.h2database:h2'
}

test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\":\"78bd752c-814c-4fb5-801b-193839c8e768\"}]");
registry.add("laa.ccms.springboot.starter.auth.authorized-roles", () -> "[{\"name\":\"ALL\",\"URIs\":[\"/**\"]}]");
registry.add("laa.ccms.springboot.starter.auth.unprotected-uris", () -> "[\"\"]");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -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": "78bd752c-814c-4fb5-801b-193839c8e768"
}
]'
authorized-roles: '[
{
"name": "ALL",
"URIs": [
"/**"
]
}
]'
unprotected-uris: [ "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/favicon.ico", "/open-api-specification.yml"]
20 changes: 20 additions & 0 deletions assessment-service/src/integrationTest/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
laa.ccms.springboot.starter.auth:
authentication-header: "Authorization"
authorized-clients: '[
{
"name": "integration-test-runner",
"roles": [
"ALL"
],
"token": "78bd752c-814c-4fb5-801b-193839c8e768"
}
]'
authorized-roles: '[
{
"name": "ALL",
"URIs": [
"/**"
]
}
]'
unprotected-uris: [ "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/favicon.ico", "/open-api-specification.yml"]
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 3c050d7

Please sign in to comment.