Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Ressource options are not applied properly to MSSQL driver #5299

Open
RincewindsHat opened this issue Dec 4, 2024 · 0 comments
Open

DB Ressource options are not applied properly to MSSQL driver #5299

RincewindsHat opened this issue Dec 4, 2024 · 0 comments

Comments

@RincewindsHat
Copy link
Member

Describe the bug

When trying to add a MSSQL database as a ressource to IcingaWeb2,
one might experience problems due to default connection parameters,
which might not be suitable, but also can not be changed.
The switches and fields in the ressource form are not applied
(except for the host address, port, database name, username and password),
name whether to use TLS and adjandent parameters.

To Reproduce

In my concrete example I wanted to connect to a MSSQL database
and installed Microsofts ODBC driver for that [0].
The integration works in general, "MSSQL" is available
as a "Database Type" in the Ressources Form.

I did install the default version of the driver (18) which should
be the latest one.

When trying to connect to a (default) MSSQL server though,
the error message

Connection failed [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:0A000086:SSL routines::certificate verify failed:self-signed certificate]

should appear. This error message is misleading, since the server does not
offer TLS at all (in my configuration).

Connections in general should be possible though by creating a suitable configuration
in /etc/odbc.ini with the parameter Encrypt=no or an equivalet DSN via isql or
similar tools.

The steps would broadly be:

  1. Setup a MSSQL server without TLS connections (default)
  2. Add a database, user, etc (remember to allow SQL authentication)
  3. Enter the parameters in a new IcingaWeb2 ressource form and set use_ssl to false
  4. Try to validate

Expected behavior

The database connector/driver should respect/receive the parameters properly,
especially use_ssl should be mapped to Encrypt.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About):
Icinga Web 2 Version 	2.12.2
Git commit 	7f9217b0521f19f770ad59ca17d7d4b3514e54e5
PHP Version 	8.2.26
Git commit date 	2024-11-13
[Get Icinga Support](https://icinga.com/support/)
[Icinga Community](https://icinga.com/community/)
[Report a bug](https://github.com/icinga/icingaweb2/issues)
[Icinga Documentation](https://icinga.com/docs/icinga-web-2/2.12)
Loaded Libraries
icinga/icinga-php-library 	0.14.1
icinga/icinga-php-thirdparty 	0.12.1
Loaded Modules
director 		1.11.2 	[Configure](http://192.168.122.148/icingaweb2/config/module/?name=director)
fileshipper 		1.2.0 	[Configure](http://192.168.122.148/icingaweb2/config/module/?name=fileshipper)
icingadb 		1.1.3 	[Configure](http://192.168.122.148/icingaweb2/config/module/?name=icingadb)
incubator 		0.22.0 	[Configure](http://192.168.122.148/icingaweb2/config/module/?name=incubator)
pdfexport 		0.11.0 	[Configure](http://192.168.122.148/icingaweb2/config/module/?name=pdfexport)
reporting 		1.0.2 	[Configure](http://192.168.122.148/icingaweb2/config/module/?name=reporting)
  • Web browser used:

    firefox

  • PHP version used (php --version):

    PHP 8.2.26

  • Server operating system and version:
    Debian 12 (bookworm)

[0] https://learn.microsoft.com/de-de/sql/connect/php/microsoft-php-driver-for-sql-server?view=sql-server-ver16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant