[
https://issues.apache.org/jira/browse/HADOOP-19667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18016534#comment-18016534
]
ASF GitHub Bot commented on HADOOP-19667:
-----------------------------------------
zzz0706 opened a new pull request, #7907:
URL: https://github.com/apache/hadoop/pull/7907
### Description of PR
Docs-only change to **TransparentEncryption.md** clarifying the hidden
constraints for
`hadoop.security.crypto.buffer.size`:
- **Minimum value is 512 bytes** (values <512 throw
`IllegalArgumentException` at stream construction).
- **Block alignment:** the effective value is **floored** to the nearest
multiple of the cipher algorithm
**block size** (e.g., 16 for AES/CTR/NoPadding). Examples: `4100 -> 4096`,
`8195 -> 8192`.
This is a minimal wording update (single-sentence addition) to avoid
operator surprise, with no behavior change.
**Target branch:** `trunk` (per contributor guide)
**JIRA:** HADOOP-19667
**Files changed:**
-
`hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/TransparentEncryption.md`
### How was this patch tested?
- Docs-only; built site/module locally to validate formatting:
> Clarify legal value constraints for hadoop.security.crypto.buffer.size
> (min=512; floor to cipher block size)
> ------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-19667
> URL: https://issues.apache.org/jira/browse/HADOOP-19667
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 2.8.5
> Reporter: AMC-team
> Priority: Major
>
> In core-default.xml, the property hadoop.security.crypto.buffer.size is
> currently documented as “The buffer size used by CryptoInputStream and
> CryptoOutputStream.” It does not specify the legal value constraints.
> {code:java}
> <property>
> <name>hadoop.security.crypto.buffer.size</name>
> <value>8192</value>
> <description>The buffer size used by CryptoInputStream and
> CryptoOutputStream. </description>
> </property> {code}
> The runtime enforces two hidden constraints that are not documented:
> 1. Minimum value is 512 bytes. Values below 512 cause
> IllegalArgumentException at stream construction time.
> 2. Block-size flooring: The effective buffer size is floored to a multiple of
> the cipher algorithm’s block size (e.g., 16 bytes for AES/CTR/NoPadding).
> As a result, users may be surprised that:
> 1. Setting a value like 4100 results in an actual capacity of 4096.
> 2. Setting values <512 fails fast with IllegalArgumentException.
> *Expected*
> core-default.xml (and user-facing docs) should explicitly document:
> 1. Minimum legal value: 512 bytes.
> 2. The effective value is floored to the nearest multiple of the cipher
> algorithm block size (e.g., 16 for AES).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]