The Wayback Machine - https://web.archive.org/web/20220114210312/https://github.com/PowerShell/Win32-OpenSSH/issues/1787
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] SSH with AAD credentials #1787

Open
bagajjal opened this issue May 5, 2021 · 2 comments
Open

[Feature request] SSH with AAD credentials #1787

bagajjal opened this issue May 5, 2021 · 2 comments

Comments

@bagajjal
Copy link
Collaborator

@bagajjal bagajjal commented May 5, 2021

Issue

  • OpenSSH doesn't support SSH with AAD (Azure active directory) credentials.

How to check if the user is an AAD user or not?
   - Execute "whoami /user" on cmd.exe. If the SID starts with "S-1-12-1" then it's an AAD user.

Root cause

  • Windows OS fails to generate an S4U token for an AAD user.
  • OpenSSH generates an S4U token for a user in the below scenarios.
        1. Key-based authentication.
        After authenticating user with ssh keys, ssh server generates an S4U token to create the child processes (like interactive shell / sshd.exe / sftp-server.exe) in user context.
        2. To retrieve user group information.
        If sshd_config has a "Match group" block then the SSH server retries the user group information by first generating the S4U token

Impacted scenarios

  • Password based authentication fails if sshd_config has a "Match group" block. fyi, default sshd_config ($env:programdata\ssh\sshd_config) has a "Match group" block.
  • Key-based authentication always fails

Workaround

Work involved

  • Majority of the work is on the Windows operating system side.
  • There are few changes required on the OpenSSH side like retrieve the group information of an AAD user.

Proposed timeline -
As of today, there is no commitment from the windows team.
We had few meetings with the windows team. The work is spawned across three different teams in windows. Windows couldn't prioritize our feature request (create S4U token for AAD user) as we don't have a partner request (or) strong business justification that shows the $ revenue impact.  If any partner team is blocked then request you to follow up with the windows team directly.

@bagajjal bagajjal added this to the vNext milestone May 5, 2021
@bagajjal bagajjal changed the title SSH with AAD credentials [Feature request] SSH with AAD credentials May 5, 2021
@glima
Copy link

@glima glima commented May 11, 2021

Update: workaround is only for password-based auth, key-based needs are totally out-of-luck, still :(

@bagajjal
Copy link
Collaborator Author

@bagajjal bagajjal commented May 11, 2021

@glima - it's expected behavior till windows OS fixes the problem.

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

Successfully merging a pull request may close this issue.

None yet
2 participants