{"record":{"id":"f306a943cc0ac4d4","repo":"apache/flink","slug":"invalid-path-style-access-s-for-bucket-s-mu","errorCode":null,"errorMessage":"Invalid path-style-access '%s' for bucket '%s'. Must be 'true' or 'false'","messagePattern":"Invalid path-style-access '(.+?)' for bucket '(.+?)'\\. Must be 'true' or 'false'","errorType":"validation","errorClass":"IllegalConfigurationException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/BucketConfigProvider.java","lineNumber":84,"sourceCode":"                    try {\n                        b.assumeRoleSessionDurationSeconds(Integer.parseInt(v));\n                    } catch (NumberFormatException e) {\n                        throw new IllegalConfigurationException(\n                                String.format(\n                                        \"Invalid assume-role.session-duration '%s' for bucket '%s'. \"\n                                                + \"Must be a valid integer (e.g., 3600)\",\n                                        v, b.getBucketName()),\n                                e);\n                    }\n                });\n        applicators.put(\"assume-role.session-name\", S3BucketConfig.Builder::assumeRoleSessionName);\n        applicators.put(\"aws.credentials.provider\", S3BucketConfig.Builder::credentialsProvider);\n        applicators.put(\"endpoint\", S3BucketConfig.Builder::endpoint);\n        applicators.put(\n                \"path-style-access\",\n                (b, v) -> {\n                    if (!\"true\".equalsIgnoreCase(v) && !\"false\".equalsIgnoreCase(v)) {\n                        throw new IllegalConfigurationException(\n                                String.format(\n                                        \"Invalid path-style-access '%s' for bucket '%s'. \"\n                                                + \"Must be 'true' or 'false'\",\n                                        v, b.getBucketName()));\n                    }\n                    b.pathStyleAccess(Boolean.parseBoolean(v));\n                });\n        applicators.put(\"region\", S3BucketConfig.Builder::region);\n        applicators.put(\"secret-key\", S3BucketConfig.Builder::secretKey);\n        applicators.put(\"sse.kms.key-id\", S3BucketConfig.Builder::sseKmsKeyId);\n        applicators.put(\"sse.type\", S3BucketConfig.Builder::sseType);\n        PROPERTY_APPLICATORS = Collections.unmodifiableMap(applicators);\n\n        KNOWN_PROPERTIES_BY_LENGTH =\n                applicators.keySet().stream()\n                        .sorted(Comparator.comparingInt(String::length).reversed())\n                        .collect(Collectors.toList());\n    }","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/BucketConfigProvider.java#L66-L102","documentation":"BucketConfigProvider throws IllegalConfigurationException when the per-bucket property 'path-style-access' is not exactly 'true' or 'false' (case-insensitive). The value is used with Boolean.parseBoolean, which silently defaults to false on bad input, so the provider pre-validates and rejects ambiguous values.","triggerScenarios":"Setting s3.bucket.<bucket>.path-style-access to values like 'yes', '1', 'on', or 'TRUE ' (with whitespace) in bucket-specific S3 configuration.","commonSituations":"Porting configs from MinIO examples or other tools that accept 1/0 or yes/no; YAML boolean handling that serializes as On/Off; stray whitespace from templated configs.","solutions":["Use exactly true or false (any case) for path-style-access, e.g. path-style-access: true.","Remove quotes and whitespace; do not use 1/0/yes/no.","If using MinIO or a non-AWS endpoint that needs path-style, double-check the endpoint property too."],"exampleFix":"# before\ns3.bucket.my-bucket.path-style-access: yes\n\n# after\ns3.bucket.my-bucket.path-style-access: true","handlingStrategy":"validation","validationCode":"static boolean parsePathStyle(String raw, String bucket) {\n    if (\"true\".equalsIgnoreCase(raw) || \"false\".equalsIgnoreCase(raw)) {\n        return Boolean.parseBoolean(raw);\n    }\n    throw new IllegalArgumentException(\"path-style-access for '\" + bucket + \"' must be 'true' or 'false', got: \" + raw);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only true/false literals in path-style-access values.","Normalize YAML/JSON config booleans to strings 'true'/'false' before feeding bucket config.","Add pre-flight config validation so bad values fail at submit time, not at first S3 access."],"tags":["s3","configuration","path-style-access","validation"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}