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

Cannot use "Authentication=ActiveDirectoryMSI" with "User", "UserName" or "Password" connection string keywords. #4343

Open
2 tasks done
vandung3101 opened this issue Oct 30, 2024 · 0 comments
Labels
defect Something isn't working in triage

Comments

@vandung3101
Copy link

Current Behavior

Seem like docker image have default value for username/password and they are blocking connection to database using managed identity, we get this error when trying to start the container

2024-10-29T10:12:32.385140481Z Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot use "Authentication=ActiveDirectoryMSI" with "User", "UserName" or "Password" connection string keywords.

We set ALPINE_DATABASE_URL for the connection string

jdbc:sqlserver://[...].database.windows.net:1433;database=[...];encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryMSI;msiClientId=[...]

I also try to set ALPINE_DATABASE_USERNAME and ALPINE_DATABASE_PASSWORD to empty but it does not work. Other applications like SonarQube, ... all work well with jdbc connection string so I can think of any issue rather than the dependency track itself

Steps to Reproduce

  1. Create sqlserver, with entra id authentication
  2. Conduct the connection string with Authentication=ActiveDirectoryMSI
  3. Deploy dependency apiserver with ALPINE_DATABASE_URL

Expected Behavior

Application work with connection string

Dependency-Track Version

4.8.x

Dependency-Track Distribution

Container Image

Database Server

Microsoft SQL Server

Database Server Version

12.5

Browser

Google Chrome

Checklist

@vandung3101 vandung3101 added defect Something isn't working in triage labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working in triage
Projects
None yet
Development

No branches or pull requests

1 participant