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

Expose the pubkey used for authentication #16

Open
nbraud opened this issue Jan 5, 2024 · 1 comment
Open

Expose the pubkey used for authentication #16

nbraud opened this issue Jan 5, 2024 · 1 comment

Comments

@nbraud
Copy link

nbraud commented Jan 5, 2024

Would it be possible to expose the pubkey the user was authenticated with?

I am considering writing a setgid program that authenticates the user (using PAM) before atomically modifying an authorized_keys file (in a location the user cannot otherwise write to) and it would be quite nice to check they aren't removing the key they used to authenticate (and potentially locking themselves out)

The most straightforward way to communicate that information would be through the PAM environment but pam-bindings does not seem to (currently) provide a binding for pam_setenv (and pam_getenv)

@nbraud
Copy link
Author

nbraud commented Jan 9, 2024

I guess the alternative would be to implement the agent-auth logic within that program, either in an ad-hoc way, or exposing the necessary functionality from pam_rssh and using it as a normal Rust lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant