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

Receival of TOTP token not possible #66

Closed
riotbib opened this issue Jan 10, 2025 · 2 comments
Closed

Receival of TOTP token not possible #66

riotbib opened this issue Jan 10, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@riotbib
Copy link

riotbib commented Jan 10, 2025

Describe the bug:

I want to receive TOTP token, id est show the current token. This is possible using the Firefox addon, but not with this tool – as far as I understand using it and reading documentation.

To Reproduce:

In the following resource a TOTP is configured using the Firefox addon, but it's not printed in the output, when using passbolt get resource.

$ passbolt get resource --id <redacted-uuid>
FolderParentID: <redacted-uuid>
Name: <redacted-name>
Username:
URI:
Password:
Description:

Output when using --debug (you should censor this):

[go-passbolt] Request URL: https://redacted.tld/auth/login.json?api-version=v2
[go-passbolt] Raw Request: {"gpg_auth":{"keyid":"<redacted-uuid>"}}
[go-passbolt] Raw Response: {"header":{"id":"2f919a94-68b0-41d5-a1b0-3a55a922bf81","status":"error","servertime":1736493755,"action":"a3c19ad2-8920-5395-86d0-8567cb34f382","message":"The authentication failed.","url":"\/auth\/login.json?api-version=v2","code":200},"body":null}
[go-passbolt] Got Encrypted Auth Token: -----BEGIN\+PGP\+MESSAGE-----<redacted-pgp-message>----END\+PGP\+MESSAGE-----%0A
[go-passbolt] Decrypted Auth Token: gpgauthv1.3.0|36|588fea21-7934-491b-8dfc-1943fbd0f692|gpgauthv1.3.0
[go-passbolt] Request URL: https://redacted.tld/auth/login.json?api-version=v2
[go-passbolt] Raw Request: {"gpg_auth":{"keyid":"d458676680cded44637717b23ebd0ada9f25c6f7","user_token_result":"gpgauthv1.3.0|36|588fea21-7934-491b-8dfc-1943fbd0f692|gpgauthv1.3.0"}}
[go-passbolt] Raw Response: {"header":{"id":"8797495b-9ebc-49ac-b134-6acbae5e9d2a","status":"success","servertime":1736493755,"action":"a3c19ad2-8920-5395-86d0-8567cb34f382","message":"You are successfully logged in.","url":"\/auth\/login.json?api-version=v2","code":200},"body":{"id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","role_id":"63916df5-77cd-4460-93d5-524277dbb532","username":"[email protected]","active":true,"deleted":false,"disabled":null,"created":"2024-09-16T13:27:03+00:00","modified":"2024-12-21T16:12:07+00:00","groups_users":[{"id":"f7b6d27c-4432-4473-b303-46888ce8c5d2","group_id":"f4f698ec-cb72-4f02-bd5a-e0b080188c0d","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","is_admin":true,"created":"2024-12-02T15:01:37+00:00"},{"id":"f97f4687-a791-40c3-9c94-f916aa5c0656","group_id":"546ab2c8-f063-4fa3-b04c-1ea8e111cec7","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","is_admin":false,"created":"2024-12-02T07:42:53+00:00"}],"profile":{"id":"888938f0-bba0-455f-af5f-f26946a2cd0d","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","first_name":"Lennart","last_name":"M\u00fchlenmeier","created":"2024-09-16T13:27:03+00:00","modified":"2024-12-21T16:12:07+00:00","avatar":{"url":{"medium":"https:\/\/redacted.tld\/\/img\/avatar\/user_medium.png","small":"https:\/\/redacted.tld\/\/img\/avatar\/user.png"}}},"gpgkey":{"id":"6992dbeb-8a28-4e88-9378-77a619fce727","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","armored_key":"-----BEGIN PGP PUBLIC KEY BLOCK-----<redacted-pgp-public-key>-----END PGP PUBLIC KEY BLOCK-----\n","bits":3072,"uid":"myname \[email protected]\u003E","key_id":"3EBD0ADA9F25C6F7","fingerprint":"D458676680CDED44637717B23EBD0ADA9F25C6F7","type":"RSA","expires":null,"key_created":"2024-09-16T13:31:25+00:00","deleted":false,"created":"2024-09-16T13:32:04+00:00","modified":"2024-09-16T13:32:04+00:00"},"role":{"id":"63916df5-77cd-4460-93d5-524277dbb532","name":"admin","description":"Organization administrator","created":"2012-07-04T13:39:25+00:00","modified":"2012-07-04T13:39:25+00:00"},"last_logged_in":null}}
[go-passbolt] Got Cookies: [passbolt_session=11u9tcop1cqtfgsh1jr4b10na5; Path=/; HttpOnly; SameSite=Lax]
[go-passbolt] Request URL: https://redacted.tld/users/me.json?api-version=v2
[go-passbolt] Raw Response: {"header":{"id":"48db28e4-2300-4284-a805-94ec8cc34994","status":"success","servertime":1736493755,"action":"881ab948-e40f-5a72-91aa-54b442270029","message":"The operation was successful.","url":"\/users\/me.json?api-version=v2","code":200},"body":{"is_mfa_enabled":false,"id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","role_id":"63916df5-77cd-4460-93d5-524277dbb532","username":"[email protected]","active":true,"deleted":false,"disabled":null,"created":"2024-09-16T13:27:03+00:00","modified":"2024-12-21T16:12:07+00:00","groups_users":[{"id":"f7b6d27c-4432-4473-b303-46888ce8c5d2","group_id":"f4f698ec-cb72-4f02-bd5a-e0b080188c0d","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","is_admin":true,"created":"2024-12-02T15:01:37+00:00"},{"id":"f97f4687-a791-40c3-9c94-f916aa5c0656","group_id":"546ab2c8-f063-4fa3-b04c-1ea8e111cec7","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","is_admin":false,"created":"2024-12-02T07:42:53+00:00"}],"profile":{"id":"888938f0-bba0-455f-af5f-f26946a2cd0d","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","first_name":"Lennart","last_name":"M\u00fchlenmeier","created":"2024-09-16T13:27:03+00:00","modified":"2024-12-21T16:12:07+00:00","avatar":{"url":{"medium":"https:\/\/redacted.tld\/\/img\/avatar\/user_medium.png","small":"https:\/\/redacted.tld\/\/img\/avatar\/user.png"}}},"gpgkey":{"id":"6992dbeb-8a28-4e88-9378-77a619fce727","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","armored_key":"-----BEGIN PGP PUBLIC KEY BLOCK-----<redacted-pgp-public-key>-----END PGP PUBLIC KEY BLOCK-----\n","bits":3072,"uid":"myname \[email protected]\u003E","key_id":"3EBD0ADA9F25C6F7","fingerprint":"D458676680CDED44637717B23EBD0ADA9F25C6F7","type":"RSA","expires":null,"key_created":"2024-09-16T13:31:25+00:00","deleted":false,"created":"2024-09-16T13:32:04+00:00","modified":"2024-09-16T13:32:04+00:00"},"role":{"id":"63916df5-77cd-4460-93d5-524277dbb532","name":"admin","description":"Organization administrator","created":"2012-07-04T13:39:25+00:00","modified":"2012-07-04T13:39:25+00:00"},"last_logged_in":null}}
[go-passbolt] Request URL: https://redacted.tld/resources/26ca05ae-391c-4773-97ba-ec6a701377d2.json?api-version=v2
[go-passbolt] Raw Response: {"header":{"id":"c29c342e-504d-4f4f-b7eb-d20c98079609","status":"success","servertime":1736493756,"action":"83bb8bd8-2006-5546-a3bb-9319ae6e8f9d","message":"The operation was successful.","url":"\/resources\/26ca05ae-391c-4773-97ba-ec6a701377d2.json?api-version=v2","code":200},"body":{"personal":false,"id":"26ca05ae-391c-4773-97ba-ec6a701377d2","name":"<redacted-name>","username":null,"uri":"","description":null,"deleted":false,"expired":null,"created":"2025-01-06T14:20:49+00:00","modified":"2025-01-06T14:20:49+00:00","created_by":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","modified_by":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","resource_type_id":"05ba5c75-504d-5ad6-819a-83af68867d86","folder_parent_id":"3cf4b331-aef8-43b3-9c0b-76a9483018d0"}}
[go-passbolt] Request URL: https://redacted.tld/resource-types/05ba5c75-504d-5ad6-819a-83af68867d86.json?api-version=v2
[go-passbolt] Raw Response: {"header":{"id":"916a0c4e-91b3-4e73-8a1e-d8b267db8e0e","status":"success","servertime":1736493756,"action":"d77de180-4626-54dd-80fb-a095ecc22aac","message":"The operation was successful.","url":"\/resource-types\/05ba5c75-504d-5ad6-819a-83af68867d86.json?api-version=v2","code":200},"body":{"id":"05ba5c75-504d-5ad6-819a-83af68867d86","slug":"totp","name":"Standalone TOTP","description":"A resource with standalone TOTP fields.","definition":"{\u0022resource\u0022:{\u0022type\u0022:\u0022object\u0022,\u0022required\u0022:[\u0022name\u0022],\u0022properties\u0022:{\u0022name\u0022:{\u0022type\u0022:\u0022string\u0022,\u0022maxLength\u0022:255},\u0022uri\u0022:{\u0022anyOf\u0022:[{\u0022type\u0022:\u0022string\u0022,\u0022maxLength\u0022:1024},{\u0022type\u0022:\u0022null\u0022}]}}},\u0022secret\u0022:{\u0022type\u0022:\u0022object\u0022,\u0022required\u0022:[\u0022totp\u0022],\u0022properties\u0022:{\u0022totp\u0022:{\u0022type\u0022:\u0022object\u0022,\u0022required\u0022:[\u0022secret_key\u0022,\u0022digits\u0022,\u0022algorithm\u0022],\u0022properties\u0022:{\u0022algorithm\u0022:{\u0022type\u0022:\u0022string\u0022,\u0022minLength\u0022:4,\u0022maxLength\u0022:6},\u0022secret_key\u0022:{\u0022type\u0022:\u0022string\u0022,\u0022maxLength\u0022:1024},\u0022digits\u0022:{\u0022type\u0022:\u0022number\u0022,\u0022minimum\u0022:6,\u0022exclusiveMaximum\u0022:9},\u0022period\u0022:{\u0022type\u0022:\u0022number\u0022}}}}}}","deleted":null,"created":"2024-03-14T19:55:22+00:00","modified":"2024-03-14T19:55:22+00:00"}}
[go-passbolt] Request URL: https://redacted.tld/secrets/resource/26ca05ae-391c-4773-97ba-ec6a701377d2.json?api-version=v2
[go-passbolt] Raw Response: {"header":{"id":"d8b32571-5e21-4596-9a35-40334f18988b","status":"success","servertime":1736493756,"action":"ad71952e-7842-599e-a19e-3a82e6974b23","message":"The operation was successful.","url":"\/secrets\/resource\/26ca05ae-391c-4773-97ba-ec6a701377d2.json?api-version=v2","code":200},"body":{"id":"e3f0077f-b15f-4322-a184-768a5b91fc5e","user_id":"c81915be-3f3b-4b93-bbd9-b3721ccb9711","resource_id":"26ca05ae-391c-4773-97ba-ec6a701377d2","data":"-----BEGIN PGP MESSAGE-----<redacted-pgp-message>-----END PGP MESSAGE-----\n","created":"2025-01-06T14:20:49+00:00","modified":"2025-01-06T14:20:49+00:00"}}
FolderParentID: 3cf4b331-aef8-43b3-9c0b-76a9483018d0
Name: <redacted-name>
Username: 
URI: 
Password: 
Description: 
[go-passbolt] Request URL: https://redacted.tld/auth/logout.json?api-version=v2
[go-passbolt] Raw Response: {"header":{"id":"33ac02ae-7517-461c-9f1b-900eb9f89120","status":"success","servertime":1736493756,"action":"19f9a792-3495-597b-bc94-dff1bc3e3967","message":"You are successfully logged out.","url":"\/auth\/logout.json?api-version=v2","code":200},"body":null}

Passbolt Server Version (please complete the following information):

  • Edition: Community
  • Version 4.0.0

go-passbolt-cli Version (please complete the following information):

  • OS: NixOS 24.11
  • Version 0.3.1

Additional context

As you may see in the raw debug log the type TOTP is recognized, maybe you can parse that?

{"id":"05ba5c75-504d-5ad6-819a-83af68867d86","slug":"totp","name":"Standalone TOTP","description":"A resource with standalone TOTP fields.","definition":"{\u0022resourc […]

Thanks a lot for the wonderful piece of software!

@riotbib riotbib added the bug Something isn't working label Jan 10, 2025
@speatzle
Copy link
Collaborator

speatzle commented Jan 10, 2025

Hi, currently viewing TOTP's is not supported, in the Last release i merged the bare minimum to have go-passbolt-cli not crash completely when encountering the new Resource Types.

My time is currently very limited and Passbolt V5 Will Require Major work on go-passbolt for go-passbolt-cli to continue working at all passbolt/go-passbolt#23

PR's are welcome if you are up for it.

Tracked by #54

@riotbib
Copy link
Author

riotbib commented Jan 10, 2025

Hej, sorry, I did not see #52 before writing this issue. Due to lack of knowledge about Golang, I am currently not really up for either implementing Passbolt V5 or TOTP.

Thanks a lot for your answer, and again for the software!

Closing this issue due to being a doublet.

@riotbib riotbib closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants