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
As size of data we can encrypt with the client's public key is limited we now create a symmetric encryption key and encrypt using the client's public key
We can now send the **encrypted** symmetric key (`symmetric.key.enc`) and **encrypted** access credentials (`hmpps-integration-api-preprod.tar.gz.enc`) to the client via email. The client may now decrypt the symmetric key using their private key and subsequently the access credentials using the symmetric key
## Create new consumer subscriber queue for events
133
141
134
142
### Create basic infrastructure
143
+
135
144
Within the [Cloud Platform Environments GitHub repository](https://github.com/ministryofjustice/cloud-platform-environments/tree/main) and the namespace of the environment:
136
145
137
146
1. Create a branch.
@@ -141,13 +150,14 @@ Within the [Cloud Platform Environments GitHub repository](https://github.com/mi
141
150
5. Add a client queue mapping. Example: [locals.tf](https://github.com/ministryofjustice/cloud-platform-environments/blob/6e6ad3d6c8bd070b3ba65ce8568fa79c2cfe4e30/namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-integration-api-dev/resources/locals.tf#L13)
142
151
6. Follow steps 3-8 in [Create an API key](#create-an-api-key) to merge branch to main.
143
152
7. Retrieve the client queue name and ARN with the following command:
# E.g. kubectl -n hmpps-integration-api-dev get secrets event-mapps-queue -o json
156
+
```
148
157
8. Send the client queue name and ARN to the consumer
149
158
150
159
The consumer can use the `POST /token` endpoint in API Gateway to retrieve temporary credentials, then use the SQS APIs or SDKs to receive and delete messages. For example:
1. Login to the [AWS Console](https://user-guide.cloud-platform.service.justice.gov.uk/documentation/getting-started/accessing-the-cloud-console.html), navigate to Secrets Manager and navigate to the secret created in the previous step by search using the secret description. e.g. MAPPS event filter list Pre-prod
163
174
2. Click on the secret and then click on Retrieve secret value. If this is your first time accessing the new secret, you will see an error Failed to get the secret value.
164
175
3. Click on Set secret Value, and set the Plaintext value as: {"eventType":["default"]}. Setting filter to default will block subscriber receiving any messages. Event notifier will update the subscriber and AWS secret with actual filter list later.
0 commit comments