shubhamdipt / passbolt-python-api

An Api for passbolt in python
MIT License
12 stars 15 forks source link

create_resource: Issue when folder_id is set and not all users keys are imported. #25

Open danielfl opened 4 months ago

danielfl commented 4 months ago

Without importing all users GPG keys, the secret sharing to a folder will fail.

On the share_payload you will receive an error saying the PGP message is empty: {'user_id': 'XXXXXXXXXXXX', 'data': ''}]} ERROR:root:{"header":{"id":"XXXX-0bdc-43f0-8d16-XX","status":"error","servertime":1708009984,"action":"XXXX-9d43-5749-a5fe-XX","message":"Could not validate resource data.","url":"\/share\/resource\/XX-7d37-4b13-a86c-XX.json","code":400},"body":{"secrets":{"1":{"data":{"_empty":"The message should not be empty."}}}}

danielfl commented 4 months ago

Looking closer, I see this can be achieved by "import_public_keys()", however, I don't want to import/trust hundreds of keys to my keystore, only keys from those I have contact with. But feel free to reject/close this PR.