REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 779 B
Close
/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/api/pam_auth.py
Text
Base64
from defence360agent.api.integration_conf import IntegrationConfig from defence360agent.contracts.config import UIRole from defence360agent.subsys.panels.generic.panel import get_admin_list class PamAuth: DEFAULT_AUTH_SERVICE = "system-auth" def authenticate(self, username, password) -> bool: from pam import pam try: config = IntegrationConfig().to_dict() service = config["PAM"]["SERVICE_NAME"] except KeyError: service = self.DEFAULT_AUTH_SERVICE p = pam() return p.authenticate(username, password, service=service) async def get_user_type(self, username: str) -> UIRole: admins = await get_admin_list() return UIRole.ADMIN if username in admins else UIRole.CLIENT
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
server
DIR
-
drwxr-xr-x
2026-03-03 08:59:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-03-03 08:59:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
health.py
3.38 KB
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
inactivity.py
1.49 KB
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
integration_conf.py
884 B
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
jwt_issuer.py
3.26 KB
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
newsfeed.py
4.30 KB
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pam_auth.py
779 B
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
0 B
lrw-r--r--
2026-01-23 13:13:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).