features.steps.r_010_r_11_steps

Python steps file for R_010 and R_011.

Attributes

Functions

step_given_endpoint_available(context, endpoint)

Ensures that the endpoint is accessible before testing.

step_given_new_device(context, device_id)

Simulates a new device before sending a CMP request.

step_when_device_requests_certificate(context, ...)

Simulates a new device requesting a certificate via the CMP endpoint.

step_then_system_issues_certificate(context, device_id)

Ensures that the system issues a certificate for a requesting device.

step_then_device_stores_certificate(context)

Ensures that the device successfully stores its issued certificate.

step_given_onboarded_device(context, device_id)

Ensures that a device is onboarded and has an active certificate.

step_when_device_renews_certificate(context, ...)

Simulates a device requesting a certificate renewal.

step_then_device_replaces_certificate(context)

Ensures that the device updates its certificate upon renewal.

step_given_invalid_device(context)

Simulates a device with incorrect authentication details.

step_when_invalid_device_requests(context, ...)

Simulates an unauthorized device attempting to access the CMP endpoint.

step_then_reject_unauthorized_request(context)

Ensures that the system rejects the request.

step_given_registered_device(context, device_id)

Ensures that a device is registered and has a valid certificate.

step_when_admin_revokes_certificate(context, device_id)

Simulates an admin revoking a device's certificate.

step_then_revocation_list_updated(context)

Ensures that the system updates its revocation list upon certificate revocation.

step_then_device_should_no_longer_auth_using_cert(context)

Ensures that the device should no longer authenticate using its certificate.

step_given_devices_requesting_certs(context, ...)

A number of device are requesting certificates simultaneously.

step_when_the_protocol_endpoint_processes_the_req(...)

The protocol processes the request.

step_then_all_certs_should_be_issued_within_time(...)

All certificates should be issued within a given time.

Module Contents

features.steps.r_010_r_11_steps.OnboardingProtocol[source]
features.steps.r_010_r_11_steps.step_given_endpoint_available(context, endpoint)[source]

Ensures that the endpoint is accessible before testing.

Parameters:
  • context (runner.Context) – Behave context.

  • endpoint (str) – The endpoint.

Return type:

None

features.steps.r_010_r_11_steps.step_given_new_device(context, device_id)[source]

Simulates a new device before sending a CMP request.

Parameters:
  • context (runner.Context) – Behave context.

  • device_id (str) – Unique identifier for the new device.

Return type:

None

features.steps.r_010_r_11_steps.step_when_device_requests_certificate(context, onboarding_protocol)[source]

Simulates a new device requesting a certificate via the CMP endpoint.

Parameters:
  • context (runner.Context) – Behave context.

  • onboarding_protocol (OnboardingProtocol) – The onboarding protocol.

Return type:

None

features.steps.r_010_r_11_steps.step_then_system_issues_certificate(context, device_id)[source]

Ensures that the system issues a certificate for a requesting device.

Parameters:
  • context (runner.Context) – Behave context.

  • device_id (str) – Unique identifier for the device.

Return type:

None

features.steps.r_010_r_11_steps.step_then_device_stores_certificate(context)[source]

Ensures that the device successfully stores its issued certificate.

Parameters:

context (runner.Context) – Behave context.

Return type:

None

features.steps.r_010_r_11_steps.step_given_onboarded_device(context, device_id)[source]

Ensures that a device is onboarded and has an active certificate.

Parameters:
  • context (runner.Context) – Behave context.

  • device_id (str) – Unique identifier for the onboarded device.

Return type:

None

features.steps.r_010_r_11_steps.step_when_device_renews_certificate(context, onboarding_protocol)[source]

Simulates a device requesting a certificate renewal.

Parameters:
  • context (runner.Context) – Behave context.

  • onboarding_protocol (OnboardingProtocol) – The onboarding protocol.

Return type:

None

features.steps.r_010_r_11_steps.step_then_device_replaces_certificate(context)[source]

Ensures that the device updates its certificate upon renewal.

Parameters:

context (runner.Context) – Behave context.

Return type:

None

features.steps.r_010_r_11_steps.step_given_invalid_device(context)[source]

Simulates a device with incorrect authentication details.

Parameters:

context (runner.Context) – Behave context.

Return type:

None

features.steps.r_010_r_11_steps.step_when_invalid_device_requests(context, onboarding_protocol)[source]

Simulates an unauthorized device attempting to access the CMP endpoint.

Parameters:
  • context (runner.Context) – Behave context.

  • onboarding_protocol (OnboardingProtocol) – The onboarding protocol.

Return type:

None

features.steps.r_010_r_11_steps.step_then_reject_unauthorized_request(context)[source]

Ensures that the system rejects the request.

Parameters:

context (runner.Context) – Behave context.

Return type:

None

features.steps.r_010_r_11_steps.step_given_registered_device(context, device_id)[source]

Ensures that a device is registered and has a valid certificate.

Parameters:
  • context (runner.Context) – Behave context.

  • device_id (str) – Unique identifier for the device.

Return type:

None

features.steps.r_010_r_11_steps.step_when_admin_revokes_certificate(context, device_id)[source]

Simulates an admin revoking a device’s certificate.

Parameters:
  • context (runner.Context) – Behave context.

  • device_id (str) – Unique identifier for the device.

Return type:

None

features.steps.r_010_r_11_steps.step_then_revocation_list_updated(context)[source]

Ensures that the system updates its revocation list upon certificate revocation.

Parameters:

context (runner.Context) – Behave context.

Return type:

None

features.steps.r_010_r_11_steps.step_then_device_should_no_longer_auth_using_cert(context)[source]

Ensures that the device should no longer authenticate using its certificate.

Parameters:

context (runner.Context) – Behave context.

Return type:

None

features.steps.r_010_r_11_steps.step_given_devices_requesting_certs(context, num_devices, onboarding_protocol)[source]

A number of device are requesting certificates simultaneously.

Parameters:
  • context (runner.Context) – Behave context.

  • num_devices (int) – The number of devices.

  • onboarding_protocol (OnboardingProtocol) – The onboarding protocol.

Return type:

None

features.steps.r_010_r_11_steps.step_when_the_protocol_endpoint_processes_the_req(context, onboarding_protocol)[source]

The protocol processes the request.

Parameters:
  • context (runner.Context) – Behave context.

  • onboarding_protocol (OnboardingProtocol) – The onboarding protocol.

Return type:

None

features.steps.r_010_r_11_steps.step_then_all_certs_should_be_issued_within_time(context, max_response_time)[source]

All certificates should be issued within a given time.

Parameters:
  • context (runner.Context) – Behave context.

  • max_response_time (int) – The number of devices.

Return type:

None