Reputation: 31
if I have a service account set up and am initializing the app in a firebase function with the service account credentials to do some database maintenance work, how can I restrict the rules in the database so that only the service account is able to access that path in the database, how can I go about it?
The only available options in the auth object appear to be token, uid, and provider.
The only fields available in the service account json file are: { "type": "service_account", "project_id": "private_key_id": "private_key": "client_email": "client_id": "auth_uri": "token_uri" "auth_provider_x509_cert_url" "client_x509_cert_url" }
Upvotes: 3
Views: 460
Reputation: 317467
Service accounts always bypass all security rules. It's not possible to write any security rules that limit the permissions of a backend SDK initialized with a service account.
Upvotes: 3