Security

Fundamental Principle

Server-side zero-trust - The client is never trustworthy. Every action is re-verified against the WebContent structure stored in the database.

Permissions are declarative (configured in the Dev Panel), not hard-coded. The developer has nothing to code for basic security.

Security Pipeline (5 Steps)

Every web request goes through this automatic pipeline:

HTTP Request
     |
     v
1. HTTPS enforced    (cert.pem = HTTPS redirect)
     |
     v
2. License + Session (Component + session verification)
     |
     v
3. URL Resolution    (Domain > Page > Parameters)
     |
     v
4. Host database hook (BSPH_WEB_ON_CONNECTION)
     |
     v
5. Security check    (Rights, pages, events, POST)
     |
     v
   Business logic

3 Levels of Rights

Access rights are declarative and nested:

LevelFieldProtectsBehavior
1 - DomainWebDomain.userRightUuidEntire siteNot logged in = login / Without permission = 403
2 - PageWebDomainMenu.userRightUuidA specific pageSame logic: login or 403
3 - Block/FieldblockProperties.userRightNeededA block or fieldBlock not sent in HTML + POST data rejected
"Not authorized to see a button? The button HTML does not exist."
Protected blocks are never sent to the browser.

Action Validation

  1. Find the WebContent - Query on triggerObject.uuid.
  2. Verify the declared event - className + functionName whitelist.
  3. Validate the data - GG_CHECK_CONSTRAINT: rights, required, regex, types, captcha.
  4. Filter unexpected fields - Any undeclared POST field = removed.

Automatic Protections

AttackBWEB Protection
Unauthorized access3 levels of rights (domain / page / block)
Field injectionOnly fields declared in WebContent pass through
Arbitrary function callServer whitelist (className + functionName)
Man-in-the-middleHTTPS enforced if cert.pem present
Bots / scrapingMalformed URLs = 404, captcha
Protected block visibleBlock never sent to browser

Comparison: Raw HTML vs BWEB

FeatureRaw HTMLBWEB
SecurityCode it yourselfAutomatic
MaintenanceSource codeVisual Dev Panel
4D DataCustom RESTNative ORDA
CMSBuild it yourselfIncluded
RightsCode it yourself3 declarative levels
ValidationCode it yourselfRegex, types, required
EventsNot securedServer whitelist