☝️Small business or a startup? See if you qualify for our special offer.
+

Question about secure authentication in Flexmonster Data Server

Answered
Marcos Nolasco asked on August 12, 2025

Hello Flexmonster team,

We are currently using Flexmonster Data Server in our project and have an important question regarding the security of our MySQL database connections.

Our goal is to protect data access without requiring users to enter a separate username and password, since they are already authenticated in our main system. We noticed in the documentation that the Data Server supports basic authentication with login credentials, but this would create a redundant login process for the user, which we would like to avoid.

We also saw that token-based authorization is supported, but we couldn’t find detailed information on how the token should be generated, validated, or used in requests. Could you please clarify how to implement this approach?

Additionally, we considered using a reverse proxy to handle requests and validate the user’s token, but this would require additional API development. Therefore, we’d like to know if there are other recommended alternatives to secure access to the Data Server while leveraging the authentication already present in our system.

Thank you in advance for your support. We look forward to your guidance on the best way to implement this protection.

2 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster August 13, 2025

Hello, Marcos!

Thank you for reaching out to us.

Kindly note that Flexmonster Data Server’s built-in authorization requires creating separate users and assigning passwords to them.

For the described case, our team recommends a reverse proxy approach to handle additional security without making users enter the password. It is possible to pass the tokens from Flexmonster client to the proxy server using the requestHeaders property. Please note that token generation and validation should be handled on your side.

Hope you will find our answer helpful.

Kind regards,
Solomiia

Public
Marcos Nolasco August 19, 2025

We successfully implemented the reverse proxy for querying the Flexmonster Data Server. However, we are now facing a challenge related to server memory consumption.

During the testing phase, we are using Flexmonster Data Server connected to MySQL. We noticed that indexes are stored in memory, and one of them, which queries approximately 1,700,000 rows, is consuming around 7 GB of RAM. This index belongs to a single database, but our goal is to scale the solution to around 500 different databases, which could exponentially increase memory usage.

Additionally, we have smaller indexes, such as those using simple GROUP BY queries or returning around 1,000 rows. For these cases, we would prefer to avoid caching and allow direct querying, since the data volume is small and response time would be acceptable.

We would like to know if Flexmonster Data Server allows configuring which indexes should be cached and which should be queried directly without caching.

We are also open to suggestions for optimizing memory usage, including testing scenarios without caching, where queries are executed on demand. Are there any recommendations or best practices you suggest for this kind of approach?

Maksym Diachenko created a new ticket #75085 from this answer

Please login or Register to Submit Answer