-
Notifications
You must be signed in to change notification settings - Fork 16
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
brokers/pam: Support (error) messages on Next authentication result #815
Open
3v1n0
wants to merge
9
commits into
ubuntu:main
Choose a base branch
from
3v1n0:auth-next-messages
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.
Conversation
This file contains 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
In this case we make the user to wait some time before being actually able to continue to the next step so that the UI can show the message clearly, given that's not related to the upcoming case.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #815 +/- ##
==========================================
- Coverage 83.43% 79.06% -4.37%
==========================================
Files 83 102 +19
Lines 8689 10401 +1712
Branches 74 74
==========================================
+ Hits 7250 8224 +974
- Misses 1111 1711 +600
- Partials 328 466 +138 ☔ View full report in Codecov by Sentry. |
44c44f2
to
080c182
Compare
We need to test the Next case with an error message, so we limit the case to when a reset is needed for a login session, so that we can ensure that this happens as expected.
5e03a84
to
e6519ef
Compare
We have now to wait a longer time, so let's increase the test timeout. As per the current text, the sole reading time is computed in 5.4960s plus the delay and extra (makes it 6.9960), so let's be a bit more genreous.
Adapt timeout to the running environment
We may end up not queuing the events, leading to a failure since the changes in this branch (racy bubbletea, you know!). Mostly this is because now we have a timeout that triggers the GetAuthenticationModesRequested{} event, that implies that the authentication modes gets reloaded ant the first-one gets auto-selected, so in the GDM tests we need to ensure that when "auth.Next" is returned then we must first wait for the new challenge stage, and finally to switch back to the auth-mode selection. See: https://github.com/ubuntu/authd/actions/runs/13550269562/job/37879512072
Env variables should always override arguments as golden rule, so let's do it.
While we're trying to do this smartly checking the build information for the binaries we're testing, this doesn't work particularly well in some test binaries (debug.BuildInfo Settings are inconsistently exposed). So, let's just be consitent in CI, ensuring that wait times are multiplied as expected.
f73f34f
to
c19590f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When a broker sends a message with an
auth.Next
result, we should inform the user about, so make the PAM module to present the error and wait a reasonable time for the user to read it, before proceeding to the next step.UDENG-6180
Closes: #774