-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(pam/nativemodel): Add native PAM interface support #314
Conversation
95e4ed0
to
ed9880d
Compare
ed9880d
to
4e181f1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
==========================================
- Coverage 85.24% 84.16% -1.09%
==========================================
Files 76 77 +1
Lines 6161 6673 +512
Branches 75 75
==========================================
+ Hits 5252 5616 +364
- Misses 644 740 +96
- Partials 265 317 +52 ☔ View full report in Codecov by Sentry. |
aa10a36
to
717dbf0
Compare
Ok, this should be open for business now. Sorry for the big diff, but I've basically replicated all the tests we had for the CLI for this interface, so that we can ensure we keep consistency between the two (a part the differences due to the obvious technological aspects). We have various duplicates in the tests setups now, but I'll address those in another PR. The model per se is not big at all and it should be quite simple. |
717dbf0
to
ef5b47e
Compare
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.
Some suggestions and questions, but it's looking really good. Well done!
I'll do another pass after the rebasing.
fe8946e
to
3a10d33
Compare
In case we're logging to a file, we are not bothering PAM output, so let's continue using the default handler
…d file These are used both by tests and actual PAM model, so expose this in a single place to be reused without repetitions
We were managing this from model, but this happened also on error, so let's instead do the stage change only if authentication has been started
2bfcbef
to
b513a5e
Compare
…what it does The tape doesn't really reset the password, it only skips the request so rename it accordingly, so that we can add an actual test that accepts the request
In this test we were switching to local broker, but that's not something that was explicitly stated so do it
We're going to add more types, so let's organize them better
This makes easier to handle the logic in other UIs without having them to keep track of the state or of the previous password themselves
It allows to work with any pam client, regardless they're supporting authd or not
It allows us to use more complex stacks where normal PAM input is required
…error message When replacing the user ID with XXXX's we may not be able to replace the content fully when the string is wrapped. So just consider the final part of the string. See https://github.com/ubuntu/authd/actions/runs/9588429219/job/26440434186
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.
Do you mind rebasing everything and applying the fixups before we request another set of eyes to take a look?
Reusing the same test cases of the CLI client, tuned to work with the simpler UI that PAM provides
We had this tape in the repository, but it wasn't used, so actually use it
Repeat the tests we have for the CLI interface in the PAM native interface too
32c7775
to
09dede8
Compare
Yeah, that's done. Thanks for your comments. |
…ypes This was intended to be part of ubuntu#314 but it got lost when merging with ubuntu#393
It allows to work with any pam client, regardless they're supporting
authd or not (including polkit and ssh)
UDENG-2289
UDENG-3127
Closes: #380