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

oidc handling of usernames #587

Open
thmo opened this issue Feb 20, 2024 · 0 comments
Open

oidc handling of usernames #587

thmo opened this issue Feb 20, 2024 · 0 comments
Labels
feature New feature or request good first issue Good for newcomers

Comments

@thmo
Copy link

thmo commented Feb 20, 2024

Please describe what you would like to see in ContainerSSH

Please implement enforceUsername also for the oidc authentication method.
Furthermore, logging could be improved.

Please describe your use case

Using ContainerSSH 0.5 (actually with PR ContainerSSH/libcontainerssh#563 applied) with Keycloak and this configuration

auth:
  keyboardInteractive:
    method: oauth2
    oauth2:
      clientId: "containerssh"
      clientSecret: "..."
      provider: oidc
      oidc:
        deviceFlow: true
        authorizationCodeFlow: false
        usernameField: "preferred_username"
        url: "https://KEYCLOAK_URL/realms/REALM/"

one can login using any username (ssh -l foo ...), and user matching authenticatedUser is not enforced.

Two things:

  • it would be nice to enable checking of this without implementing an authorization hook
  • furthermore, it would be nice to log not only the requested user but also the authenticatedUser, even on log level info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants