Skip to content

Commit

Permalink
Add log test to authenticator config cukes
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tuttle authored and jtuttle committed Dec 19, 2019
1 parent ba7ae91 commit 2d8a23a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cucumber/authenticators/features/authn_config.feature
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,53 @@ Feature: Authenticator configuration

Scenario: Authenticator account does not exist
When I am the super-user
And I save my place in the log file
And I PATCH "/authn-config/db/nope" with body:
"""
enabled=true
"""
Then the HTTP response status code is 401
And The following appears in the log after my savepoint:
"""
Errors::Authentication::Security::AccountNotDefined
"""

Scenario: Authenticator webservice does not exist
When I am the super-user
And I save my place in the log file
And I PATCH "/authn-config/db%2Fnope/cucumber" with body:
"""
enabled=true
"""
Then the HTTP response status code is 401
And The following appears in the log after my savepoint:
"""
Errors::Authentication::Security::ServiceNotDefined
"""

Scenario: Authenticated user can not update authenticator
When I login as "authn-viewer"
And I save my place in the log file
And I PATCH "/authn-config/db/cucumber" with body:
"""
enabled=true
"""
Then the HTTP response status code is 403
And authenticator "cucumber:webservice:conjur/authn-config/db" is disabled
And The following appears in the log after my savepoint:
"""
Errors::Authentication::Security::UserNotAuthorizedInConjur
"""

Scenario: Nested webservice can not be configured
When I am the super-user
And I save my place in the log file
And I PATCH "/authn-config/db%2Fstatus/cucumber" with body:
"""
enabled=true
"""
Then the HTTP response status code is 401
And The following appears in the log after my savepoint:
"""
Errors::Authentication::AuthenticatorNotFound
"""

0 comments on commit 2d8a23a

Please sign in to comment.