diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8bc9b8c9..50a20a67 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,8 @@ "build": { "dockerfile": "../infrastructure/images/build-container/Dockerfile", "args": { - "INCLUDE_DEV_CERTS": "true" + "INCLUDE_DEV_CERTS": "true", + "AWS_DIR": "${localEnv:HOME}/.aws" } }, "customizations": { @@ -38,11 +39,12 @@ "omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions.git https://github.com/zsh-users/zsh-syntax-highlighting.git" } }, - "initializeCommand": "scripts/devcontainer/create-docker-network-if-required.sh && cp .tool-versions ${localWorkspaceFolder}/infrastructure/images/build-container/resources/.tool-versions && mkdir -p ${localEnv:HOME}/.proxygen", - "postCreateCommand": "doas apk add --no-cache openjdk21-jre && scripts/devcontainer/configure-zsh.sh && bash -c 'source ~/.bashrc && make config && pyenv activate pathology && make dependencies'", + "initializeCommand": "scripts/devcontainer/create-docker-network-if-required.sh && cp .tool-versions ${localWorkspaceFolder}/infrastructure/images/build-container/resources/.tool-versions && mkdir -p ${localEnv:HOME}/.proxygen && mkdir -p ${localEnv:HOME}/.aws", + "postCreateCommand": "doas apk add --no-cache openjdk21-jre aws-cli && scripts/devcontainer/configure-zsh.sh && bash -c 'source ~/.bashrc && make config && pyenv activate pathology && make dependencies'", "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind,consistency=cached", - "source=${localEnv:HOME}/.proxygen,target=/home/pathology-dev/.proxygen,type=bind,consistency=cached" + "source=${localEnv:HOME}/.proxygen,target=/home/pathology-dev/.proxygen,type=bind,consistency=cached", + "source=${localEnv:HOME}/.aws,target=/home/pathology-dev/.aws,type=bind,consistency=cached" ], "remoteUser": "pathology-dev", "containerUser": "pathology-dev", diff --git a/.github/workflows/preview-env.yaml b/.github/workflows/preview-env.yaml index db97949c..c2d318c7 100644 --- a/.github/workflows/preview-env.yaml +++ b/.github/workflows/preview-env.yaml @@ -151,7 +151,6 @@ jobs: cd pathology-api/target/ FN="${{ steps.names.outputs.function_name }}" EXPIRY_THRESHOLD="${TOKEN_EXPIRY_THRESHOLD:-30s}" - JWKS_SECRET="${JWKS_SECRET_NAME:-/cds/pathology/dev/jwks/secret}" PRIVATE_KEY="${APIM_PRIVATE_KEY:-/cds/pathology/dev/apim/private-key}" API_KEY="${APIM_APIKEY:-/cds/pathology/dev/apim/api-key}" MTLS_CERT="${API_MTLS_CERT:-/cds/pathology/dev/mtls/client1-key-public}" @@ -330,19 +329,12 @@ jobs: echo "url = ${{ steps.names.outputs.int_preview_url }}" # ---------- Handle mock endpoints ---------- - - name: Get Secrets for mocks - uses: aws-actions/aws-secretsmanager-get-secrets@2cb1a461cbd4865ac4299648312e4704c646cd53 - with: - secret-ids: | - /cds/pathology/dev/jwks/secret - name-transformation: lowercase - - name: Create or update mock Lambda (on open/sync/reopen) if: github.event.action != 'closed' env: TOKEN_EXPIRY_TIME: ${{ secrets.TOKEN_LIFETIME }} AUTH_URL: "${{ steps.names.outputs.mock_preview_url }}/apim/oauth2/token" - JWKS_SECRET: ${{ env._cds_pathology_dev_jwks_secret }} + JWKS_SECRET_NAME: ${{ secrets.JWKS_SECRET_NAME }} PUBLIC_KEY_URL: "https://pki.dev.endpoints.pathology-laboratory-reporting.national.nhs.uk/pathology.jwks" DYNAMODB_TABLE_NAME: "mock_services_dev" run: | @@ -374,7 +366,7 @@ jobs: TOKEN_LIFETIME=$TOKEN_LIFETIME, \ AUTH_URL=$AUTH_URL, \ PUBLIC_KEY_URL=$PUBLIC_KEY_URL, \ - API_KEY=$JWKS_SECRET, \ + API_KEY_SECRET_NAME="${JWKS_SECRET_NAME:-/cds/pathology/dev/jwks/secret}", \ TOKEN_TABLE_NAME=$DYNAMODB_TABLE_NAME, \ PDM_TABLE_NAME=$DYNAMODB_TABLE_NAME, \ MNS_TABLE_NAME=$DYNAMODB_TABLE_NAME \ @@ -392,7 +384,7 @@ jobs: TOKEN_LIFETIME=$TOKEN_LIFETIME, \ AUTH_URL=$AUTH_URL, \ PUBLIC_KEY_URL=$PUBLIC_KEY_URL, \ - API_KEY=$JWKS_SECRET, \ + API_KEY_SECRET_NAME="${JWKS_SECRET_NAME:-/cds/pathology/dev/jwks/secret}", \ TOKEN_TABLE_NAME=$DYNAMODB_TABLE_NAME, \ PDM_TABLE_NAME=$DYNAMODB_TABLE_NAME, \ MNS_TABLE_NAME=$DYNAMODB_TABLE_NAME \ diff --git a/.vscode/settings.json b/.vscode/settings.json index 11099a66..6069540f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -78,5 +78,5 @@ }, // Disabling automatic port forwarding as the devcontainer should already have access to any required ports. "remote.autoForwardPorts": false, - "python-envs.defaultEnvManager": "ms-python.python:pyenv" + "python-envs.defaultEnvManager": "ms-python.python:system" } diff --git a/Makefile b/Makefile index 990648ce..a732ad20 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ docker := docker endif dockerNetwork := pathology-local +pythonPlatform := manylinux2014_$(shell uname -m) # ============================================================================== @@ -58,7 +59,8 @@ build-pathology: @echo "Packaging dependencies..." @poetry build --format=wheel VERSION=$$(poetry version -s) - @pip install "dist/pathology_api-$$VERSION-py3-none-any.whl" --target "./target/pathology-api" --platform manylinux2014_x86_64 --only-binary=:all: + @echo Building pathology API: version=$$VERSION, platform=${pythonPlatform} + @pip install "dist/pathology_api-$$VERSION-py3-none-any.whl" --target "./target/pathology-api" --platform ${pythonPlatform} --only-binary=:all: # Copy lambda_handler file separately as it is not included within the package. @cp lambda_handler.py ./target/pathology-api/ @cd ./target/pathology-api @@ -84,7 +86,8 @@ build-mocks: @echo "Packaging dependencies..." @poetry build --format=wheel VERSION=$$(poetry version -s) - @pip install "dist/pathology_api_mocks-$$VERSION-py3-none-any.whl" --target "./target/mocks" --platform manylinux2014_x86_64 --only-binary=:all: + @echo Building mocks: version=$$VERSION, platform=${pythonPlatform} + @pip install "dist/pathology_api_mocks-$$VERSION-py3-none-any.whl" --target "./target/mocks" --platform ${pythonPlatform} --only-binary=:all: # Copy lambda_handler file separately as it is not included within the package. @cp lambda_handler.py ./target/mocks/ @cd ./target/mocks @@ -108,7 +111,7 @@ build-images: build # Build the project artefact @Pipeline @cp -r mocks/target/mocks infrastructure/images/mocks/resources/build @echo "Building Docker image using Docker. Utilising python version: ${PYTHON_VERSION} ..." - @$(docker) buildx build --load --platform=linux/amd64 --provenance=false --build-arg PYTHON_VERSION=${PYTHON_VERSION} -t localhost/pathology-api-image infrastructure/images/pathology-api + @$(docker) buildx build --load --provenance=false --build-arg PYTHON_VERSION=${PYTHON_VERSION} -t localhost/pathology-api-image infrastructure/images/pathology-api @echo "Docker image 'pathology-api-image' built successfully!" @echo "Building api gateway image using Docker. Utilising python version: ${PYTHON_VERSION} ..." @@ -116,16 +119,16 @@ build-images: build # Build the project artefact @Pipeline @echo "Docker image 'api-gateway-mock-image' built successfully!" @echo "Building mocks Docker image using Docker. Utilising python version: ${PYTHON_VERSION} ..." - @$(docker) buildx build --load --platform=linux/amd64 --provenance=false --build-arg PYTHON_VERSION=${PYTHON_VERSION} -t localhost/mocks-image infrastructure/images/mocks + @$(docker) buildx build --load --provenance=false --build-arg PYTHON_VERSION=${PYTHON_VERSION} -t localhost/mocks-image infrastructure/images/mocks @echo "Docker image 'mocks-image' built successfully!" publish: # Publish the project artefact @Pipeline # TODO: Implement the artefact publishing step -deploy: clean-docker build-images # Deploy the project artefact to the target environment @Pipeline +deploy: clean-docker env-local-dev build-images # Deploy the project artefact to the target environment @Pipeline $(docker) network create $(dockerNetwork) || echo "Docker network '$(dockerNetwork)' already exists." - $(docker) run --platform linux/amd64 --name pathology-api -p 5001:8080 --network $(dockerNetwork) -d localhost/pathology-api-image - $(docker) run --platform linux/amd64 --name mocks -p 5003:8080 --network $(dockerNetwork) -d localhost/mocks-image + $(docker) run --name pathology-api -p 5001:8080 --env-file=".env.pathology-api.local" --mount type=bind,src=$(AWS_DIR),dst=/root/.aws --network $(dockerNetwork) -d localhost/pathology-api-image + $(docker) run --name mocks -p 5003:8080 --env-file=".env.mock.local" --mount type=bind,src=$(AWS_DIR),dst=/root/.aws --network $(dockerNetwork) -d localhost/mocks-image $(docker) run --name pathology-api-gateway -p 5002:5000 -e TARGET_CONTAINER='PATHOLOGY_API' -e TARGET_URL='http://pathology-api:8080' --network $(dockerNetwork) -d localhost/api-gateway-mock-image $(docker) run --name mocks-api-gateway -p 5005:5000 -e TARGET_CONTAINER='MOCKS' -e TARGET_URL='http://mocks:8080' --network $(dockerNetwork) -d localhost/api-gateway-mock-image diff --git a/README.md b/README.md index 804affde..3188458b 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,24 @@ Once the build container has been built and is up and running, A few different ` - `deploy` - builds the codebase and deploys it within a separate container locally. - `clean` - stops and removes any containers outside of the Dev container locally. +### AWS Credentials + +The local deployment containers make use of AWS resources which require you to be authenticated with AWS to be accessed. + +For first time set up you should run `aws configure sso`. +The session name can be anything e.g. `dev-session`. +The URL is the same one we use to select an account to log into AWS console or you can use the one provided under access keys on that same portal. +The region should be set to eu-west-2. +You can leave the registration scopes as default `sso:account:access`. +It will then open a browser link which you will have to log onto and accept the permissions request. + +It will then asks you which account to use, select the one you would like to use. +Set the default region for the profile to eu-west-2. +Leave the profile name as default as this will need to match the automatic one set by the make command. + +After you have setup a session you can login using that session again by running the command `aws sso login --profile AWS-CDSPath-DEV_DevAccess-859065147940` +or `aws sso login --ssp-session [session-name]` + ### Testing There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline. diff --git a/bruno/APIM/Get_Auth_Token.bru b/bruno/APIM/Get_Auth_Token.bru index ef77e8e1..0a6f7329 100644 --- a/bruno/APIM/Get_Auth_Token.bru +++ b/bruno/APIM/Get_Auth_Token.bru @@ -1,7 +1,7 @@ meta { name: Get Auth Token type: http - seq: 1 + seq: 2 } post { @@ -57,6 +57,7 @@ script:pre-request { const environment = bru.getGlobalEnvVar("APIM_ENV") generateAuthToken(bru, req, `https://${environment}.api.service.nhs.uk/oauth2/token`, bru.getEnvVar("KID")); } + script:post-response { bru.setGlobalEnvVar("auth_token", res.getBody().access_token) } diff --git a/bruno/APIM/Post_Document_Bundle_via_APIM.bru b/bruno/APIM/Post_Document_Bundle_via_APIM.bru index f01750fd..d149e9ed 100644 --- a/bruno/APIM/Post_Document_Bundle_via_APIM.bru +++ b/bruno/APIM/Post_Document_Bundle_via_APIM.bru @@ -1,7 +1,7 @@ meta { name: Post Document Bundle via APIM type: http - seq: 2 + seq: 3 } post { diff --git a/bruno/APIM/Post_Document_Bundle_via_APIM_INT.bru b/bruno/APIM/Post_Document_Bundle_via_APIM_INT.bru index 61a5c528..2d24c9be 100644 --- a/bruno/APIM/Post_Document_Bundle_via_APIM_INT.bru +++ b/bruno/APIM/Post_Document_Bundle_via_APIM_INT.bru @@ -1,7 +1,7 @@ meta { name: Post Document Bundle via APIM - INT type: http - seq: 3 + seq: 4 } post { diff --git a/bruno/APIM/Post_Document_Bundle_via_Local_Deployment.bru b/bruno/APIM/Post_Document_Bundle_via_Local_Deployment.bru new file mode 100644 index 00000000..2ffee5d0 --- /dev/null +++ b/bruno/APIM/Post_Document_Bundle_via_Local_Deployment.bru @@ -0,0 +1,80 @@ +meta { + name: Post Document Bundle via Local Deployment + type: http + seq: 5 +} + +post { + url: http://localhost:5002/FHIR/R4/Bundle + body: json + auth: none +} + +headers { + Content-Type: application/fhir+json + X-Correlation-ID: c0ccbce4-d41f-4f6a-9958-c32b48fe46e2 +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_CDAPI-150_Organization_Identifier_With_Empty_String.bru b/bruno/APIM/Test_Requests/Test_CDAPI-150_Organization_Identifier_With_Empty_String.bru similarity index 99% rename from bruno/APIM/Test_CDAPI-150_Organization_Identifier_With_Empty_String.bru rename to bruno/APIM/Test_Requests/Test_CDAPI-150_Organization_Identifier_With_Empty_String.bru index ee78c535..c29431c9 100644 --- a/bruno/APIM/Test_CDAPI-150_Organization_Identifier_With_Empty_String.bru +++ b/bruno/APIM/Test_Requests/Test_CDAPI-150_Organization_Identifier_With_Empty_String.bru @@ -1,7 +1,7 @@ meta { name: Test_CDAPI-150_Organization_Identifier_With_Empty_String type: http - seq: 38 + seq: 4 } post { diff --git a/bruno/APIM/Test_CDAPI-150_Subject_Identifier_With_Empty_String.bru b/bruno/APIM/Test_Requests/Test_CDAPI-150_Subject_Identifier_With_Empty_String.bru similarity index 99% rename from bruno/APIM/Test_CDAPI-150_Subject_Identifier_With_Empty_String.bru rename to bruno/APIM/Test_Requests/Test_CDAPI-150_Subject_Identifier_With_Empty_String.bru index 9642995e..d8540de5 100644 --- a/bruno/APIM/Test_CDAPI-150_Subject_Identifier_With_Empty_String.bru +++ b/bruno/APIM/Test_Requests/Test_CDAPI-150_Subject_Identifier_With_Empty_String.bru @@ -1,7 +1,7 @@ meta { name: Test_CDAPI-150_Subject_Identifier_With_Empty_String type: http - seq: 37 + seq: 7 } post { diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate.bru b/bruno/APIM/Test_Requests/Test_MNS_Pathology_Api_Unable_To_Authenticate.bru similarity index 100% rename from bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate.bru rename to bruno/APIM/Test_Requests/Test_MNS_Pathology_Api_Unable_To_Authenticate.bru diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru b/bruno/APIM/Test_Requests/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru similarity index 100% rename from bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru rename to bruno/APIM/Test_Requests/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru diff --git a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru b/bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Bad_Gateway_Error.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru rename to bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Bad_Gateway_Error.bru index 046a3504..fbdceaf8 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru +++ b/bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Bad_Gateway_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Bad_Gateway_Error type: http - seq: 9 + seq: 6 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru b/bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru rename to bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru index ae216c07..e335f19e 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru +++ b/bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Gateway_Timeout_Error type: http - seq: 11 + seq: 5 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru b/bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Validation_Error.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru rename to bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Validation_Error.bru index ab829a5c..06c17af4 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru +++ b/bruno/APIM/Test_Requests/Test_MNS_Service_Experience_Validation_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Validation_Error type: http - seq: 14 + seq: 5 } post { diff --git a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru b/bruno/APIM/Test_Requests/Test_MNS_Service_Returns_Client_Side_Error.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru rename to bruno/APIM/Test_Requests/Test_MNS_Service_Returns_Client_Side_Error.bru index 598279a0..b9734471 100644 --- a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru +++ b/bruno/APIM/Test_Requests/Test_MNS_Service_Returns_Client_Side_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Returns_Client_Side_Error type: http - seq: 8 + seq: 5 } post { diff --git a/bruno/APIM/Test_PDM_Api_Server_Error.bru b/bruno/APIM/Test_Requests/Test_PDM_Api_Server_Error.bru similarity index 99% rename from bruno/APIM/Test_PDM_Api_Server_Error.bru rename to bruno/APIM/Test_Requests/Test_PDM_Api_Server_Error.bru index 71771a04..aedb6d4f 100644 --- a/bruno/APIM/Test_PDM_Api_Server_Error.bru +++ b/bruno/APIM/Test_Requests/Test_PDM_Api_Server_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Server_Error type: http - seq: 18 + seq: 5 } post { diff --git a/bruno/APIM/Test_PDM_Api_Validation_Error.bru b/bruno/APIM/Test_Requests/Test_PDM_Api_Validation_Error.bru similarity index 99% rename from bruno/APIM/Test_PDM_Api_Validation_Error.bru rename to bruno/APIM/Test_Requests/Test_PDM_Api_Validation_Error.bru index db41f04e..9f19c311 100644 --- a/bruno/APIM/Test_PDM_Api_Validation_Error.bru +++ b/bruno/APIM/Test_Requests/Test_PDM_Api_Validation_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Validation_Error type: http - seq: 15 + seq: 5 } post { diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru b/bruno/APIM/Test_Requests/Test_PDM_Bundle_Succesful_Response.bru similarity index 99% rename from bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru rename to bruno/APIM/Test_Requests/Test_PDM_Bundle_Succesful_Response.bru index e4485832..afc3990d 100644 --- a/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru +++ b/bruno/APIM/Test_Requests/Test_PDM_Bundle_Succesful_Response.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Bundle_Succesful_Response type: http - seq: 19 + seq: 5 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType.bru b/bruno/APIM/Test_Requests/Test_With_Incorrect_ReferenceType.bru similarity index 99% rename from bruno/APIM/Test_With_Incorrect_ReferenceType.bru rename to bruno/APIM/Test_Requests/Test_With_Incorrect_ReferenceType.bru index a213a5af..398ad5bb 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType.bru +++ b/bruno/APIM/Test_Requests/Test_With_Incorrect_ReferenceType.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType type: http - seq: 21 + seq: 5 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru b/bruno/APIM/Test_Requests/Test_With_Incorrect_ReferenceType_in_Extension.bru similarity index 99% rename from bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru rename to bruno/APIM/Test_Requests/Test_With_Incorrect_ReferenceType_in_Extension.bru index 30156735..b7bcfc70 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru +++ b/bruno/APIM/Test_Requests/Test_With_Incorrect_ReferenceType_in_Extension.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_in_Extension type: http - seq: 20 + seq: 5 } post { diff --git a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru b/bruno/APIM/Test_Requests/Test_With_Invalid_Identifiers_in_Organization.bru similarity index 99% rename from bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru rename to bruno/APIM/Test_Requests/Test_With_Invalid_Identifiers_in_Organization.bru index 51ae0f19..56cd97bb 100644 --- a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru +++ b/bruno/APIM/Test_Requests/Test_With_Invalid_Identifiers_in_Organization.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Invalid_Identifiers_in_Organization type: http - seq: 29 + seq: 5 } post { diff --git a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru b/bruno/APIM/Test_Requests/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru similarity index 99% rename from bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru rename to bruno/APIM/Test_Requests/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru index 99b71288..94102684 100644 --- a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru +++ b/bruno/APIM/Test_Requests/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Bundle_Entries_With_Same_URL type: http - seq: 32 + seq: 5 } post { diff --git a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru b/bruno/APIM/Test_Requests/Test_With_Multiple_Identifiers_For_An_Organisation.bru similarity index 99% rename from bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru rename to bruno/APIM/Test_Requests/Test_With_Multiple_Identifiers_For_An_Organisation.bru index 1eac7b28..8ddb8e9e 100644 --- a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru +++ b/bruno/APIM/Test_Requests/Test_With_Multiple_Identifiers_For_An_Organisation.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Identifiers_For_An_Organisation type: http - seq: 31 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Composition.bru b/bruno/APIM/Test_Requests/Test_Without_Composition.bru similarity index 99% rename from bruno/APIM/Test_Without_Composition.bru rename to bruno/APIM/Test_Requests/Test_Without_Composition.bru index 164a2dec..d5e25f7b 100644 --- a/bruno/APIM/Test_Without_Composition.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Composition.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Composition type: http - seq: 10 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru b/bruno/APIM/Test_Requests/Test_Without_Extension_URL_is_incorrect.bru similarity index 99% rename from bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru rename to bruno/APIM/Test_Requests/Test_Without_Extension_URL_is_incorrect.bru index abd99651..1f850f2e 100644 --- a/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Extension_URL_is_incorrect.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_URL_is_incorrect type: http - seq: 16 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Extension_in_Composition.bru b/bruno/APIM/Test_Requests/Test_Without_Extension_in_Composition.bru similarity index 99% rename from bruno/APIM/Test_Without_Extension_in_Composition.bru rename to bruno/APIM/Test_Requests/Test_Without_Extension_in_Composition.bru index 5452219f..12f41012 100644 --- a/bruno/APIM/Test_Without_Extension_in_Composition.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Extension_in_Composition.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_in_Composition type: http - seq: 12 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Organization.bru b/bruno/APIM/Test_Requests/Test_Without_Organization.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization.bru rename to bruno/APIM/Test_Requests/Test_Without_Organization.bru index 0c600ad9..c98c4367 100644 --- a/bruno/APIM/Test_Without_Organization.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Organization.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization type: http - seq: 9 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier.bru b/bruno/APIM/Test_Requests/Test_Without_Organization_Identifier.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Identifier.bru rename to bruno/APIM/Test_Requests/Test_Without_Organization_Identifier.bru index 2aa0cba3..ae6e0dca 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Organization_Identifier.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier type: http - seq: 26 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_Value.bru b/bruno/APIM/Test_Requests/Test_Without_Organization_Identifier_Value.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Identifier_Value.bru rename to bruno/APIM/Test_Requests/Test_Without_Organization_Identifier_Value.bru index 7837322e..4a230e93 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier_Value.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Organization_Identifier_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier_Value type: http - seq: 29 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_System.bru b/bruno/APIM/Test_Requests/Test_Without_Organization_Invalid_System.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Invalid_System.bru rename to bruno/APIM/Test_Requests/Test_Without_Organization_Invalid_System.bru index cc8c87b3..e7487980 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_System.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Organization_Invalid_System.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_System type: http - seq: 27 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_Value.bru b/bruno/APIM/Test_Requests/Test_Without_Organization_Invalid_Value.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Invalid_Value.bru rename to bruno/APIM/Test_Requests/Test_Without_Organization_Invalid_Value.bru index 768be9fa..058227e8 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_Value.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Organization_Invalid_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_Value type: http - seq: 28 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Organization_System.bru b/bruno/APIM/Test_Requests/Test_Without_Organization_System.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_System.bru rename to bruno/APIM/Test_Requests/Test_Without_Organization_System.bru index 679ff03d..abf4db33 100644 --- a/bruno/APIM/Test_Without_Organization_System.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Organization_System.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_System type: http - seq: 26 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole.bru b/bruno/APIM/Test_Requests/Test_Without_PractionerRole.bru similarity index 100% rename from bruno/APIM/Test_Without_PractionerRole.bru rename to bruno/APIM/Test_Requests/Test_Without_PractionerRole.bru diff --git a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru b/bruno/APIM/Test_Requests/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru rename to bruno/APIM/Test_Requests/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru index 898bb1b5..d9fa6ae6 100644 --- a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru +++ b/bruno/APIM/Test_Requests/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference type: http - seq: 30 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference.bru b/bruno/APIM/Test_Requests/Test_Without_PractionerRole_Reference.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_Reference.bru rename to bruno/APIM/Test_Requests/Test_Without_PractionerRole_Reference.bru index 9bdc18fb..ba3c6984 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference.bru +++ b/bruno/APIM/Test_Requests/Test_Without_PractionerRole_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference type: http - seq: 24 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru b/bruno/APIM/Test_Requests/Test_Without_PractionerRole_Reference_Value.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru rename to bruno/APIM/Test_Requests/Test_Without_PractionerRole_Reference_Value.bru index e4dc9b20..90e60e01 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru +++ b/bruno/APIM/Test_Requests/Test_Without_PractionerRole_Reference_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_Value type: http - seq: 25 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_Reference_in_Extension.bru b/bruno/APIM/Test_Requests/Test_Without_Reference_in_Extension.bru similarity index 99% rename from bruno/APIM/Test_Without_Reference_in_Extension.bru rename to bruno/APIM/Test_Requests/Test_Without_Reference_in_Extension.bru index 771693a2..1932c71d 100644 --- a/bruno/APIM/Test_Without_Reference_in_Extension.bru +++ b/bruno/APIM/Test_Requests/Test_Without_Reference_in_Extension.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Reference_in_Extension type: http - seq: 17 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest.bru b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest.bru similarity index 100% rename from bruno/APIM/Test_Without_ServiceRequest.bru rename to bruno/APIM/Test_Requests/Test_Without_ServiceRequest.bru diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester.bru b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Requester.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_Requester.bru rename to bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Requester.bru index 8b503ebb..64182637 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester.bru +++ b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Requester.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester type: http - seq: 22 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Requester_Reference.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru rename to bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Requester_Reference.bru index a942e8ed..c94136cb 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru +++ b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Requester_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_Reference type: http - seq: 23 + seq: 5 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Resource.bru b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Resource.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_Resource.bru rename to bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Resource.bru index d87713e5..33a44f34 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Resource.bru +++ b/bruno/APIM/Test_Requests/Test_Without_ServiceRequest_Resource.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Resource type: http - seq: 13 + seq: 5 } post { diff --git a/bruno/APIM/Test_Requests/folder.bru b/bruno/APIM/Test_Requests/folder.bru new file mode 100644 index 00000000..501e7ae0 --- /dev/null +++ b/bruno/APIM/Test_Requests/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Test_Requests + seq: 6 +} + +auth { + mode: inherit +} diff --git a/bruno/APIM/Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru index d0ffef63..edca2087 100644 --- a/bruno/APIM/Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi type: http - seq: 68 + seq: 8 } post { diff --git a/bruno/APIM/Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi.bru index 2f3782e1..560febce 100644 --- a/bruno/APIM/Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_CDAPI-150_Organization_Identifier_With_Empty_String_IntEnvi type: http - seq: 48 + seq: 8 } post { diff --git a/bruno/APIM/Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi.bru index b38df01e..7eb1a574 100644 --- a/bruno/APIM/Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_CDAPI-150_Subject_Identifier_With_Empty_String_IntEnvi type: http - seq: 47 + seq: 8 } post { diff --git a/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Expired_Bearer_Token_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Expired_Bearer_Token_IntEnvi.bru index b7c02a9e..5c8e7652 100644 --- a/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Expired_Bearer_Token_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Expired_Bearer_Token_IntEnvi type: http - seq: 63 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru index 5d5e61f5..9c31f833 100644 --- a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi type: http - seq: 56 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru index afaa8fec..26de28b9 100644 --- a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi type: http - seq: 57 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru index 0c426c19..ab6beccb 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi type: http - seq: 59 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru index cb8a3da4..7a01182c 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi type: http - seq: 60 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru index 9dc8d77c..e1ad3a33 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Validation_Error_IntEnvi type: http - seq: 61 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru index 3a98a5be..5d0f0cfb 100644 --- a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Returns_Client_Side_Error_IntEnvi type: http - seq: 58 + seq: 8 } post { diff --git a/bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Missing_Bearer_Token_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Missing_Bearer_Token_IntEnvi.bru index 1ec7fe6a..86d9e5e9 100644 --- a/bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Missing_Bearer_Token_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Missing_Bearer_Token_IntEnvi type: http - seq: 62 + seq: 8 } post { diff --git a/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Api_Server_Error_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Api_Server_Error_IntEnvi.bru index 2a0e74a4..59ddd22e 100644 --- a/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Api_Server_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Server_Error_IntEnvi type: http - seq: 41 + seq: 7 } post { diff --git a/bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Api_Validation_Error_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Api_Validation_Error_IntEnvi.bru index b37dace0..6fc75d71 100644 --- a/bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Api_Validation_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Validation_Error_IntEnvi type: http - seq: 68 + seq: 8 } post { diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru index 349f1ad2..a389c0ec 100644 --- a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Bundle_Succesful_Response_IntEnvi type: http - seq: 46 + seq: 8 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Incorrect_ReferenceType_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_With_Incorrect_ReferenceType_IntEnvi.bru index 7ff53533..34bcecaf 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Incorrect_ReferenceType_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_IntEnvi type: http - seq: 44 + seq: 7 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru index eee084bc..bad99df4 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi type: http - seq: 43 + seq: 7 } post { diff --git a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru index caa92566..8d19b86a 100644 --- a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Invalid_Identifiers_in_Organization_IntEnvi type: http - seq: 52 + seq: 8 } post { diff --git a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru index 27114b1a..a182156a 100644 --- a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi type: http - seq: 54 + seq: 8 } post { diff --git a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru index 33edc413..a038caea 100644 --- a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi type: http - seq: 53 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_Composition_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Composition_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Composition_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Composition_IntEnvi.bru index dd4fa06b..0f0af1b1 100644 --- a/bruno/APIM/Test_Without_Composition_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Composition_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Composition_IntEnvi type: http - seq: 36 + seq: 2 } post { diff --git a/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru index 4c5dabd8..b7839555 100644 --- a/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_URL_is_incorrect_IntEnvi type: http - seq: 39 + seq: 6 } post { diff --git a/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Extension_in_Composition_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Extension_in_Composition_IntEnvi.bru index 2554512a..18536988 100644 --- a/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Extension_in_Composition_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_in_Composition_IntEnvi type: http - seq: 37 + seq: 4 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Identifier_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Identifier_IntEnvi.bru index be4e2844..f3096706 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Identifier_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier_IntEnvi type: http - seq: 48 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Identifier_Value_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Identifier_Value_IntEnvi.bru index 85e08c32..b25866c1 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Identifier_Value_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier_Value_IntEnvi type: http - seq: 51 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_Organization_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_IntEnvi.bru index 8d710c70..6fc2083c 100644 --- a/bruno/APIM/Test_Without_Organization_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_IntEnvi type: http - seq: 35 + seq: 1 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Invalid_System_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Invalid_System_IntEnvi.bru index b0db94c1..630db853 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Invalid_System_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_System_IntEnvi type: http - seq: 64 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Invalid_Value_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Invalid_Value_IntEnvi.bru index 1df6f3d6..c2374cfb 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_Invalid_Value_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_Value_IntEnvi type: http - seq: 66 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_System_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Organization_System_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_System_IntEnvi.bru index 2fe749a3..e71754ec 100644 --- a/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Organization_System_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_System_IntEnvi type: http - seq: 50 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_IntEnvi.bru index 014876b4..c0b30dca 100644 --- a/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_IntEnvi type: http - seq: 34 + seq: 7 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru index 42e32e55..9a82de9f 100644 --- a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi type: http - seq: 55 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_Reference_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_Reference_IntEnvi.bru index aca5a87d..153ff620 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_Reference_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_IntEnvi type: http - seq: 47 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru index 09996087..675fe9a6 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_Value_IntEnvi type: http - seq: 49 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Reference_in_Extension_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_Reference_in_Extension_IntEnvi.bru index c627f925..27e5d2e4 100644 --- a/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_Reference_in_Extension_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Reference_in_Extension_IntEnvi type: http - seq: 40 + seq: 7 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_IntEnvi.bru index 7a6b6ae6..9fd086c6 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_IntEnvi type: http - seq: 33 + seq: 3 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Requester_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Requester_IntEnvi.bru index a7124a1d..8840be32 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Requester_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_IntEnvi type: http - seq: 45 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru index eb31aa51..f767719f 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_Reference_IntEnvi type: http - seq: 46 + seq: 8 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Resource_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru rename to bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Resource_IntEnvi.bru index c210e9fd..b7cd8ef8 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru +++ b/bruno/APIM/Test_Requests_IntEnvi/Test_Without_ServiceRequest_Resource_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Resource_IntEnvi type: http - seq: 38 + seq: 5 } post { diff --git a/bruno/APIM/Test_Requests_IntEnvi/folder.bru b/bruno/APIM/Test_Requests_IntEnvi/folder.bru new file mode 100644 index 00000000..9f22d961 --- /dev/null +++ b/bruno/APIM/Test_Requests_IntEnvi/folder.bru @@ -0,0 +1,8 @@ +meta { + name: Test_Requests_IntEnvi + seq: 7 +} + +auth { + mode: inherit +} diff --git a/bruno/APIM/environments/APIM.bru b/bruno/APIM/environments/APIM_Integration.bru similarity index 82% rename from bruno/APIM/environments/APIM.bru rename to bruno/APIM/environments/APIM_Integration.bru index e1914bac..8531d9c5 100644 --- a/bruno/APIM/environments/APIM.bru +++ b/bruno/APIM/environments/APIM_Integration.bru @@ -4,3 +4,4 @@ vars:secret [ JWT_SECRET, KID ] +color: #C77A0F diff --git a/bruno/APIM/environments/APIM_Internal_dev.bru b/bruno/APIM/environments/APIM_Internal_dev.bru new file mode 100644 index 00000000..257fae7b --- /dev/null +++ b/bruno/APIM/environments/APIM_Internal_dev.bru @@ -0,0 +1,7 @@ +vars:secret [ + PR_NUMBER, + PRIVATE_KEY_PATH, + JWT_SECRET, + KID +] +color: #346AB2 diff --git a/bruno/APIM/environments/LOCAL_DEV.bru b/bruno/APIM/environments/LOCAL_DEV.bru new file mode 100644 index 00000000..0568a184 --- /dev/null +++ b/bruno/APIM/environments/LOCAL_DEV.bru @@ -0,0 +1,6 @@ +vars:secret [ + PRIVATE_KEY_PATH + JWT_SECRET, + KID, +] +color: #2E8A54 diff --git a/bruno/PDM/Document/Post_a_Document_Pathology_failing.bru b/bruno/PDM/Document/Post_a_Document_Pathology_failing.bru new file mode 100644 index 00000000..c6897f4d --- /dev/null +++ b/bruno/PDM/Document/Post_a_Document_Pathology_failing.bru @@ -0,0 +1,79 @@ +meta { + name: Post_a_Document_Pathology_failing + type: http + seq: 5 +} + +post { + url: https://{{APIM_ENV}}.api.service.nhs.uk/patient-data-manager/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + X-Request-ID: e317708a-741e-45f7-be6c-b8b4ff86cbb9 +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/infrastructure/images/api-gateway-mock/resources/server.py b/infrastructure/images/api-gateway-mock/resources/server.py index 230abf26..f6918366 100644 --- a/infrastructure/images/api-gateway-mock/resources/server.py +++ b/infrastructure/images/api-gateway-mock/resources/server.py @@ -42,7 +42,7 @@ ) @app.route("/", methods=["POST", "GET"]) def forward_request(path_params): - x_correlation_id = request.headers.get("X-Correlation-ID") + x_correlation_id = request.headers.get("X-Correlation-ID", "") forwarded_headers = {k.lower(): v for k, v in request.headers.items()} forwarded_headers["nhsd-correlation-id"] = x_correlation_id diff --git a/infrastructure/images/build-container/Dockerfile b/infrastructure/images/build-container/Dockerfile index afbb6ac8..79db6900 100644 --- a/infrastructure/images/build-container/Dockerfile +++ b/infrastructure/images/build-container/Dockerfile @@ -7,11 +7,12 @@ ENV EDITORCONFIG_DOWNLOAD_URL="https://github.com/editorconfig-checker/editorcon ARG INCLUDE_DEV_CERTS -ARG DEV_CERT_FILENAME +ARG AWS_DIR # Add development certificates to node if provided. ENV NODE_EXTRA_CA_CERTS=${INCLUDE_DEV_CERTS:+/etc/ssl/certs/ca-certificates.crt} ENV DEV_CERTS_INCLUDED=$INCLUDE_DEV_CERTS +ENV AWS_DIR=$AWS_DIR ENV IN_BUILD_CONTAINER=true @@ -157,6 +158,7 @@ RUN bash -c "source ~/.bashrc && pyenv virtualenv ${PYTHON_VERSION} pathology" \ # Change default shell to bash for pathology-dev user. && chsh -s /bin/bash pathology-dev + # Update pathology-dev user's bash configuration. COPY /resources/.bashrc /home/pathology-dev/.bashrc diff --git a/infrastructure/images/mocks/resources/.gitignore b/infrastructure/images/mocks/resources/.gitignore index 1e60e223..796b96d1 100644 --- a/infrastructure/images/mocks/resources/.gitignore +++ b/infrastructure/images/mocks/resources/.gitignore @@ -1,2 +1 @@ /build -/.aws diff --git a/infrastructure/images/pathology-api/resources/.gitignore b/infrastructure/images/pathology-api/resources/.gitignore index 1e60e223..796b96d1 100644 --- a/infrastructure/images/pathology-api/resources/.gitignore +++ b/infrastructure/images/pathology-api/resources/.gitignore @@ -1,2 +1 @@ /build -/.aws diff --git a/mocks/src/apim_mock/auth_check.py b/mocks/src/apim_mock/auth_check.py index 1ae60109..a5de7139 100644 --- a/mocks/src/apim_mock/auth_check.py +++ b/mocks/src/apim_mock/auth_check.py @@ -1,12 +1,12 @@ -import os from typing import Any from boto3.dynamodb.conditions import Attr +from common import environment from common.logging import get_logger from common.storage_helper import StorageHelper -TOKEN_TABLE_NAME = os.environ["TOKEN_TABLE_NAME"] -BRANCH_NAME = os.environ["DDB_INDEX_TAG"] +TOKEN_TABLE_NAME = environment.values()["mock_table_name"] +BRANCH_NAME = environment.values()["ddb_index_tag"] storage_helper = StorageHelper(TOKEN_TABLE_NAME, BRANCH_NAME) _logger = get_logger(__name__) diff --git a/mocks/src/apim_mock/handler.py b/mocks/src/apim_mock/handler.py index bdd6844f..35312ab8 100644 --- a/mocks/src/apim_mock/handler.py +++ b/mocks/src/apim_mock/handler.py @@ -1,5 +1,4 @@ import json -import os import secrets import string from datetime import datetime, timedelta, timezone @@ -12,6 +11,8 @@ Response, ) from aws_lambda_powertools.event_handler.router import APIGatewayHttpRouter +from aws_lambda_powertools.utilities import parameters +from common import environment from common.logging import get_logger from common.storage_helper import BaseMockItem, StorageHelper from common.utils import check_valid_uuid4 @@ -21,11 +22,8 @@ REQUESTS_TIMEOUT = 5 DEFAULT_TOKEN_LIFETIME = 599 -AUTH_URL = os.environ["AUTH_URL"] -PUBLIC_KEY_URL = os.environ["PUBLIC_KEY_URL"] -API_KEY = os.environ["API_KEY"] -TOKEN_TABLE_NAME = os.environ["TOKEN_TABLE_NAME"] -BRANCH_NAME = os.environ["DDB_INDEX_TAG"] +TOKEN_TABLE_NAME = environment.values()["mock_table_name"] +BRANCH_NAME = environment.values()["ddb_index_tag"] # Constructor for APIGatewayHttpRouter leads to untyped code. apim_routes = APIGatewayHttpRouter() # type: ignore @@ -52,7 +50,7 @@ def handle_request(payload: dict[str, Any]) -> dict[str, Any]: assertions = jwt.decode( client_assertion, public_key, - audience=AUTH_URL, + audience=environment.values()["auth_url"], algorithms=JWT_ALGORITHMS, ) @@ -117,7 +115,9 @@ def _get_jwt_headers(client_assertion: str) -> dict[str, Any]: def _get_jwk_keys_from_public_url() -> Any: _logger.debug("Retrieving keys from url") - response = requests.get(PUBLIC_KEY_URL, timeout=REQUESTS_TIMEOUT) + response = requests.get( + environment.values()["public_key_url"], timeout=REQUESTS_TIMEOUT + ) response.raise_for_status() response_body = response.json() @@ -144,12 +144,14 @@ def _get_jwk_key_by_kid(kid: str) -> Any: def _validate_assertions(assertions: dict[str, Any]) -> None: + api_key = parameters.get_secret(environment.values()["api_key_secret_name"]) + if not assertions.get("iss") or not assertions.get("sub"): raise ValueError( "Missing or non-matching 'iss'/'sub' claims in client_assertion JWT" ) - if assertions.get("iss") != API_KEY or assertions.get("sub") != API_KEY: + if assertions.get("iss") != api_key or assertions.get("sub") != api_key: raise ValueError("Invalid 'iss'/'sub' claims in client_assertion JWT") jti = assertions.get("jti", "") diff --git a/mocks/src/apim_mock/test_auth_check.py b/mocks/src/apim_mock/test_auth_check.py index a67d8b48..e3004e6d 100644 --- a/mocks/src/apim_mock/test_auth_check.py +++ b/mocks/src/apim_mock/test_auth_check.py @@ -4,12 +4,8 @@ import pytest -os.environ["TOKEN_TABLE_NAME"] = "token_table" # noqa: S105 - Dummy value -os.environ["DDB_INDEX_TAG"] = "branch_name" -os.environ["AUTH_URL"] = "auth_url" -os.environ["PUBLIC_KEY_URL"] = "public_key" -os.environ["BRANCH_NAME"] = "branch_name" -os.environ["API_KEY"] = "api_key" +os.environ["MOCK_TABLE_NAME"] = "token_table" # noqa: S105 - Dummy value +os.environ["BRANCH_NAME"] = "test_branch" class TestAuthCheck: diff --git a/mocks/src/apim_mock/test_handler.py b/mocks/src/apim_mock/test_handler.py index 951d749c..34bcf4c0 100644 --- a/mocks/src/apim_mock/test_handler.py +++ b/mocks/src/apim_mock/test_handler.py @@ -17,9 +17,9 @@ os.environ["AUTH_URL"] = "auth_url" os.environ["PUBLIC_KEY_URL"] = "public_key_url" os.environ["API_KEY"] = "api_key" -os.environ["TOKEN_TABLE_NAME"] = "token_table" # noqa: S105 - Dummy value -os.environ["DDB_INDEX_TAG"] = "branch_name" - +os.environ["MOCK_TABLE_NAME"] = "token_table" +os.environ["DDB_INDEX_TAG"] = "test_branch" +os.environ["API_KEY_SECRET_NAME"] = "test_secret" # noqa: S105 - Dummy value CLIENT_ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" @@ -74,8 +74,10 @@ def _create_test_event( @patch("apim_mock.handler._generate_random_token") @patch("apim_mock.handler.datetime") @patch("requests.get") + @patch("aws_lambda_powertools.utilities.parameters.get_secret") def test_handle_request( self, + get_secret_mock: MagicMock, requests_mock: MagicMock, datetime_mock: MagicMock, generate_random_token_mock: MagicMock, @@ -121,6 +123,8 @@ def test_handle_request( generate_random_token_mock.return_value = "test_token" + get_secret_mock.return_value = "api_key" + payload = { "grant_type": "client_credentials", "client_assertion_type": [ @@ -141,7 +145,7 @@ def test_handle_request( Item={ "access_token": "test_token", "expiresAt": 1772212839, - "ddb_index": "branch_name", + "ddb_index": "test_branch", "sessionId": "test_token", "type": "access_token", } @@ -338,8 +342,10 @@ def test_get_jwk_key( @patch("jwt.decode") @patch("jwt.get_unverified_header") @patch("requests.get") + @patch("aws_lambda_powertools.utilities.parameters.get_secret") def test_validate_assertions( self, + get_secret_mock: MagicMock, requests_mock: MagicMock, jwt_get_unverified_header_mock: MagicMock, jwt_decode_mock: MagicMock, @@ -374,6 +380,8 @@ def test_validate_assertions( } jwt_decode_mock.return_value = assertions + get_secret_mock.return_value = "api_key" + with pytest.raises(ValueError, match=error_message): handler.handle_request(payload) @@ -382,8 +390,10 @@ def test_validate_assertions( @patch("jwt.algorithms.RSAAlgorithm.from_jwk") @patch("apim_mock.handler.datetime") @patch("requests.get") + @patch("aws_lambda_powertools.utilities.parameters.get_secret") def test_generate_random_token( self, + get_secret_mock: MagicMock, requests_mock: MagicMock, datetime_mock: MagicMock, rsaa_jwt_from_jwk_mock: MagicMock, @@ -391,6 +401,7 @@ def test_generate_random_token( jwt_decode_mock: MagicMock, handler: ModuleType, ) -> None: + get_secret_mock.return_value = "api_key" jwt_get_unverified_header_mock.return_value = { "alg": "RS512", @@ -453,8 +464,10 @@ def test_generate_random_token( @patch("apim_mock.handler._generate_random_token") @patch("jwt.algorithms.RSAAlgorithm.from_jwk") @patch("requests.get") + @patch("aws_lambda_powertools.utilities.parameters.get_secret") def test_get_access_token_success( self, + get_secret_mock: MagicMock, requests_get_mock: MagicMock, rsaa_jwt_from_jwk_mock: MagicMock, generate_random_token_mock: MagicMock, @@ -462,6 +475,8 @@ def test_get_access_token_success( jwt_decode_mock: MagicMock, lambda_app: APIGatewayHttpResolver, ) -> None: + get_secret_mock.return_value = "api_key" + jwt_get_unverified_header_mock.return_value = { "alg": "RS512", "kid": "DEV-1", diff --git a/mocks/src/common/environment.py b/mocks/src/common/environment.py new file mode 100644 index 00000000..be5e8034 --- /dev/null +++ b/mocks/src/common/environment.py @@ -0,0 +1,60 @@ +import os +from collections.abc import Callable +from typing import Any, TypedDict, cast + + +class ConfigError(Exception): + pass + + +_SUPPORTED_PRIMITIVES: dict[type[Any], Callable[[str], Any]] = { + str: str, + int: int, +} + + +class Environment(TypedDict): + auth_url: str + public_key_url: str + api_key_secret_name: str + ddb_index_tag: str + mock_table_name: str + + +_environment: Environment | None = None + + +def get_environment_variable[T](name: str, _type: type[T]) -> T: + value = get_optional_environment_variable(name=name, _type=_type) + if value is None: + raise ConfigError(f"Environment variable {name!r} is not set") + return value + + +def get_optional_environment_variable[T](name: str, _type: type[T]) -> T | None: + value = os.getenv(name) + + match _type: + case _ if _type in _SUPPORTED_PRIMITIVES: + if value is None: + return None + + return cast("T", _SUPPORTED_PRIMITIVES[_type](value)) + + case _: + raise ValueError( + f"Required type {_type} is not supported for config values" + ) + + +def values() -> Environment: + global _environment + if _environment is None: + _environment = Environment( + auth_url=get_environment_variable("AUTH_URL", str), + public_key_url=get_environment_variable("PUBLIC_KEY_URL", str), + api_key_secret_name=get_environment_variable("API_KEY_SECRET_NAME", str), + ddb_index_tag=get_environment_variable("DDB_INDEX_TAG", str), + mock_table_name=get_environment_variable("MOCK_TABLE_NAME", str), + ) + return _environment diff --git a/mocks/src/common/storage_helper.py b/mocks/src/common/storage_helper.py index 556f6693..6d35d48b 100644 --- a/mocks/src/common/storage_helper.py +++ b/mocks/src/common/storage_helper.py @@ -4,6 +4,8 @@ import boto3 from boto3.dynamodb.conditions import Attr, ConditionBase, Key +DEFAULT_TTL = 600 + class BaseMockItem(TypedDict): sessionId: str diff --git a/mocks/src/mns_mock/handler.py b/mocks/src/mns_mock/handler.py index 9c58a77b..0d8cd7bc 100644 --- a/mocks/src/mns_mock/handler.py +++ b/mocks/src/mns_mock/handler.py @@ -1,5 +1,4 @@ import json -import os from collections.abc import Callable from time import time from typing import Any, TypedDict, cast @@ -9,15 +8,16 @@ from aws_lambda_powertools.event_handler import Response from aws_lambda_powertools.event_handler.router import APIGatewayHttpRouter from boto3.dynamodb.conditions import Attr +from common import environment from common.logging import get_logger -from common.storage_helper import BaseMockItem, StorageHelper +from common.storage_helper import DEFAULT_TTL, BaseMockItem, StorageHelper -MNS_TABLE_NAME = os.environ["MNS_TABLE_NAME"] -BRANCH_NAME = os.environ["DDB_INDEX_TAG"] +TOKEN_TABLE_NAME = environment.values()["mock_table_name"] +BRANCH_NAME = environment.values()["ddb_index_tag"] # Constructor for APIGatewayHttpRouter leads to untyped code. mns_routes = APIGatewayHttpRouter() # type: ignore -storage_helper = StorageHelper(MNS_TABLE_NAME, BRANCH_NAME) +storage_helper = StorageHelper(TOKEN_TABLE_NAME, BRANCH_NAME) _logger = get_logger(__name__) @@ -79,7 +79,7 @@ def handle_post_request(payload: dict[str, Any]) -> MNSResponse: event_id = str(uuid4()) event_item: EventItem = { "sessionId": event_id, - "expiresAt": int(time()) + 600, + "expiresAt": int(time()) + DEFAULT_TTL, "type": "mns_event", "event": payload, "subject": payload["subject"], diff --git a/mocks/src/mns_mock/test_handler.py b/mocks/src/mns_mock/test_handler.py index 80ec68b3..0ca00421 100644 --- a/mocks/src/mns_mock/test_handler.py +++ b/mocks/src/mns_mock/test_handler.py @@ -8,12 +8,10 @@ from aws_lambda_powertools.event_handler import APIGatewayHttpResolver from aws_lambda_powertools.utilities.typing import LambdaContext -os.environ["TOKEN_TABLE_NAME"] = "token_table" # noqa: S105 -os.environ["MNS_TABLE_NAME"] = "test_table" +os.environ["MOCK_TABLE_NAME"] = "test_table" os.environ["DDB_INDEX_TAG"] = "test_branch" -os.environ["AUTH_URL"] = "auth_url" -os.environ["PUBLIC_KEY_URL"] = "public_key_url" -os.environ["API_KEY"] = "api_key" +# os.environ["PUBLIC_KEY_URL"] = "public_key_url" +# os.environ["API_KEY_SECRET_NAME"] = "test_secret" # noqa: S105 with patch("boto3.resource"): from apim_mock.auth_check import AuthenticationError diff --git a/mocks/src/pdm_mock/handler.py b/mocks/src/pdm_mock/handler.py index b14945f3..3b26f27e 100644 --- a/mocks/src/pdm_mock/handler.py +++ b/mocks/src/pdm_mock/handler.py @@ -1,5 +1,4 @@ import json -import os from collections.abc import Callable from datetime import datetime, timezone from time import time @@ -9,12 +8,13 @@ from apim_mock.auth_check import check_authenticated from aws_lambda_powertools.event_handler import Response from aws_lambda_powertools.event_handler.router import APIGatewayHttpRouter +from common import environment from common.logging import get_logger -from common.storage_helper import BaseMockItem, StorageHelper +from common.storage_helper import DEFAULT_TTL, BaseMockItem, StorageHelper from common.utils import check_valid_uuid4 -PDM_TABLE_NAME = os.environ["PDM_TABLE_NAME"] -BRANCH_NAME = os.environ["DDB_INDEX_TAG"] +PDM_TABLE_NAME = environment.values()["mock_table_name"] +BRANCH_NAME = environment.values()["ddb_index_tag"] # Constructor for APIGatewayHttpRouter leads to untyped code. @@ -113,7 +113,7 @@ def handle_post_request(payload: dict[str, Any]) -> PDMResponse: } item: DocumentItem = { "sessionId": document_id, - "expiresAt": int(time()) + 600, + "expiresAt": int(time()) + DEFAULT_TTL, "document": json.dumps(created_document), "type": "pdm_document", } diff --git a/scripts/config/vale/styles/config/vocabularies/words/accept.txt b/scripts/config/vale/styles/config/vocabularies/words/accept.txt index fe1c8a7a..73064ed1 100644 --- a/scripts/config/vale/styles/config/vocabularies/words/accept.txt +++ b/scripts/config/vale/styles/config/vocabularies/words/accept.txt @@ -38,4 +38,3 @@ Trufflehog VMs [Vv]scode sublicense -wsl diff --git a/scripts/env/env.mk b/scripts/env/env.mk new file mode 100644 index 00000000..bda431b5 --- /dev/null +++ b/scripts/env/env.mk @@ -0,0 +1,5 @@ + + +env-local-dev: + @echo "Setting up local development .env files" + scripts/env/env.sh diff --git a/scripts/env/env.sh b/scripts/env/env.sh new file mode 100755 index 00000000..174b39a9 --- /dev/null +++ b/scripts/env/env.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -e + +PATHOLOGY_API_ENV_FILE_NAME=".env.pathology-api.local" +MOCK_ENV_FILE_NAME=".env.mock.local" + + +AWS_PROFILE=AWS-CDSPath-DEV_DevAccess-859065147940 + +cat > "$PATHOLOGY_API_ENV_FILE_NAME" < "$MOCK_ENV_FILE_NAME" <