DBZ-3517 Making database.user optional for SQL Server.

SQL Server doesn't require username/password when using Kerberos authentication, which can be configured using pass-through database properties. Changing the database.user config to be optional for SQL Server Connector to reflect that.
This commit is contained in:
Juan Fiallo 2021-10-14 10:31:27 -04:00 committed by Gunnar Morling
parent e041b599d8
commit 5ac93ac20e
2 changed files with 8 additions and 0 deletions

View File

@ -212,6 +212,9 @@ public static SnapshotIsolationMode parse(String value, String defaultValue) {
}
}
public static final Field USER = RelationalDatabaseConnectorConfig.USER
.optional();
public static final Field PORT = RelationalDatabaseConnectorConfig.PORT
.withDefault(DEFAULT_PORT);

View File

@ -755,6 +755,11 @@ public Field required() {
.withValidation(Field::isRequired);
}
public Field optional() {
return new Field(name(), displayName(), type(), width(), description(), importance, dependents,
defaultValueGenerator, validator, recommender, false, group, allowedValues);
}
public Field withGroup(GroupEntry group) {
return new Field(name(), displayName(), type(), width(), description(), importance, dependents,
defaultValueGenerator, validator, recommender, isRequired, group, allowedValues);