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

Guidance on how to use with password-less login with Azure Service Principal or Managed Identity #512

Open
sivawba opened this issue Mar 6, 2022 · 1 comment

Comments

@sivawba
Copy link

sivawba commented Mar 6, 2022

Environment

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.13 (stretch)
Release:        9.13
Codename:       stretch
Linux 2d6c2ce35519 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 GNU/Linux

TinyTDS Version and Information

     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 7.3
                              iODBC: no
                           unixodbc: no
              SSPI "trusted" logins: no
                           Kerberos: no
                            OpenSSL: yes
                             GnuTLS: no
                               MARS: yes

FreeTDS Version

freetds-1.1.24 && ./configure --prefix=/usr/local --with-tdsver=7.3 --with-openssl=/usr/bin && make && make install

Description

Stack:

Rails 5.2
Ruby 2.3.0
tiny_tds 2.1.5
freetds 1.1.24
activerecord-sqlserver-adapter 5.2.0

We are trying to port a Rails application to Azure cloud and would like to use Azure Service Principal or Managed Identity instead of the database.yml username/password, while connecting to Azure SQL-MI

Is it possible to do this without specifying username/password in database.yml by using access_token from Azure IMDS endpoint as shown here for Python?

Any pointers on how to accomplish this would be greatly helpful. Thanks again for a great library that is helping us move forward with the port.

@Michoels
Copy link

Michoels commented Jan 10, 2024

It's not possible yet.
FreeTDS doesn't support Azure AD login (Now rebranded as Microsoft Entra ID) at the moment.

We need to wait until FreeTDS adds support, and then TinyTDS will be able to add it.

Here's the relevant FreeTDS issue.

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

2 participants