Skip to content

Commit 315dc75

Browse files
authored
Merge pull request #65 from open-mpic/ds-punycode-and-specific-cohort
punycode and specific cohort number
2 parents e071d72 + 1765717 commit 315dc75

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The above sample must be run from the root directory of a deployed Open MPIC aws
4545

4646
The API is compliant with the [Open MPIC Specification](https://github.com/open-mpic/open-mpic-specification).
4747

48-
There is [documentation based on the API specification used in this version](https://open-mpic.org/documentation.html?commit=150a21d8c8e1c4758494f75d4e6811a1c6d05058).
48+
There is [documentation based on the API specification used in this version](https://open-mpic.org/documentation.html?commit=d19a6217becc22c528194923b66fd420105f5740).
4949

5050
## Development
5151
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.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
"pydantic==2.11.7",
3434
"aiohttp==3.12.14",
3535
"aws-lambda-powertools[parser]==3.15.1",
36-
"open-mpic-core==6.1.0",
36+
"open-mpic-core==6.2.0",
3737
"aioboto3~=14.3.0",
3838
"black==25.1.0",
3939
]
@@ -56,7 +56,7 @@ Source = "https://github.com/open-mpic/aws-lambda-python"
5656
#virtual = ".hatch"
5757

5858
[tool.api]
59-
spec_version = "3.6.0"
59+
spec_version = "3.7.0"
6060
spec_repository = "https://github.com/open-mpic/open-mpic-specification"
6161

6262
[tool.hatch]

src/aws_lambda_mpic/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.5.0"
1+
__version__ = "1.6.0"

tests/integration/test_deployed_mpic_api.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,24 @@ def api_should_return_200_and_failed_corroboration_given_failed_dcv_check(self,
371371
response_body = json.loads(response.text)
372372
print("\nResponse:\n", json.dumps(response_body, indent=4)) # pretty print response body
373373

374+
# this test will only pass if 4+ perspectives are configured in the deployed MPIC service
375+
def api_should_accept_specific_cohort_number_if_enough_perspective_cohorts_are_accommodated(self, api_client):
376+
request = MpicCaaRequest(
377+
domain_or_ip_target="example.com",
378+
orchestration_parameters=MpicRequestOrchestrationParameters(
379+
perspective_count=2, quorum_count=2, cohort_for_single_attempt=2 # use the second cohort of two
380+
),
381+
caa_check_parameters=CaaCheckParameters(
382+
certificate_type=CertificateType.TLS_SERVER, caa_domains=["mozilla.com"]
383+
),
384+
)
385+
386+
response = api_client.post(MPIC_REQUEST_PATH, json.dumps(request.model_dump()))
387+
mpic_response = self.mpic_response_adapter.validate_json(response.text)
388+
assert response.status_code == 200
389+
assert mpic_response.is_valid is True
390+
assert len(mpic_response.perspectives) == 2
391+
374392
def api_should_return_400_given_invalid_orchestration_parameters_in_request(self, api_client):
375393
request = MpicCaaRequest(
376394
domain_or_ip_target="example.com",

0 commit comments

Comments
 (0)