Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Python Implementation #13

Closed
oxr463 opened this issue Oct 8, 2021 · 1 comment
Closed

Python Implementation #13

oxr463 opened this issue Oct 8, 2021 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@oxr463
Copy link
Contributor

oxr463 commented Oct 8, 2021

pam_aad.py

import json
import logging
import os
import sys
import adal

with open('/etc/pam_aad.conf', 'r') as f:
    config = json.loads(f.read())

if (config['debug']):
    logging.basicConfig(level=logging.DEBUG)

GRAPH_URL = 'https://graph.microsoft.com'

Source: https://github.com/AzureAD/azure-activedirectory-library-for-python/blob/dev/sample/device_code_sample.py

# Install missing dependency
pip install adal

# Run
sudo python3 pam_aad.py

It can then be called either via pam_exec or openvpn_defer_auth, (See: #39 (comment)).

See: https://github.com/AzureAD/azure-activedirectory-library-for-python

Source: CyberNinjas/pam_aad#41

@oxr463 oxr463 added the enhancement New feature or request label Oct 8, 2021
@oxr463 oxr463 added the help wanted Extra attention is needed label Nov 3, 2021
@oxr463
Copy link
Contributor Author

oxr463 commented Dec 5, 2021

@oxr463 oxr463 added wontfix This will not be worked on and removed help wanted Extra attention is needed labels Sep 17, 2022
@oxr463 oxr463 closed this as completed Sep 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant