Open droscy opened 3 months ago
Hi, i have potentially found the issue.
go-passbolt (the library which go-passbolt-cli is built on) checks if MFA is Required by checking if the URL the Server returns on a API Error is equal to /mfa/verify/error.json
, changing the Base Path apparently also changes this URL to /passbolt/mfa/verify/error.json
according to your logs.
go-passbolt uses the URL instead of the Message for MFA detection because the Message changes based on the Servers default language and used to break MFA on non english installations.
The Problem is here: https://github.com/passbolt/go-passbolt/blob/e13f484bcbacb8830afe9aa7ad4fb77ee3efbaed/api/api.go#L65 I think the Problem can be solved by simply matching this as a suffix instead of the entire URL.
For now you could temporary disable MFA on the Account you are using for go-passbolt-cli.
I have the fix implemented and login is still work with my Passbolt instance. Unfortunatly a github actions change broke the tests and i am short on time today. I hope i can do a release with the fix the in next few days if time permits.
If you are able to compile yourself, testing the fix would be appreciated. You can do so by cloning go-passbolt on the fix_mfa_detection branch and cloning go-passbolt-cli on the main branch, uncomment the Replace line at the end of go-passbolt-cli's go.mod file and running go build.
Hello @speatzle, many thanks for the fix. I have no knowledge of go and I don't have a build environment ready, but I'll try to build myself in order to test.
I confirm the fix works, many thanks
Describe the bug: Hello, I'm trying to access my self-hosted installation of passbolt with go-passbolt-cli and I'm always receiving the following error whatever method I set in
--mfaMode
My passbolt is started with
APP_BASE
set to/passbolt
and if I comment outAPP_BASE
the MFA works correctly.To Reproduce: Just start passbolt with
APP_BASE
environment variable set to/passbolt
, for example with dockerOutput when using --debug (you should censor this):
If I masked too much in the below output please let me know.
Passbolt Server Version (please complete the following information):
go-passbolt-cli Version (please complete the following information):
Additional context None