Closed ArchBlood closed 1 year ago
As far as I can see, there is already a check of the JSON field and if you enter an incorrect JSON string, we will see the message 'Invalid JSON input.' Maybe you need to add some more validation or do something differently?
Currently the only validation implemented is that it's a JSON input, this means any JSON code can be placed in the field and be saved and shown as a valid format. There should be a way to validate that the JSON strings are related to the Google Services not just any JSON string entered.
I think a check for valid JSON is most important. Maybe we can additionally check for type
= service_account
to be sure that it is a correct dataa.
example header of a valid json:
{
"type": "service_account",
"project_id": "humhub-push-service",
"private_key_id": "....",
"private_key": "....",
There should be a check to validate the Service Account JSON field is in JSON format else a warning should be thrown warning the user.