Sha256: e71536a051c8b7e7c5ce77744b35724ac577375437d11e9c9861dccc706a5504

Contents?: true

Size: 1.24 KB

Versions: 23

Compression:

Stored size: 1.24 KB

Contents

Feature: Load a policy.

  Scenario: Policy can be loaded into a policy id.
    Then I can run the code:
    """
    policy = <<-POLICY
    - !group security_admin

    - !policy
      id: myapp
      body:
      - !layer

      - !host-factory
        layers: [ !layer ]

    - !host app-01

    - !grant
      role: !layer myapp
      member: !host app-01
    POLICY

    $conjur.load_policy 'root', policy
    """

  Scenario: The policy load reports the API keys of created roles.
    Then I can run the code:
    """
    $conjur.load_policy 'root', <<-POLICY
    - !host app-#{random_hex}
    POLICY
    """
    Then the JSON should have "version"
    And the JSON should have "created_roles"
    And the JSON at "created_roles" should have 1 item

  Scenario: Policy contents can be replaced using POLICY_METHOD_PUT.
    Given I run the code:
    """
    $conjur.load_policy 'root', <<-POLICY
    - !group developers
    - !group operations
    POLICY
    """
    And I run the code:
    """
    $conjur.load_policy 'root', <<-POLICY, method: Conjur::API::POLICY_METHOD_PUT
    --- []
    POLICY
    """
    And I run the code:
    """
    $conjur.resources.map(&:id)
    """
    Then the JSON should be:
    """
    [
      "cucumber:policy:root"
    ]
    """

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
conjur-api-5.4.0.pre.404 features/load_policy.feature
conjur-api-5.4.0 features/load_policy.feature
conjur-api-5.4.0.pre.341 features/load_policy.feature
conjur-api-5.3.8.pre.321 features/load_policy.feature
conjur-api-5.3.8.pre.3 features/load_policy.feature
conjur-api-5.3.8.pre.194 features/load_policy.feature
conjur-api-5.3.7 features/load_policy.feature
conjur-api-5.3.7.pre.183 features/load_policy.feature
conjur-api-5.3.7.pre.168 features/load_policy.feature
conjur-api-5.3.7.pre.14 features/load_policy.feature
conjur-api-5.3.7.pre.167 features/load_policy.feature
conjur-api-5.3.6 features/load_policy.feature
conjur-api-5.3.5 features/load_policy.feature
conjur-api-5.3.4 features/load_policy.feature
conjur-api-5.3.3 features/load_policy.feature
conjur-api-5.3.2 features/load_policy.feature
conjur-api-5.3.1 features/load_policy.feature
conjur-api-5.3.0 features/load_policy.feature
conjur-api-5.2.1 features/load_policy.feature
conjur-api-5.2.0 features/load_policy.feature