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

User can get prompt when there is error about passwordless dependency or property. #58

Conversation

rujche
Copy link

@rujche rujche commented Dec 2, 2024

User can get prompt when there is error about passwordless dependency or property.

}

func detectPropertySpringDatasourcePassword(azdProject *Project, springBootProject *SpringBootProject) {
var targetProperty = "spring.datasource.password"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @saragluna , @moarychan

Whether spring.datasource.password should be deleted in customer's application.yml when using passwordless connection?

  1. Not need to delete. I tested deploy by mi, keeping this property will not cause problem.

  2. Not need to delete. I checked the source code: is empty will continue the logic of passwordless.
    image

  3. It's necessary to delete. According to this doc: https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/migrate-postgresql-to-passwordless-connection?tabs=sign-in-azure-cli%2Cspring%2Capp-service%2Cassign-role-service-connector

image

  1. I remember it's necessary to delete it because empty string is also a valid password for DB.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We provide a property isPasswordlessEnabled, it should be met first. If use uses an empty password to connection db, then the isPasswordlessEnabled should be set to false, is this OK?

detect.Services[i] = prj
// delete database
delete(detect.Databases, database)
return false, nil
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haoozhang

Seems there is some problem about related code in AzureDepEventHubs, could you please fix it in another RP?
Here is the link to related PR: https://github.com/azure-javaee/azure-dev/pull/27/files

…ror-about-passwordless-dependency-or-property
@rujche rujche merged commit 62d2958 into azure-javaee:feature/sjad Dec 3, 2024
2 of 5 checks passed
@rujche rujche deleted the user-can-get-prompt-when-there-is-error-about-passwordless-dependency-or-property branch December 3, 2024 09:05
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

Successfully merging this pull request may close these issues.

3 participants