This request is to switch APIs from being unrestricted by default to restricted by default. If an API needs to be open then a "Security Unrestrict" could be added to the API.
This is a better approach to ensure data is not leaked unintentionally by Wappler developers that miss the step or do not know better.
This comes up every so often in posts and I would wager many Wapplers are exposing their data like this unsuspectingly.
I think a better approach is to specify which group of routes should be protected. Refer to a past topic of mine, though I donāt think a feature request is open:
Voted. āRestricted by defaultā needs to be the default. @Apple idea of having groups of them is a good one, itād certainly save a bit of set up time and make it easier to secure a lot of APIs with one click
But restricted how, any logged in user? Specific user?
As user role can differ it is difficult to be generic?
I mainly use security restrict in an admin environment and adding a default general restriction would just be a nuisance.
Also how will the redirect work? To a fixed url set by wappler?
Perhaps this could be managed in site settings?
I think it would be an across the board restriction based on security identity. Role/permissions would not be related to this restriction.
I understand that adding a default restriction would be a ānuisanceā for some, but not having data restricted is even worse. Inadvertently exposing data has much larger affects than the effort needed to explicitly unrestrict specific APIs.
Just look at AWS S3 as an example for why restricting by default should be the norm. Thereās too many data leakages and mistakes that developers can make to not require explicit access.
I foresee this being something that is additive. For example, there is a global security restrict and anything added to the individual APIs could override it (i.e. a more specific Security Restrict or a Security Unrestrict on one API while all others fall under the global security restrict).
This would have the benefit of educating newer Wapplers that do not know any better and protect long-term Wapplers from making a mistake during development.
Perhaps three new options in the security provider.
A. Default restriction.
None
Any Role.
Specific role (activates select of all current defined roles for user to select)
Then two pickers for redirects if unauthorised etc.for page/route.
Any manually added restricts should override this.
Still not convinced itās a positive option though, in my view far more api calls are typically public than are in need of security so will be more work in my opinion.
I donāt think so, personally I think that more of Wappler users develop Backends, and most of the Wappler functions today help in develop Dashboards, admin panels, etc (Login, backend stuff, etc). With that in mind, most of the API calls should be restricted and not public.
Not sure how this will work out with the role option in the security restrict functionality - without adding to confusion of the existing security setup.
I do not like/want this because we use our own mechanism for security - while using Wapplerās.
If this is going to be done on Globals level as a default, I would need an option to disable it.
This way no extra actions and programming is needed from the Team for existing projects
Every folderās Restriction Permissions setup is reserving its subfolders Permissions.
This means if we want a subfolder that only a few may have perimission on it, we have to set its parent folder to āNoneā so the subfolder is accesseable on first level and then applied its own permissions.
Of course, I donāt know how difficult is this to be applied by the Teamā¦
I wish it was something that can be applied!