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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple authentication methods #825
Support multiple authentication methods #825
Conversation
I can't get this to work for me. After setting
|
Sorry, that |
Doesn't throw anymore but still doesn't seem to work, tried both my SSH key as well as password and SSHJ always fails saying all authentication methods were exhausted. I'll try to debug some more on my end... |
uhh |
@FabianHenneke can you rebase this and #807 when you get a chance? I have the weekend off so I'm going to try and create a docker setup to allow me to test this. |
612d626
to
545e4e7
Compare
Done, but EDCSA keys remain broken for now. Everything else should work as before. |
@FabianHenneke would you be able to rebase this some time over the next week? Should leave us enough time to be able to review and test this before the September release. |
545e4e7
to
c5dd328
Compare
Please review and merge #1084 first. |
I think it's acceptable. I assume we'd only be offering password authentication for servers that do advertise |
That should be true based on my understanding of the SSHJ code, but I don't have the setup to test it properly. |
Maybe we should rethink our AuthMode switches though. If we could make the switches shown depend on whether or not the URL starts with |
c5dd328
to
b680fc4
Compare
Should certainly not be impossible, I can take a stab at it. Do you want it to go in with this PR? |
I would prefer to have this go in as is. The other change would be almost purely UI-related while this does not touch the UI at all, so I would prefer them to remain separate. |
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ux-improvements: DecryptActivity: hide menu items until decrypt finishes Address review comments GitCommandExecutor: cleanup and address build warning Hide unsupported authentication methods git: re-add back button handling
I tried cloning from a server which only had password authentication after setting authentication mode to SSH key in the app and did not get prompted for a password, but from my understanding of the changes here, that shouldn't have been the case? |
Yes, if that doesn't work and there is nothing else that's wrong here, then I fear sshj doesn't properly deal with multiple auth methods. Could you send me the sshj log output? |
* develop: Use same checks as BiometricAuthenticator in UserPreference (android-password-store#1088) UX fixups and improvements (android-password-store#1086)
Obviously simply taking a log made it behave 馃槕 |
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
馃摙 Type of change
馃摐 Description
Add support for multiple authentication methods by offering password authentication after public key authentication.
Along the way, refactor GitOperation to use a (somewhat) proper builder
pattern. This uncovered that we were previously not using SSHJ for the
case of no authentication, which is now rectified.
馃挕 Motivation and Context
Fixes #333, fixes #548 and fixes #782 if it works.
馃挌 How did you test it?
I lack the setup to test this properly and only verified that SSH public key authentication by itself still works as expected. Password authentication, public key followed by password authentication and no authentication still need testing.
馃摑 Checklist
馃敭 Next steps
馃摳 Screenshots / GIFs