-
Notifications
You must be signed in to change notification settings - Fork 271
Add OAuth2 prompting config #8251
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi, thank you for your patch. Can you explain a bit more why you do not like "Press Enter" message? In general I would prefer to not handle this with PAM module options but with prompting options in sssd.conf, see bye, |
|
I think prompting the user to press ENTER, while at the same time asking them to use another device to log in to some URL is actually harmful to the user experience. Regarding the prompting configuration, I agree that it makes sense to have the option there. Then I will move the option to the |
|
As suggested, I removed the PAM option, and added a |
|
Hi, thank you, the new approach looks much better now. Can you squash your initial two patches into the new one so that the changes from the first two does not have to be removed by the third? Please remove the changes to the *.pot file as well, this will be done at certain times before a new release. Additionally, I would like to ask you for a bit of patience and wait until #8212 is merged and then rebase your patch on top of it. And @ikerexxe, the author of #8212, might also have some comments if your new options fits into the general plan for configurable prompts. bye, |
2375d07 to
481d9fb
Compare
|
I squashed the commits and dropped the changes to the *.pot file. Looking forward to seeing the mentioned PR merged. |
7db70c9 to
87d2d5f
Compare
|
Rebased, since there were some conflicts from the passwordless-gdm PR that was merged. Also, CodeFactor complained about complexity of |
|
Does setting of |
SSSD already handles "try again" messages (like However, if I already added a paragraph for that in sssd.conf.5.xml. |
ikerexxe
left a comment
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.
Apart from the inline comment I'm missing tests for the newly introduced functionality. test_prompt_config.c already contains tests that validate the behaviour for prompts. Do you mind adding a new test case for oath2? In addition, try to extend test_pam_get_response_prompt_config and test_pc_list_from_response test cases
e2a34c7 to
52d04dc
Compare
|
Added a new test |
ikerexxe
left a comment
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.
LGTM! Thank you for adding the test cases
CI failures seem unrelated but I'm rerunning them just in case
|
/gemini review |
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.
Code Review
This pull request introduces configurable prompting for OAuth2, separating the authentication message from the interactive prompt. The changes are well-structured, including updates to configuration, documentation, and tests. A notable improvement is the refactoring of the string parsing logic in pam_sss_prompt_config.c, which enhances code clarity and maintainability. I have identified a couple of issues: a potential memory safety concern in the new helper function due to mixed-sign integer comparisons, and a potential NULL pointer dereference that could lead to a crash. I've provided specific comments and suggestions to address these points.
52d04dc to
0d7008e
Compare
|
Coverity is green |
0d7008e to
e699187
Compare
|
I fixed the two problems reported by gemini. The Regarding the CodeFactor issue; Is that OK, or should the response data go into test setup & teardown? [1]: Here are some I found: |
|
Hi,
thank you.
Imo, this can be ignored for the time being, at least, it does not have to be fixed in this PR.
The bye, |
Alright, then I would keep this PR as is, and keep the changes focused on the prompt config. For the typing issue I will open another PR at a later time. |
sumit-bose
left a comment
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.
Hi,
thank you for the updates, ACK.
bye,
Sumit
:config: New options to customize the OAuth2 prompting behavior:
`interactive` and `interactive_prompt`.
Reviewed-by: Iker Pedrosa <[email protected]>
Reviewed-by: Sumit Bose <[email protected]>
Reviewed-by: Iker Pedrosa <[email protected]> Reviewed-by: Sumit Bose <[email protected]>
Reviewed-by: Iker Pedrosa <[email protected]> Reviewed-by: Sumit Bose <[email protected]>
e699187 to
293e2e5
Compare
This splits the OAuth2 prompt
Authenticate at <url> and press ENTER.into an info messageAuthenticate at "<url>"and a promptPress ENTER to continue.The latter can be skipped by setting the PAM option
skip_enter_prompt.