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

Allow for AAD username and password login #60

Closed
vermegi opened this issue Dec 7, 2021 · 6 comments · Fixed by #100
Closed

Allow for AAD username and password login #60

vermegi opened this issue Dec 7, 2021 · 6 comments · Fixed by #100
Assignees
Labels
enhancement New feature or request idle Inactive for 14 days v2-candidate
Milestone

Comments

@vermegi
Copy link
Member

vermegi commented Dec 7, 2021

The underlying SQLCMD tool allows for login to SQL Server by using an AAD username and password combination or even doing integrated login. This is currently not supported by the GitHub sql-action, since the -G switch is not used for AAD login.

I am currently working on a fully automated setup of an Azure SQL Server database fronted by a web app. Code for this can be found at: https://github.com/Azure-Samples/app-service-networking-samples

However I am bumping in the following restrictions for fully automating this flow:

  • I need to use AAD credentials to be able to allow for mi.sql script, since the script executes CREATE USER accountName FROM EXTERNAL PROVIDER; this needs to be done from logged in AAD account
  • I cannot login with AAD credentials through sql-action

I tried using:

     connection-string: ${{ format('Server={0};Initial Catalog={1};User Id={2};Password={3};AUTHENTICATION = ActiveDirectoryPassword', steps.deploy.outputs.sqlServerFullyQualifiedDomainName, steps.deploy.outputs.databaseName, secrets.AAD_USERNAME, secrets.AAD_PASSWORD) }}

However, the AUTHENTICATION = ActiveDirectoryPassword gets ignored.

On execution I get a 'Failed to add firewall rule', from sqlutils.ts file. However, there the login is done without the -G switch for SQLCMD and hence failing for AAD accounts.

Could be that this same issue exists deeper in the code on execution of the actual SQL command, currently I get a failure on FW settings.

Additionally making this integrated AAD login would be nice as well for people wanting to use account of the runner for log in.

@vermegi vermegi added the need-to-triage Requires investigation label Dec 7, 2021
@dzsquared dzsquared self-assigned this Dec 15, 2021
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Dec 30, 2021
@dzsquared dzsquared added enhancement New feature or request and removed need-to-triage Requires investigation labels Jan 5, 2022
@ychen4-li
Copy link

+1 to support ADD integrate login.

@github-actions github-actions bot removed the idle Inactive for 14 days label Jan 26, 2022
@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Feb 9, 2022
@vermegi
Copy link
Member Author

vermegi commented Feb 10, 2022

please keep open

@github-actions github-actions bot removed the idle Inactive for 14 days label Feb 10, 2022
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@zijchen
Copy link
Contributor

zijchen commented Jun 27, 2022

Support for this is added in v2

@zijchen zijchen closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idle Inactive for 14 days v2-candidate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants