22 lines
841 B
Bash
22 lines
841 B
Bash
#!/bin/bash
|
|
|
|
# Deploy Firestore security rules
|
|
echo "🔒 Deploying secure Firestore rules..."
|
|
firebase deploy --only firestore:rules
|
|
|
|
# Deploy cloud functions with new secure endpoints
|
|
echo "☁️ Deploying cloud functions..."
|
|
firebase deploy --only functions
|
|
|
|
echo "✅ Security migration complete!"
|
|
echo ""
|
|
echo "🔒 Security improvements implemented:"
|
|
echo " - All direct Firestore client access is now blocked"
|
|
echo " - Data operations go through authenticated cloud functions"
|
|
echo " - User authorization is verified on every request"
|
|
echo " - Database structure is hidden from clients"
|
|
echo ""
|
|
echo "⚠️ Important: Make sure to update your frontend to use the secure API"
|
|
echo " - Replace all direct Firestore calls with secureApi methods"
|
|
echo " - Update components to use the new OrgContext implementation"
|
|
echo "" |