You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Access to Cloud Platform’s Kubernetes cluster](https://user-guide.cloud-platform.service.justice.gov.uk/documentation/getting-started/kubectl-config.html#installing-kubectl)
14
14
15
+
As a pre-requisite to create a client certificate by running the script below, please ensure that:
16
+
- You are logged in so that you can access AWS resources via the CLI.
17
+
- Verify that you have all your AWS credentials ready by opening the config file in the ".aws" directory.
18
+
15
19
## Create a client certificate
16
20
17
-
1.Run the [generate-client-certificate.sh](/scripts/client_certificates/generate.sh) script with the name of the environment and client.
21
+
Run the [generate-client-certificate.sh](/scripts/client_certificates/generate.sh) script with the name of the environment and client.
18
22
19
23
```bash
20
24
make generate-client-certificate
21
25
```
22
-
23
26
This will output three files in the ./scripts/client_certificates directory:
24
27
25
28
- a private key e.g. `dev-nhs-client.key`
@@ -114,3 +117,14 @@ kubectl -n hmpps-integration-api-[environment] get secrets [your queue secret na
114
117
5. Create new [Cloud Platform Environments GitHub repository](https://github.com/ministryofjustice/cloud-platform-environments/tree/main) branch
115
118
6. Update terraform to load the secret value from AWS and update filter_policy value. Follow [Example](https://github.com/ministryofjustice/cloud-platform-environments/pull/22111/files). Note: The name of aws_secretsmanager_secret module has to be same as the secret name created from step 4/5 above.
116
119
7. Follow steps 3-8 in [Create an API key](#create-an-api-key) to merge branch to main.
120
+
121
+
## Create a new endpoint for a client
122
+
123
+
### Create basic infrastructure
124
+
Within the [Cloud Platform Environments GitHub repository](https://github.com/ministryofjustice/cloud-platform-environments/tree/main) and the namespace of the environment:
125
+
126
+
1. Create a branch.
127
+
2. Add a new API Gateway resource, a SQS method, a SQS method response, and an integration. Example: [api_gateway.tf](https://github.com/ministryofjustice/cloud-platform-environments/pull/22695/files)
128
+
3. Ensure that all the permissions are up-to-date and add a new role and policy for your new resource. Example: [iam.tf](https://github.com/ministryofjustice/cloud-platform-environments/pull/22787/files#diff-a376622fa4a4c2fd9404d5ee4221487259264608a0cbe36b99c150c472558f29)
129
+
4. Check that the integration is pointing to the right queue. Example: [api_gateway.tf](https://github.com/ministryofjustice/cloud-platform-environments/pull/22795/files)
130
+
5. Deploy and test (do not use Postman, rather use a GET cURL command with "x-api-key" as your header.)
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/PersonController.kt
+4-3
Original file line number
Diff line number
Diff line change
@@ -61,16 +61,17 @@ class PersonController(
61
61
@GetMapping("{encodedHmppsId}")
62
62
fungetPerson(
63
63
@PathVariable encodedHmppsId:String,
64
-
): Map<String, Person?> {
64
+
): Map<String, Map<String, Person?>> {
65
65
val hmppsId = encodedHmppsId.decodeUrlCharacters()
66
-
val response = getPersonService.execute(hmppsId)
66
+
val response = getPersonService.getCombinedDataForPerson(hmppsId)
67
67
68
68
if (response.hasErrorCausedBy(ENTITY_NOT_FOUND, causedBy =UpstreamApi.PROBATION_OFFENDER_SEARCH)) {
69
69
throwEntityNotFoundException("Could not find person with id: $hmppsId")
70
70
}
71
71
72
72
auditService.createEvent("GET_PERSON_DETAILS", mapOf("hmppsId" to hmppsId))
Copy file name to clipboardexpand all lines: src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/PersonControllerTest.kt
0 commit comments