diff --git a/README.md b/README.md index 82f3536..19888fa 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The above sample must be run from the root directory of a deployed Open MPIC aws The API is compliant with the [Open MPIC Specification](https://github.com/open-mpic/open-mpic-specification). -There is [documentation based on the API specification used in this version](https://open-mpic.org/documentation.html?commit=150a21d8c8e1c4758494f75d4e6811a1c6d05058). +There is [documentation based on the API specification used in this version](https://open-mpic.org/documentation.html?commit=d19a6217becc22c528194923b66fd420105f5740). ## Development Code changes can easily be deployed by editing the .py files and then rezipping the project via `./zip-all.sh` and `./2-package.sh` in the `layer` directory. Then, running `tofu apply` run from the open-tofu directory will update only on the required resources and leave the others unchanged. If any `.tf.template` files are changed or `config.yaml` is edited, `hatch run ./configure.py` must be rerun followed by `tofu apply` in the open-tofu directory. diff --git a/pyproject.toml b/pyproject.toml index 4b62f59..dcb15b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "pydantic==2.11.7", "aiohttp==3.12.14", "aws-lambda-powertools[parser]==3.15.1", - "open-mpic-core==6.1.0", + "open-mpic-core==6.2.0", "aioboto3~=14.3.0", "black==25.1.0", ] @@ -56,7 +56,7 @@ Source = "https://github.com/open-mpic/aws-lambda-python" #virtual = ".hatch" [tool.api] -spec_version = "3.6.0" +spec_version = "3.7.0" spec_repository = "https://github.com/open-mpic/open-mpic-specification" [tool.hatch] diff --git a/src/aws_lambda_mpic/__about__.py b/src/aws_lambda_mpic/__about__.py index 5b60188..e4adfb8 100644 --- a/src/aws_lambda_mpic/__about__.py +++ b/src/aws_lambda_mpic/__about__.py @@ -1 +1 @@ -__version__ = "1.5.0" +__version__ = "1.6.0" diff --git a/tests/integration/test_deployed_mpic_api.py b/tests/integration/test_deployed_mpic_api.py index b2f1eb8..dcf298a 100644 --- a/tests/integration/test_deployed_mpic_api.py +++ b/tests/integration/test_deployed_mpic_api.py @@ -371,6 +371,24 @@ def api_should_return_200_and_failed_corroboration_given_failed_dcv_check(self, response_body = json.loads(response.text) print("\nResponse:\n", json.dumps(response_body, indent=4)) # pretty print response body + # this test will only pass if 4+ perspectives are configured in the deployed MPIC service + def api_should_accept_specific_cohort_number_if_enough_perspective_cohorts_are_accommodated(self, api_client): + request = MpicCaaRequest( + domain_or_ip_target="example.com", + orchestration_parameters=MpicRequestOrchestrationParameters( + perspective_count=2, quorum_count=2, cohort_for_single_attempt=2 # use the second cohort of two + ), + caa_check_parameters=CaaCheckParameters( + certificate_type=CertificateType.TLS_SERVER, caa_domains=["mozilla.com"] + ), + ) + + response = api_client.post(MPIC_REQUEST_PATH, json.dumps(request.model_dump())) + mpic_response = self.mpic_response_adapter.validate_json(response.text) + assert response.status_code == 200 + assert mpic_response.is_valid is True + assert len(mpic_response.perspectives) == 2 + def api_should_return_400_given_invalid_orchestration_parameters_in_request(self, api_client): request = MpicCaaRequest( domain_or_ip_target="example.com",