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

[Feature request] disallowing or checking if users are enabled or not when using authorized_keys #19

Open
simcop2387 opened this issue Sep 9, 2024 · 1 comment

Comments

@simcop2387
Copy link

Is your feature request related to a problem? Please describe.

This is likely out of scope of the utility itself but it might be useful to document things here anyway since it'll probably affect all users of the utility.

Right now if you allow the use of authorized_keys along with kc-ssh-pam, things will not check in KeyCloak if the user is enabled or authorized to log in, potentially allowing users to bypass access controls if they've ever had access to a system in the past.

Describe the solution you'd like

My proposal (at the moment) is to document this as a potential issue, and show how to configure OpenSSH (potentially others?) so that it will only go through the password authentication and ignore authorized_keys for users (this is typically backwards from recommended practice). I'll try to write up this in a fork myself today to be reviewed so that it can be reviewed.

Describe alternatives you've considered

Longer term, and what I will look into myself is to see if there's a way to use the existing OIDC client in this library to ask KC if a user would be authorized to log in, which could then potentially be configured to be used during login with a key rather than the password and still allow things to be managed externally in KC even if password auth is not touched.

Additional context

No additional context yet.

@kha7iq
Copy link
Owner

kha7iq commented Sep 10, 2024

Hello @simcop2387
Thank you for the details information.
Any PRs to have a better understanding, or proper solution are highly appreciated.

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

2 participants