The Web Ingestion Buffer
ubcgi and ubpost operate as high-velocity CGI engine scripts that provide a secure, native interface to interact with the Unibase application layer over web fabrics. This framework delivers an accelerated interface built from strict architectural security criteria, acting as an immutable processing buffer between the open internet and underlying database definitions.
Protocol Delineation: While ubpost is reserved explicitly to handle incoming HTTP POST payloads, ubcgi functions as the dedicated ingestion gateway for all synchronous and stateless HTTP GET parameter transactions.
Endpoint Mapping & Server Instantiation
To securely attach outside gateways down to the Unibase platform, the upstream HTTP server must map to a standardized execution environment:
| Server Setup | The HTTP daemon (httpd) must be configured with a valid execution block mapping directly to a standard cgi location. Target Template: http://somedomain/cgi-bin/ |
| Interface Endpoint | Once mapped, the absolute web gateway target for making structural execution calls into the system becomes: http://somedomain/cgi-bin/ubcgi |
| Sample Invocations | A standard structured transaction call tracking inventory vectors across the edge is passed via the query string: http://somedomain/cgi-bin/ubcgi?REPORT_NAME=stock&MATCH=12345 |
Query String Command & Argument Matrix
The ubcgi query string maps incoming parameters straight to the core execution blocks. Each structural command mandates specific headers and argument controls:
| Query Vector Command | Content-Type Enforced | Target Behavior & Argument Rules Matrix |
|---|---|---|
| PROMPT_NAME | text/html | Runs a core Unibase screen program (ubprompt). Required Argument: FORM=Y to successfully invoke the visual display matrix. Incorporates general arguments. |
| REPORT_NAME | text/html | Executes a standard compiled report (ubreport). Optional Arguments: MATCH (passes the -m flag directly down to ubreport) and MATCH_LAST (passes the -l flag directly down to ubreport). Incorporates general arguments. |
| JSON_NAME | application/json | Executes a structured report (ubreport) and formats the output buffer as a JSON object. Optional Arguments: Accepts MATCH (-m flag) and MATCH_LAST (-l flag). Incorporates general arguments. |
| XML_NAME | Not Specified | Invokes an XML-mapped engine report (ubreport). Note: The underlying report script itself must explicitly provide its own custom Content-type header block. Accepts optional MATCH and MATCH_LAST fields. |
| PROC_NAME | Not Specified | Spawns a specific procedure or shell binary located strictly within the application path hierarchy: $UG_APP/bin (resolving to /usr/local/app/<application>/bin). Note: The targeted script procedure must handle its own output content-type specification. Maps command line arguments. |
| ITEM_NAME | text/html | Runs an internal selection lookup array (ubitem). Required Argument: FORM=Y to generate the screen picker environment list layout. Incorporates general arguments. |
Argument Processing Hierarchy & Shell Passing
Query variables appended to the incoming payload boundary are automatically filtered by ubcgi into localized variable categories before execution:
General Arguments
Any parameter matching the structural mold of <identifier>=<value> is automatically ingested by the gateway logic. The exact text string string declared in <identifier> is placed directly into the operational environment tree, making <value> immediately accessible to the executing underlying application command block.
Command Arguments
To safely pass literal command line flags through an HTTP query layer into local system binaries without security script escaping conflicts, ubcgi evaluates variables via two explicit structural formats:
| Syntax Model | Query Execution Pattern Example | Resulting Engine Invocation Line |
|---|---|---|
| <argument>=YES | PROC_NAME=ls&-l=YES | ls -l |
| ARG=<argument> | PROC_NAME=ls&ARG=-l | ls -l |
Defensible Interface Defenses
Utilizing ubcgi as the primary, hardened data transport boundary provides critical platform security isolation advantages:
| Path Containment | Procedure tasks are strictly forced to execute within locked application subfolders, halting directory traversal actions or unauthorized system command manipulation. |
| No Server Footprint | Converts stateless web queries straight into system parameters inside a short single-pass binary frame, preventing long-standing web server tracking state drift. |
| Agent Architecture Ready | Provides outside robotic layers, asynchronous webhooks, and modern AI pipelines with a raw, high-density access pipeline to pull structured lists or JSON fields with zero overhead. |