There are numerous claims going around that having WebDirect with a [Guest] access is inherently unsafe. Examples: Link1Link2
While I don't dispute that it's easy to have a bad security hole if you aren't careful, what if you are careful?
Imagine a WebDirect solution which is very simple: it allows an anonymous user to submit a form with several fields (Name, Email address). That's all.
Configuration:
[Guest] permissions apply only to WebDirect (fmwebdirect extended privileges only, no fmapp)
[Guest] permissions highly customized as follows:
access to a single layout, which has only global fields on it
Record access: View: yes, Edit: yes, Create:No, Delete:No, Field Access: only the global fields
A button 'Submit' which runs a script. The script runs with Full Access Permissions, and does the job of creating a new record and populating the fields by copying values from the globals into a second table (Table2) which the [Guest] permission has zero access to.
File Options / Script Triggers / OnFirstWindowOpen runs a script which Hides and locks the menubar, hides and locks the toolbar, and installs a minimal Menu Set.
Additional security features, although the [Guest] account doesn't have view permissions to the table in the first place, as a secondary level of precaution you could add one or more of these:
Set an additional Record-level View permission for Table2 based on Get(CurrentHostTimestamp) which limits record view to the last 10 minutes.
The Login script creates a GUID set in a Global variable $$GUID, and the record-level View permissions calculated so a record is only viewable if $$GUID = Table2::GUID
What do you all think - are there any gaping security holes with this sort of setup?
I would push the data from the globals into a temporary storage table. You don't want the web to know about the rest of your databases on your FMP server. Have a long running script schedule check that table often and process records when it finds them. The temporary table can have a bunch of scripts that verify and sanitise the data to ensure that it is clean and safe. That would typically mean moving it again into a "clean" table or into "clean" fields. The database that wants to have the data can reach out and find clean data and move it into place.
This is basically what Studio was for (and it's incredibly easy to replace with common web tools). Have a web form that stores data into a mySQL or mongo database. Then let your FMP database grab the data from the web DB.
Right, for extra security, it might be wise to make this WebDirect database its own thing (not simply a Table within your bigger database).
And the scripts which pull data should probably be located in the master database, not in the WebDirect file.
I suppose you could even "air gap" it a bit more - for example the WebDirect database could have a script which exports to CSV on the server, and then the master database picks up that CSV file. That way the WebDirect database literally has no knowledge of any other FileMaker databases you are running.
It's my belief (hunch? prayer?) that a suitably locked down WebDirect database should be OK to use with [Guest] access.
@Malcolm it sounds like you are leaning that way, too?
Sort-of, kind-of.... If it's a sunny day in paradise - yes.
For context, I work full-time supporting a system is delivered via WebDirect to thousands of users. It's widely distributed system, across many different servers. It doesn't offer Guest access but that's not the point.
The issue is that anything facing the internet is exposed to threat. We typically ensure that our most important systems are protected from that threat. WebDirect puts a FileMaker server directly into the front line. So a typical website is always exposed to this sort of threat and web services are highly adapted to that environment. Apache Nginx, or IIS are designed to handle a lot of traffic. And web servers are resourced differently too. They'll have a ton of security focussed services active, as well as hardware resourcing, and zone separation and all sorts of stuff to ensure that the servers stay up.
Do you put the same amount of effort into ensuring that your WebDirect app is going to stay up? Once you start resourcing your FMS to be web facing 90% of the use-cases for WebDirect evaporate. The value of WebDirect for our business justifies the costs.