Skip to content
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

Determine best locations for configuration files #17

Open
oxr463 opened this issue Oct 8, 2021 · 0 comments
Open

Determine best locations for configuration files #17

oxr463 opened this issue Oct 8, 2021 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested
Milestone

Comments

@oxr463
Copy link
Contributor

oxr463 commented Oct 8, 2021

Instead of /etc/libnss-aad.conf, and /etc/pam_aad.conf, both should use a unified configuration, /etc/aad.conf , or in the case where the values don't match, /etc/aad/pam.conf, and /etc/aad/nss.conf.

# /etc/aad/{{service}}.json
/etc/aad/libnss.json
/etc/aad/openssh.json
/etc/aad/openvpn.json

Also, the openvpn-auth-aad plugin re-uses the pam_aad code, and therefore the config file specified for it, https://github.com/aad-for-linux/openvpn-auth-aad

PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags,
                                   int argc, const char **argv) // <-- we should pass the config file path in here

Then in /etc/pam.d/sshd,

auth required pam_aad.so /etc/pam_aad.conf

Or for OpenVPN, the config could be stored in /etc/openvpn/aad.conf, (could be a symlink if both are present on a single box).

Then in /etc/openvpn/server.conf,

# File path for the config file is relative to the OpenVPN configuration folder
plugin /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn_aad_auth.so aad.conf

Source: https://github.com/aad-for-linux/pam_aad/blob/master/pam_aad.c#L373

Source: CyberNinjas/libnss_aad#5

@oxr463 oxr463 added documentation Improvements or additions to documentation question Further information is requested labels Oct 8, 2021
@oxr463 oxr463 added this to the v1.0.0 milestone Oct 8, 2021
@oxr463 oxr463 self-assigned this Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant