Skip to content

Commit 78cc1fa

Browse files
committed
rename one property
1 parent 785f506 commit 78cc1fa

File tree

19 files changed

+30
-34
lines changed

19 files changed

+30
-34
lines changed

plugins/spark/v3.5/regtests/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
POLARIS_BOOTSTRAP_CREDENTIALS: POLARIS,root,secret
2929
quarkus.log.file.enable: "false"
3030
quarkus.otel.sdk.disabled: "true"
31-
polaris.features.defaults."ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS": "true"
31+
polaris.features.defaults."ALLOW_INSECURE_STORAGE_TYPES": "true"
3232
polaris.features.defaults."SUPPORTED_CATALOG_STORAGE_TYPES": "[\"FILE\",\"S3\",\"GCS\",\"AZURE\"]"
3333
polaris.readiness.ignore-security-issues: "true"
3434
healthcheck:

polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,15 @@ public static void enforceFeatureEnabledOrThrow(
243243
.defaultValue(false)
244244
.buildFeatureConfiguration();
245245

246-
public static final FeatureConfiguration<Boolean>
247-
ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS =
248-
PolarisConfiguration.<Boolean>builder()
249-
.key("ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS")
250-
.description(
251-
"Allow usage of FileIO implementations that are considered insecure. "
252-
+ "Enabling this setting exposes the service to SEVERE security risks, including "
253-
+ "denial of service, corruption, data loss and more!"
254-
+ "This must NEVER be set to 'true' for anything except tests! ")
255-
.defaultValue(false)
256-
.buildFeatureConfiguration();
246+
public static final FeatureConfiguration<Boolean> ALLOW_INSECURE_STORAGE_TYPES =
247+
PolarisConfiguration.<Boolean>builder()
248+
.key("ALLOW_INSECURE_STORAGE_TYPES")
249+
.description(
250+
"Allow usage of FileIO implementations that are considered insecure. "
251+
+ "Enabling this setting may expose the service to possibly severe security risks!"
252+
+ "This should only be set to 'true' for tests!")
253+
.defaultValue(false)
254+
.buildFeatureConfiguration();
257255

258256
public static final FeatureConfiguration<Boolean> INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST =
259257
PolarisConfiguration.<Boolean>builder()

quarkus/defaults/src/main/resources/application-it.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ polaris.features.defaults."ALLOW_EXTERNAL_CATALOG_CREDENTIAL_VENDING"=false
3535
polaris.features.defaults."ALLOW_EXTERNAL_METADATA_FILE_LOCATION"=false
3636
polaris.features.defaults."ALLOW_OVERLAPPING_CATALOG_URLS"=true
3737
polaris.features.defaults."ALLOW_SPECIFYING_FILE_IO_IMPL"=true
38-
polaris.features.defaults."ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS"=true
38+
polaris.features.defaults."ALLOW_INSECURE_STORAGE_TYPES"=true
3939
polaris.features.defaults."ALLOW_WILDCARD_LOCATION"=true
4040
polaris.features.defaults."ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING"=true
4141
polaris.features.defaults."INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_it"=true

quarkus/service/src/main/java/org/apache/polaris/service/quarkus/config/ProductionReadinessChecks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private static String authRealmSegment(String realm) {
214214
@Produces
215215
public ProductionReadinessCheck checkInsecureStorageSettings(
216216
FeaturesConfiguration featureConfiguration) {
217-
var insecure = FeatureConfiguration.ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS;
217+
var insecure = FeatureConfiguration.ALLOW_INSECURE_STORAGE_TYPES;
218218

219219
var errors = new ArrayList<Error>();
220220
if (Boolean.parseBoolean(featureConfiguration.defaults().get(insecure.key))) {

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/admin/PolarisAuthzTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public Map<String, String> getConfigOverrides() {
114114
return Map.of(
115115
"polaris.features.defaults.\"ALLOW_SPECIFYING_FILE_IO_IMPL\"",
116116
"true",
117-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
117+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
118118
"true",
119119
"polaris.features.defaults.\"ALLOW_EXTERNAL_METADATA_FILE_LOCATION\"",
120120
"true",
@@ -230,7 +230,7 @@ public void before(TestInfo testInfo) {
230230
Map.of(
231231
"ALLOW_SPECIFYING_FILE_IO_IMPL",
232232
true,
233-
"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS",
233+
"ALLOW_INSECURE_STORAGE_TYPES",
234234
true,
235235
"ALLOW_EXTERNAL_METADATA_FILE_LOCATION",
236236
true,

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/admin/PolarisOverlappingTableTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static Stream<Arguments> testTableLocationRestrictions() {
7979
"true",
8080
"ALLOW_TABLE_LOCATION_OVERLAP",
8181
"true",
82-
"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS",
82+
"ALLOW_INSECURE_STORAGE_TYPES",
8383
"true",
8484
"SUPPORTED_CATALOG_STORAGE_TYPES",
8585
List.of("FILE", "S3"));
@@ -89,7 +89,7 @@ static Stream<Arguments> testTableLocationRestrictions() {
8989
"false",
9090
"ALLOW_TABLE_LOCATION_OVERLAP",
9191
"false",
92-
"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS",
92+
"ALLOW_INSECURE_STORAGE_TYPES",
9393
"true",
9494
"SUPPORTED_CATALOG_STORAGE_TYPES",
9595
List.of("FILE", "S3"));

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/GenericTableCatalogTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public Map<String, String> getConfigOverrides() {
107107
return Map.of(
108108
"polaris.features.defaults.\"ALLOW_SPECIFYING_FILE_IO_IMPL\"",
109109
"true",
110-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
110+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
111111
"true",
112112
"polaris.features.defaults.\"INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST\"",
113113
"true",

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/GetConfigTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void testGetConfig(boolean enableGenericTable) {
4242
TestServices.builder()
4343
.config(
4444
Map.of(
45-
"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS",
45+
"ALLOW_INSECURE_STORAGE_TYPES",
4646
true,
4747
"SUPPORTED_CATALOG_STORAGE_TYPES",
4848
List.of("FILE", "S3"),

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/IcebergCatalogTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public Map<String, String> getConfigOverrides() {
167167
return Map.of(
168168
"polaris.features.defaults.\"ALLOW_SPECIFYING_FILE_IO_IMPL\"",
169169
"true",
170-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
170+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
171171
"true",
172172
"polaris.features.defaults.\"INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST\"",
173173
"true",

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/IcebergCatalogViewTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public Map<String, String> getConfigOverrides() {
105105
"true",
106106
"polaris.features.defaults.\"ALLOW_SPECIFYING_FILE_IO_IMPL\"",
107107
"true",
108-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
108+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
109109
"true",
110110
"polaris.features.defaults.\"INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST\"",
111111
"true",

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/PolicyCatalogTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public Map<String, String> getConfigOverrides() {
126126
"true",
127127
"polaris.features.defaults.\"SUPPORTED_CATALOG_STORAGE_TYPES\"",
128128
"[\"FILE\"]",
129-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
129+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
130130
"true",
131131
"polaris.readiness.ignore-security-issues",
132132
"true");

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/io/FileIOExceptionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void beforeAll() {
6565
TestServices.builder()
6666
.config(
6767
Map.of(
68-
"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS",
68+
"ALLOW_INSECURE_STORAGE_TYPES",
6969
true,
7070
"SUPPORTED_CATALOG_STORAGE_TYPES",
7171
List.of("FILE", "S3")))

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/it/QuarkusApplicationIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Map<String, String> getConfigOverrides() {
6060
"true",
6161
"polaris.features.defaults.\"ALLOW_SPECIFYING_FILE_IO_IMPL\"",
6262
"true",
63-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
63+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
6464
"true",
6565
"polaris.features.defaults.\"SUPPORTED_CATALOG_STORAGE_TYPES\"",
6666
"[\"FILE\",\"S3\"]",

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/it/QuarkusPolicyServiceIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Map<String, String> getConfigOverrides() {
3434
return Map.of(
3535
"polaris.features.defaults.\"ALLOW_SPECIFYING_FILE_IO_IMPL\"",
3636
"true",
37-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
37+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
3838
"true",
3939
"polaris.features.defaults.\"SUPPORTED_CATALOG_STORAGE_TYPES\"",
4040
"[\"FILE\",\"S3\"]",

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
3737
"true",
3838
"polaris.features.defaults.\"ALLOW_EXTERNAL_CATALOG_CREDENTIAL_VENDING\"",
3939
"false",
40-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
40+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
4141
"true",
4242
"polaris.features.defaults.\"SUPPORTED_CATALOG_STORAGE_TYPES\"",
4343
"[\"FILE\",\"S3\"]",

quarkus/service/src/test/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogViewFileIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static class Profile implements QuarkusTestProfile {
3939
@Override
4040
public Map<String, String> getConfigOverrides() {
4141
return Map.of(
42-
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS\"",
42+
"polaris.features.defaults.\"ALLOW_INSECURE_STORAGE_TYPES\"",
4343
"true",
4444
"polaris.features.defaults.\"SUPPORTED_CATALOG_STORAGE_TYPES\"",
4545
"[\"FILE\"]",

regtests/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
POLARIS_BOOTSTRAP_CREDENTIALS: POLARIS,root,secret
3535
quarkus.log.file.enable: "false"
3636
quarkus.otel.sdk.disabled: "true"
37-
polaris.features.defaults."ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS": "true"
37+
polaris.features.defaults."ALLOW_INSECURE_STORAGE_TYPES": "true"
3838
polaris.features.defaults."SUPPORTED_CATALOG_STORAGE_TYPES": "[\"FILE\",\"S3\",\"GCS\",\"AZURE\"]"
3939
polaris.readiness.ignore-security-issues: "true"
4040
volumes:

service/common/src/main/java/org/apache/polaris/service/catalog/validation/IcebergPropertiesValidation.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
package org.apache.polaris.service.catalog.validation;
2020

21-
import static org.apache.polaris.core.config.FeatureConfiguration.ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS;
21+
import static org.apache.polaris.core.config.FeatureConfiguration.ALLOW_INSECURE_STORAGE_TYPES;
2222
import static org.apache.polaris.core.config.FeatureConfiguration.ALLOW_SPECIFYING_FILE_IO_IMPL;
2323
import static org.apache.polaris.core.config.FeatureConfiguration.SUPPORTED_CATALOG_STORAGE_TYPES;
2424

@@ -77,9 +77,7 @@ public static String validateIcebergProperties(
7777
ioImpl, storageType);
7878
}
7979

80-
if (!storageType.safe()
81-
&& !configStore.getConfiguration(
82-
ctx, ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS)) {
80+
if (!storageType.safe() && !configStore.getConfiguration(ctx, ALLOW_INSECURE_STORAGE_TYPES)) {
8381
throw new ValidationException(
8482
"File IO implementation '%s' (storage type '%s') is considered insecure and must not be used",
8583
ioImpl, storageType);

service/common/src/test/java/org/apache/polaris/service/catalog/io/FileIOFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ FileIO loadFileIOInternal(
124124
Map.of(
125125
"ALLOW_SPECIFYING_FILE_IO_IMPL",
126126
true,
127-
"ALLOW_INSECURE_STORAGE_TYPES_ACCEPTING_SECURITY_RISKS",
127+
"ALLOW_INSECURE_STORAGE_TYPES",
128128
true,
129129
"SUPPORTED_CATALOG_STORAGE_TYPES",
130130
List.of("FILE", "S3")))

0 commit comments

Comments
 (0)