Skip to content

Commit

Permalink
fix "policies.imports-limit" configuration which had wrong config key…
Browse files Browse the repository at this point in the history
… in code and was not applied

* remove obsolete (no longer used) config keys as well

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle committed Jun 29, 2023
1 parent bc8e6a2 commit e3015a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
Expand Up @@ -69,6 +69,11 @@ public long getPoliciesMaxSize() {
return policiesMaxSize;
}

@Override
public int getPolicyImportsLimit() {
return policyImportsLimit;
}

@Override
public long getMessagesMaxSize() {
return messagesMaxSize;
Expand All @@ -92,11 +97,6 @@ public String getConfigPath() {
return CONFIG_PATH;
}

@Override
public int getPolicyImportsLimit() {
return policyImportsLimit;
}

@Override
public boolean equals(@Nullable final Object o) {
if (this == o) {
Expand Down
Expand Up @@ -80,6 +80,11 @@ enum LimitsConfigValue implements KnownConfigValue {
*/
POLICIES_MAX_SIZE("policies.max-size", Constants.DEFAULT_ENTITY_MAX_SIZE),

/**
* The number of imports that a policy may contain.
*/
POLICY_IMPORTS_LIMIT("policies.imports-limit", 10),

/**
* The maximum possible size of "Messages" entities in bytes.
*/
Expand All @@ -93,12 +98,7 @@ enum LimitsConfigValue implements KnownConfigValue {
/**
* The maximum pagination size to apply when searching for "Things" via "things-search".
*/
THINGS_SEARCH_MAX_PAGE_SIZE(Constants.THINGS_SEARCH_PATH + "." + "max-page-size", 200),

/**
* The number of imports that a policy may contain.
*/
POLICY_IMPORTS_LIMIT("imports-limit", 10);
THINGS_SEARCH_MAX_PAGE_SIZE(Constants.THINGS_SEARCH_PATH + "." + "max-page-size", 200);

private final String path;
private final Object defaultValue;
Expand Down
6 changes: 0 additions & 6 deletions internal/utils/config/src/main/resources/ditto-limits.conf
Expand Up @@ -19,12 +19,6 @@ ditto.limits {
messages {
max-size = 250k
max-size = ${?LIMITS_MESSAGES_MAX_SIZE}

headers-size = 5k
headers-size = ${?LIMITS_MESSAGES_HEADERS_SIZE}

auth-subjects-count = 100
auth-subjects-count = ${?LIMITS_MESSAGES_AUTH_SUBJECTS_COUNT}
}

# limiations for the "things-search" service
Expand Down

0 comments on commit e3015a0

Please sign in to comment.