Adding authselect common configurations#256
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for creating and configuring custom Authselect profiles in the test framework. It updates AuthselectUtils to accept a filesystem utility, handle cleanup of custom profiles, and adds AuthselectCommonConfiguration to set up common PAM configurations like offline logins and SSSD domains. The review feedback suggests removing a redundant runtime import and an unused self statement, stripping leading indentation from the multiline PAM stack strings before writing them to files, and renaming the loop variable files to a singular form for better clarity.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "AuthselectUtils", | ||
| ] | ||
|
|
||
| from pytest_mh.utils.fs import LinuxFileSystem |
|
|
||
| self |
| session required pam_unix.so | ||
| session optional pam_sss.so forward_pass | ||
| """ | ||
| if not pam_files: |
There was a problem hiding this comment.
The multiline string stack contains leading indentation for each line. When written to the PAM configuration files, this leading whitespace will be preserved, making the files messy. It is recommended to strip the leading indentation from each line before writing.
stack = '\\n'.join(line.strip() for line in stack.splitlines()).strip()\n if not pam_files:| for files in pam_files: | ||
| self.authselect.fs.write(f"{self.profile_path}/{profile_name}/{files}", stack) |
There was a problem hiding this comment.
| session required pam_unix.so | ||
| session optional pam_sss.so | ||
| """ | ||
| if not pam_files: |
There was a problem hiding this comment.
The multiline string stack contains leading indentation for each line. When written to the PAM configuration files, this leading whitespace will be preserved, making the files messy. It is recommended to strip the leading indentation from each line before writing.
stack = '\\n'.join(line.strip() for line in stack.splitlines()).strip()\n if not pam_files:| for files in pam_files: | ||
| self.authselect.fs.write(f"{self.profile_path}/{profile_name}/{files}", stack) |
There was a problem hiding this comment.
9c9c284 to
c57dfa0
Compare
No description provided.