-
Notifications
You must be signed in to change notification settings - Fork 37
Add end-to-end tests for force_access_check_with_provider
#1507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nooreldeenmansour
wants to merge
1
commit into
main
Choose a base branch
from
e2e-force-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+61
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| *** Settings *** | ||
| Resource resources/utils.resource | ||
| Resource resources/authd.resource | ||
| Resource resources/broker.resource | ||
|
|
||
| # Test Tags robot:exit-on-failure | ||
|
|
||
| Test Setup utils.Test Setup snapshot=%{BROKER}-installed | ||
| Test Teardown utils.Test Teardown | ||
|
|
||
|
|
||
| *** Variables *** | ||
| ${username} %{E2E_USER} | ||
| ${local_password} qwer1234 | ||
|
|
||
|
|
||
| *** Test Cases *** | ||
| Test second login succeeds with force_access_check_with_provider enabled | ||
| [Documentation] Verify that a registered user can log in with their local password | ||
| ... when force_access_check_with_provider is enabled and the identity provider is reachable. | ||
|
|
||
| Log In | ||
|
|
||
| Open Terminal | ||
| Log In With Remote User Through CLI: QR Code ${username} ${local_password} | ||
| Log Out From Terminal Session | ||
| Close Focused Window | ||
|
|
||
| Change Broker Configuration force_access_check_with_provider true | ||
|
|
||
| Open Terminal In Sudo Mode | ||
| Log In With Remote User Through CLI: Local Password ${username} ${local_password} | ||
|
|
||
|
|
||
| Test second login fails with force_access_check_with_provider enabled offline | ||
| [Documentation] Verify that a registered user cannot log in when | ||
| ... force_access_check_with_provider is enabled and the identity provider is unreachable. | ||
|
|
||
| Log In | ||
|
|
||
| Open Terminal | ||
| Log In With Remote User Through CLI: QR Code ${username} ${local_password} | ||
| Log Out From Terminal Session | ||
| Close Focused Window | ||
|
|
||
| Change Broker Configuration force_access_check_with_provider true | ||
|
|
||
| # Block outbound HTTPS to simulate the identity provider being unreachable. | ||
| Block Network Access To Identity Provider | ||
|
|
||
| Open Terminal In Sudo Mode | ||
| Try Log In With Remote User ${username} | ||
| Check That Remote User Has No Available Authentication Modes |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't instead use static resolver routes so that we can block only the requests going to a well know domain name rather than all the https traffic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but Is there a specific test scenario where blocking only a single domain would be beneficial for our test plan? Since these tests run across multiple brokers (google and entra currently, and maybe we could replace google with the generic broker; perhaps keycloak), blocking all HTTPS feels simpler and more generic. It also gets automatically reverted after each test, each test starts on a clean snapshot. So there's no risk of it affecting subsequent ones. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Noor, it's not worth spending time on blocking only the traffic to the IdP because the e2e-test doesn't require any network traffic to work, and the VM is reset when the next test is started.