diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 11:11:13 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-29 11:11:13 -0800 |
commit | 47468774b6b87c67d8ba98e52bfece04d6d48d1a (patch) | |
tree | 3ed320c9858244b56cab25cdfd35c5aea06e3e0c /src/main/java/org/traccar/config | |
parent | d6862a9259a0f922120740896f30df631e03eb3e (diff) | |
download | trackermap-server-47468774b6b87c67d8ba98e52bfece04d6d48d1a.tar.gz trackermap-server-47468774b6b87c67d8ba98e52bfece04d6d48d1a.tar.bz2 trackermap-server-47468774b6b87c67d8ba98e52bfece04d6d48d1a.zip |
Migrate LDAP configuration
Diffstat (limited to 'src/main/java/org/traccar/config')
-rw-r--r-- | src/main/java/org/traccar/config/Config.java | 2 | ||||
-rw-r--r-- | src/main/java/org/traccar/config/Keys.java | 88 |
2 files changed, 89 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/config/Config.java b/src/main/java/org/traccar/config/Config.java index dd61e1f00..54e6efd06 100644 --- a/src/main/java/org/traccar/config/Config.java +++ b/src/main/java/org/traccar/config/Config.java @@ -66,7 +66,7 @@ public class Config { } public String getString(ConfigKey<String> key) { - return getString(key.getKey()); + return getString(key.getKey(), key.getDefaultValue()); } @Deprecated diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java index 215b00805..4531c7541 100644 --- a/src/main/java/org/traccar/config/Keys.java +++ b/src/main/java/org/traccar/config/Keys.java @@ -199,6 +199,94 @@ public final class Keys { 300L); /** + * Device limit for self registered users. Default value is -1, which indicates no limit. + */ + public static final ConfigKey<Integer> USERS_DEFAULT_DEVICE_LIMIT = new ConfigKey<>( + "users.defaultDeviceLimit", + Collections.singletonList(KeyType.GLOBAL), + -1); + + /** + * Default user expiration for self registered users. Value is in days. By default no expiration is set. + */ + public static final ConfigKey<Integer> USERS_DEFAULT_EXPIRATION_DAYS = new ConfigKey<>( + "users.defaultExpirationDays", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP server URL. + */ + public static final ConfigKey<String> LDAP_URL = new ConfigKey<>( + "ldap.url", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP server login. + */ + public static final ConfigKey<String> LDAP_USER = new ConfigKey<>( + "ldap.user", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP server password. + */ + public static final ConfigKey<String> LDAP_PASSWORD = new ConfigKey<>( + "ldap.password", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP user search base. + */ + public static final ConfigKey<String> LDAP_BASE = new ConfigKey<>( + "ldap.base", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP attribute used as user id. Default value is 'uid'. + */ + public static final ConfigKey<String> LDAP_ID_ATTRIBUTE = new ConfigKey<>( + "ldap.idAttribute", + Collections.singletonList(KeyType.GLOBAL), + "uid"); + + /** + * LDAP attribute used as user name. Default value is 'cn'. + */ + public static final ConfigKey<String> LDAP_NAME_ATTRIBUTE = new ConfigKey<>( + "ldap.nameAttribute", + Collections.singletonList(KeyType.GLOBAL), + "cn"); + + /** + * LDAP attribute used as user email. Default value is 'mail'. + */ + public static final ConfigKey<String> LDAP_MAIN_ATTRIBUTE = new ConfigKey<>( + "ldap.mailAttribute", + Collections.singletonList(KeyType.GLOBAL), + "mail"); + + /** + * LDAP custom search filter. If not specified, '({idAttribute}=:login)' will be used as a filter. + */ + public static final ConfigKey<String> LDAP_SEARCH_FILTER = new ConfigKey<>( + "ldap.searchFilter", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP custom admin search filter. + */ + public static final ConfigKey<String> LDAP_ADMIN_FILTER = new ConfigKey<>( + "ldap.adminFilter", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * LDAP admin user group. Used if custom admin filter is not specified. + */ + public static final ConfigKey<String> LDAP_ADMIN_GROUP = new ConfigKey<>( + "ldap.adminGroup", + Collections.singletonList(KeyType.GLOBAL)); + + /** * If no data is reported by a device for the given amount of time, status changes from online to unknown. Value is * in seconds. Default timeout is 10 minutes. */ |