Azure connection from Viktor IP

Hello all,

I just published an application that works perfectly on the dev-environment. However, the app retrieves data from our IP-protected Azure database and the IP-address of Viktor is not yet added to the whitelist.

Can someone provide me this information or give a workaround?

Code snippet:
sql_conn = pymssql.connect(server=server, user=user, password=password, database=db)
cursor = sql_conn.cursor()
if average:
query = “SELECT [Sensor],[Dag],[Gem_Tubelevel] FROM Sensordata1pD WHERE Sensor IN (%s) AND Dag between (%s) and (%s)” % (locations_sql, start, end)
else:
query = “SELECT [Code],[TimeStampUTC],[TubeLevel] FROM SensorData WHERE Code IN (%s) AND TimeStampUTC between (%s) and (%s)” % (locations_sql, start, end)
cursor.execute(query)

Thank you in advance!

Hi Quinten,

I will look into some possibilities and get back to you probably some time tomorrow

Regards,

Raoul

There are a few directions you can take on this:

  1. Query the database using a generic worker. This would mean that you install a worker on the machine that holds the database and is able to run a script similar to the one you pasted above. You can send an input file that contains the relevant parameters for your query. Subsequently, you trigger the script that reads the input file, queries the database and creates a result file. The result file is returned to the platform and can be parsed in the app.
  2. The platform has a set of fixed IP-addresses, but we do not plan on keeping these stable. Therefore, the ip-addresses will be rotated sometime in the future. If this happens the app will not be able to connect the db anymore and require an update
  3. There might be ways to configure the azure database such that it doesn’t need a specific white-listed set of ip-addresses for secure communication. Did you look into this?

Thank you for the response. I will discuss these options internally.

In the meantime, would it be possible to share the currently fixed IP-addresses as the client needs the data as soon as possible? It concerns ground water levels for an international project that not have been monitored since July so an update is critical.

Hi Quinten,

I will send you a direct message.

Regards,

Raoul