Feature Max Artifact Storage quota (#739)

* Enforcement of artifact storage quota
* Added REST integration tests for artifact upload
* Fix test config
* Fix failing test cases
* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
This commit is contained in:
Stefan Behl
2018-10-05 13:52:46 +02:00
committed by GitHub
parent 124ef54a78
commit 086408e8f8
10 changed files with 249 additions and 118 deletions

View File

@@ -162,9 +162,14 @@ public class HawkbitSecurityProperties {
private int maxTargetsPerAutoAssignment = 5000;
/**
* Maximum size of artifacts in bytes.
* Maximum size of artifacts in bytes. Defaults to 1 GB.
*/
private long maxArtifactSize = 1_000_000_000;
private long maxArtifactSize = 1_073_741_824;
/**
* Maximum size of all artifacts in bytes. Defaults to 20 GB.
*/
private long maxArtifactStorage = 21_474_836_480L;
private final Filter filter = new Filter();
private final Filter uiFilter = new Filter();
@@ -290,6 +295,14 @@ public class HawkbitSecurityProperties {
return maxArtifactSize;
}
public long getMaxArtifactStorage() {
return maxArtifactStorage;
}
public void setMaxArtifactStorage(final long maxArtifactStorage) {
this.maxArtifactStorage = maxArtifactStorage;
}
/**
* Configuration for hawkBits DOS prevention filter. This is usually an
* infrastructure topic (e.g. Web Application Firewall (WAF)) but might