RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1847808 - [RFE] AD authentication for accessing SQL Server metrics
Summary: [RFE] AD authentication for accessing SQL Server metrics
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcp
Version: 8.4
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: 8.4
Assignee: Nathan Scott
QA Contact: Jan Kurik
Apurva Bhide
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-17 06:06 UTC by Nathan Scott
Modified: 2021-09-17 12:44 UTC (History)
11 users (show)

Fixed In Version: pcp-5.2.1
Doc Type: Enhancement
Doc Text:
.Active Directory authentication for accessing SQL Server metrics in PCP With this update, a system administrator can configure `pmdamssql(1)` to connect securely to the SQL Server metrics using Active Directory (AD) authentication.
Clone Of:
Environment:
Last Closed: 2021-05-18 15:19:32 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nathan Scott 2020-06-17 06:06:51 UTC
Our internal Microsoft SQL Server folk and Microsoft engineers have requested we add support to the PCP SQL Server metrics extraction agent for Active Directory authentication.

From what I can tell so far this requires an extension to the pmdamssql(1) configuration file and some tweaks to the agent code establishing the connection to SQL Server.

Louis Imershein has found a series of notes to help us here:
https://stackoverflow.com/questions/49695990/authenticate-from-linux-to-windows-sql-server-with-pyodbc
Louis also recommended we discuss with Dmitri Pal as he may be able to assist us an AD setup to use for testing.

Tejas Shah from Microsoft has sent this link with examples:
https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/using-integrated-authentication?view=sql-server-ver15

And also notes "When a connection specific trusted connection= true, it uses integrated AD authentication mechanism from client library perspective. As long as SQL Server is configured to use AD auth as well, and client has appropriate kerberos ticket to authenticate itself against the SQL Server successfully, it should work seamlessly."

Comment 3 Nathan Scott 2020-08-25 05:06:19 UTC
Upstream implementation now available:

commit b63c279b7716bf84afd1b5ef3674c3bfd32e18f4
Author: Nathan Scott <nathans>
Date:   Tue Aug 25 14:59:14 2020 +1000

    pmdamssql: add support for Windows authentication
    
    Add a configuration option to mssql.conf and the PMDA
    code to allow the 'trusted_connection' pyodbc setting
    to be used.  This is a Kerberos-style authentication,
    and does not use username/password.  The default PMDA
    behaviour is to use the traditional username/password
    though, unless trusted=true is set.
    
    During testing (both styles) I've confirmed that this
    PMDA does not need to run as root so have enabled the
    privilege-dropping mode - it now runs as $PCP_USER.
    
    Resolves Red Hat BZ #1847808

Comment 9 Jan Kurik 2020-10-15 15:01:04 UTC
The verification of this RFE requires quite complex environment setup. The authentication is sensitive on correct setup of Kerberos, MSAD and MSSQL.
In general if '/opt/mssql-tools/bin/sqlcmd -E' works for 'pcp' user, then the authentication works as described in man page of the mssql PMDA. However, how to get to the point to make the 'sqlcmd -E' working is outside of the scope of this RFE (and the testing).

Comment 17 errata-xmlrpc 2021-05-18 15:19:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (pcp bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1754


Note You need to log in before you can comment on or make changes to this bug.