I'd be very glad if this plugin had the option to specify a list of principals to authenticate against, which differs from the hardcoded username currently in use.
This could improve freedom of configuration, for example giving access to a specific account with or without sudo privileges.
I could make a PR about this in the future, but i'd like to discuss a possible implementation. For example, off the top of my head, a principals file could be passed with PAM parameters, like what is being done with the authorized_keys file and others.
Whenever certificate verification is called, the plugin could load the list of principals from the specified file, maybe also including variable expansion at least for the username. Then the check is performed by verifying the presence of at least one of the principals in the file against the list of principals in the certificate.
I'd be very glad if this plugin had the option to specify a list of principals to authenticate against, which differs from the hardcoded username currently in use.
This could improve freedom of configuration, for example giving access to a specific account with or without sudo privileges.
I could make a PR about this in the future, but i'd like to discuss a possible implementation. For example, off the top of my head, a principals file could be passed with PAM parameters, like what is being done with the
authorized_keysfile and others.Whenever certificate verification is called, the plugin could load the list of principals from the specified file, maybe also including variable expansion at least for the username. Then the check is performed by verifying the presence of at least one of the principals in the file against the list of principals in the certificate.