Feature: Metadata expiry timestamp is updated consistently.

Test results for features/security/update_expiry.feature

Running behat features/security/update_expiry.feature results in:

@rugged @security @metadata-expiry
Feature: Metadata expiry timestamp is updated consistently.
  In order to keep a TUF systems secure,
  As a TUF administrator
  I need to ensure that metadata is updated consistently.

  Background:
    Given I reset Rugged
    And I initialize a Rugged repo

  Scenario: Root metadata expiry gets updated appropriately.
    Given I run "sudo ln -s /var/rugged/tuf_repo/metadata/1.root.json /var/rugged/tuf_repo/metadata/root.json"
    And I record the expiry timestamp from "root.json"
    And file "/var/rugged/incoming_targets/test0.txt" contains "test0"
    When I run the Rugged command "rugged add-targets"
    Then the expiry timestamp from "root.json" has not changed
    Given I run "sudo cp features/fixtures/key_rotation/add_new_key.yaml /var/rugged/.config/rugged/config.yaml"
    And I wait "1" seconds
    When I run the Rugged command "rugged --debug rotate-keys"
    And I run "sudo ln -sf /var/rugged/tuf_repo/metadata/2.root.json /var/rugged/tuf_repo/metadata/root.json"
    Then the expiry timestamp from "root.json" has changed

  Scenario: Snapshot metadata expiry gets updated appropriately.
    Given I record the expiry timestamp from "snapshot.json"
    And I run "sudo cp features/fixtures/key_rotation/add_new_key.yaml /var/rugged/.config/rugged/config.yaml"
    And I wait "1" seconds
    When I run the Rugged command "rugged rotate-keys"
    Then the expiry timestamp from "snapshot.json" has not changed
    And file "/var/rugged/incoming_targets/test0.txt" contains "test0"
    When I run the Rugged command "rugged add-targets"
    Then the expiry timestamp from "snapshot.json" has changed

  Scenario: Targets metadata expiry gets updated appropriately.
    Given I record the expiry timestamp from "targets.json"
    And I run "sudo cp features/fixtures/key_rotation/add_new_key.yaml /var/rugged/.config/rugged/config.yaml"
    And I wait "1" seconds
    When I run the Rugged command "rugged rotate-keys"
    Then the expiry timestamp from "targets.json" has not changed
    And file "/var/rugged/incoming_targets/test0.txt" contains "test0"
    When I run the Rugged command "rugged add-targets"
    Then the expiry timestamp from "targets.json" has changed

  Scenario: Timestamp metadata expiry gets updated appropriately.
    Given I record the expiry timestamp from "timestamp.json"
    And I run "sudo cp features/fixtures/key_rotation/add_new_key.yaml /var/rugged/.config/rugged/config.yaml"
    And I wait "1" seconds
    When I run the Rugged command "rugged rotate-keys"
    Then the expiry timestamp from "timestamp.json" has not changed
    And file "/var/rugged/incoming_targets/test0.txt" contains "test0"
    When I run the Rugged command "rugged add-targets"
    Then the expiry timestamp from "timestamp.json" has changed

4 scenarios (4 passed)
42 steps (42 passed)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Rugged TUF Server is a trademark of Consensus Enterprises.