-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support chaining to other AuthorizedKeysCommands #10
Comments
I was also thinking that you could even have support for executables under |
@stuartpb Could you elaborate on the |
Okay, so, if a script wants to intercept AuthorizedKeysCommand, there are a variety of parameters it can take:
I was thinking you'd have another level of subdirectory for the drop-ins differentiating between scripts that use:
If you had some kind of config file layer, you could specify your own arbitrary combinations of the operators OpenSSH lets you pass to an AuthorizedKeysCommand, but with the current set of data OpenSSH provides, any value for this would effectively be redundant to one of these three (ie. you can create a wrapper for any other calling convention from the data available to Use caseLet us call whatever name of the directory where we place scripts under So, for example, say you have a script in your configuration that adds any key that tries to log in as a certain user to that user's authorized keys (so a public user, in other words). As a way to specify that that's the data used by this script (without wanting to introduce a config-file layer), you'd put it in a location like Related: crossing this with
|
I think a config-file layer is the right approach. In the original use case for this feature, there's an existing binary somewhere in
This allows interfacing with existing commands that don't fit the If we extended this to per-user commands, we could do it via files in |
This is something that I'd want as well for being able to use Fedora CoreOS in environments where a standard Authorized Keys Command already is set up and needs to be layered into the system (for things like retrieving keys from arbitrary databases or services). |
Synthesizing percent-substitutions is a bit riskier than just forwarding them from sshd, since there's a risk that we won't produce the same values that sshd would. Proposal: take short arguments matching the substitution tokens, so our
And we could still take a bare We might use TOML for the config files. Its Rust parser should be robust and the format is simple. |
Out of curiosity, did anybody already check how hard would it be to patch |
I'm not sure sharing |
Feature Request
Desired Feature
GCP OS Login also uses an
AuthorizedKeysCommand
, but sshd only allows configuring one of those. Add a set of config directories in/usr
,/etc
, and/run
that accept drop-ins giving additional commands to run. Run each command in sequence and let their stdout/stderr flow back to sshd.The text was updated successfully, but these errors were encountered: