How is your experience with the OutSystems Community?
10
Views
1
Comments
[SQL Sandbox] Regarding SQL Sandbox Tool
sql-sandbox
Web icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

Hi Everyone,

I'm using an OutSystems 11 Cloud environment which is managed by OutSystems. and I'm using SQL sandbox for application maintenance and support purpose. I'm having queries regarding how safe is to use SQL sandbox in prod environment. Please help me to get the answers of the following queries.

 1. When I'm running queries, where exactly those queries executed (within Outsystems platform or any external server)? 

2. Is SQL sandbox using API's or any external link to process queries?

3. How SQL sandbox executes the query (Step by step workflow, from taking query input to parse sql statements then sending and executing given query on platform DB).


Regards,

Ajay Shrivastava

UserImage.jpg
Monaj Sing

Hi Ajay,

SQL Sandbox is a Forge component, not an OutSystems-hosted service. You install it as an application in your own environment, and OutSystems Cloud is only the infrastructure it runs on.

1. Where do the queries run? Inside your environment. The app executes SQL statements directly on the platform database, so nothing is routed to an external SQL server. The database is managed by OutSystems in Cloud, but the queries still run against your environment’s own platform database. 

2. Does it use APIs or external links? Not for running queries. That is an internal call from the app to the database. The one exception is the optional ChatGPT helper in newer versions. It only activates once an OpenAI key is placed in the OpenAI_SecretKey site property of the SQL module, and that key is shared with every SQL Sandbox user. If the property is empty, no external calls are involved. I’d confirm it’s empty in Service Center for your production environment. 

3. Step-by-step workflow I haven’t traced the internals line by line, so please check the module in Service Studio. As far as I know the flow is:

  1. The user opens the app and logs in. The DML role must be granted before anyone can access it. 
  2. The user types the SQL, using the physical table names. The Entities side panel helps look them up. 
  3. On Execute, the screen passes the statement text to a server-side action in the same environment.
  4. That action sends the statement to the platform database over the environment’s own database connection. I’m not aware of a separate SQL parsing layer. The database engine itself parses, plans and executes it.
  5. The result set comes back and is displayed in a tabular view similar to an aggregate preview. 

Is it safe in prod? The tool is not unsafe in the sense of leaking data. It is simply a very powerful channel to the database. The documentation warns that INSERT, UPDATE and DELETE statements can corrupt data and may leave the platform unable to work properly. It’s also described as being mainly for troubleshooting and data cleanup in development environments. If you use it in production, I’d suggest: 

  • Grant the DML role to as few people as possible.
  • Stick to SELECT queries wherever you can.
  • Take a backup and test any data-changing script in a lower environment first.
  • Remove the app or revoke the role when you don’t need it.
  • Check that the ChatGPT key property is blank.

This earlier thread covers the same topic: https://www.outsystems.com/forums/discussion/101340/is-sql-sandbox-application-secure-to-use-it-in-prod/ It also mentions requesting database access through OutSystems Cloud as an alternative. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.