Sha256: 6e78ae78b630a433e7abe72a02385687ed7e50d4a13b3ff5ed8625dc363ef56b

Contents?: true

Size: 1.17 KB

Versions: 7

Compression:

Stored size: 1.17 KB

Contents

Feature: Checking permissions on a resource

  Background:
    Given I load the policy:
    """
    - !resource
      kind: food
      id: bacon

    - !role
      kind: job
      id: cook
    """

  Scenario: By default I check my own privilege
    In this case, I have the privilege because I own the resource
  
    When I successfully run `conjur check food:bacon fry`
    Then the stdout should contain exactly "true"

  Scenario: I can check the privileges of roles that I own
    And I successfully run `conjur check -r job:cook food:bacon fry`
    Then the stdout should contain exactly "false"
    
  Scenario: I can check the privileges of roles that I own
    Given I apply the policy:
    """
    - !resource
      kind: food
      id: bacon

    - !role
      kind: job
      id: cook

    - !grant
      role: !role
        kind: job
        id: cook
      member: !user admin

    - !permit
      role: !role
        kind: job
        id: cook
      resource: !resource
        kind: food
        id: bacon
      privilege: fry
    """
    And I reset the command list
    And I successfully run `conjur check -r job:cook food:bacon fry`
    Then the stdout should contain exactly "true"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
conjur-cli-6.2.6 features/authorization/resource/check.feature
conjur-cli-6.2.5 features/authorization/resource/check.feature
conjur-cli-6.2.4 features/authorization/resource/check.feature
conjur-cli-6.2.3 features/authorization/resource/check.feature
conjur-cli-6.2.2 features/authorization/resource/check.feature
conjur-cli-6.2.1 features/authorization/resource/check.feature
conjur-cli-6.2.0 features/authorization/resource/check.feature