Skip to content

Make Kerberos realm configurable in HBaseStorageBackend#188

Merged
em3s merged 7 commits intomainfrom
feat/issue-180-kerberos-realm-configurable
Feb 6, 2026
Merged

Make Kerberos realm configurable in HBaseStorageBackend#188
em3s merged 7 commits intomainfrom
feat/issue-180-kerberos-realm-configurable

Conversation

@em3s
Copy link
Copy Markdown
Contributor

@em3s em3s commented Feb 6, 2026

Summary

Replace the hardcoded @KAKAO.HADOOP Kerberos realm in DefaultHBaseCluster with a configurable kerberos.realm property. This makes the project portable for environments with different Kerberos realms.

Closes #180

Plan

Created by claude code (opus 4.6)

  • Step 1: Replace hardcoded @KAKAO.HADOOP with kerberos.realm property lookup in DefaultHBaseCluster.initialize()
  • Step 2: Add unit test for Kerberos realm configuration
  • Step 3: Update property documentation comment in DefaultHBaseCluster
  • Step 4: Add backward-compatible default realm (KAKAO.HADOOP) when kerberos.realm is missing, and mark fallback as deprecated/TODO — opencode (gpt-5.3-codex)

Progress

  • Step 1 — claude code (opus 4.6) (commit 4b9d78c)
  • Step 2 — claude code (opus 4.6) (commit 4b9d78c)
  • Step 3 — claude code (opus 4.6) (commit 4b9d78c)
  • Review Round 1 fixes — claude code (opus 4.6) (commit bddda26): env var fallback, blank validation, JUnit assertions
  • Step 4 — opencode (gpt-5.3-codex) (commit 23d6f34): legacy default fallback to KAKAO.HADOOP when realm is missing
  • Review Round 2 fixes — opencode (gpt-5.3-codex) (commit 23d6f34): deprecation warning/TODO, realm trimming, precedence and compatibility tests

Closes #180

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. module:engine labels Feb 6, 2026
… property

Replace hardcoded @KAKAO.HADOOP Kerberos realm with a configurable
kerberos.realm property in DefaultHBaseCluster. This makes the project
portable for environments with different Kerberos realms.

Closes #180

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 6, 2026
- Add AB_KERBEROS_REALM env var fallback for consistency with other
  Kerberos properties
- Add blank validation on kerberos.realm value
- Use JUnit assertEquals/assertThrows instead of Kotlin assert()
- Add blank realm test case
- Fix misleading "(optional)" in KDoc for secure cluster properties

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@em3s
Copy link
Copy Markdown
Contributor Author

em3s commented Feb 6, 2026

Review Round 1

by claude code (opus 4.6)

Issues Found & Fixed

Severity Issue Status
HIGH Missing env var fallback for kerberos.realm — inconsistent with other Kerberos properties Fixed: added AB_KERBEROS_REALM env var fallback
HIGH No input validation on kerberos.realm — blank value would produce invalid principals Fixed: added require(kerberosRealm.isNotBlank())
HIGH Test uses assert() instead of JUnit assertions Fixed: replaced with assertEquals/assertThrows
MEDIUM Missing test for blank realm validation Fixed: added blank kerberos realm should throw test
MEDIUM Doc comment says krb5ConfPath is "(optional)" but code requires it Fixed: clarified all properties show env var fallback
MEDIUM Happy-path test not possible without real Kerberos env Skipped: UserGroupInformation.setConfiguration requires real Kerberos; interpolation logic is trivially correct
SUGGESTION Extract Kerberos config into dedicated method Skipped: out of scope for this PR
SUGGESTION Document mixed property naming convention Skipped: pre-existing, out of scope

Result

All tests passing. No CRITICAL/HIGH issues remain.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 6, 2026
@em3s
Copy link
Copy Markdown
Contributor Author

em3s commented Feb 6, 2026

Review Round 2 (Correction)

Implemented backward-compatibility for secure Kerberos setup:

  • Added legacy fallback to KAKAO.HADOOP when both kerberos.realm and AB_KERBEROS_REALM are missing
  • Added deprecation warning and TODO for eventual fallback removal
  • Kept blank-realm validation and added realm trimming
  • Added tests for compatibility fallback, env fallback, property-over-env precedence, and trimming

Validation:

  • ./gradlew :engine:test --tests com.kakao.actionbase.v2.engine.compat.DefaultHBaseClusterTest (passed)

Signed: opencode (gpt-5.3-codex)

@em3s
Copy link
Copy Markdown
Contributor Author

em3s commented Feb 6, 2026

Reviewed:

  • removed hard coded realm
  • for backward compatibility, if empty, the legacy hard coded value is used.

@em3s em3s merged commit 4e9a4ed into main Feb 6, 2026
9 checks passed
@em3s em3s self-assigned this Feb 6, 2026
@em3s em3s changed the title refactor(engine): make Kerberos realm configurable in HBaseStorageBackend Make Kerberos realm configurable in HBaseStorageBackend Feb 12, 2026
@em3s em3s deleted the feat/issue-180-kerberos-realm-configurable branch March 1, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Kerberos realm configurable in HBaseStorageBackend

1 participant