Skip to content

HIVE-29706: Add AGENTS.md, SECURITY.md, and THREAT_MODEL.md#6535

Merged
okumin merged 7 commits into
apache:masterfrom
potiuk:asf-security/threat-model-2026-06-11
Jul 9, 2026
Merged

HIVE-29706: Add AGENTS.md, SECURITY.md, and THREAT_MODEL.md#6535
okumin merged 7 commits into
apache:masterfrom
potiuk:asf-security/threat-model-2026-06-11

Conversation

@potiuk

@potiuk potiuk commented Jun 11, 2026

Copy link
Copy Markdown
Member

This adds a v0 security threat model + discoverability wiring to apache/hive, produced by the ASF Security team for the Hive PMC to review and own — the pre-flight step for the Glasswing security scan the PMC opted into.

What's here

  • THREAT_MODEL.md — a v0 model (Michael Scovetta rubric, run with Claude Opus) covering the HiveServer2 SQL front door, the Metastore, and the UDF / SerDe / execution layer: trust boundaries, in/out-of-scope adversaries, what Hive upholds vs. what it leaves to the operator (TLS, authorization-model choice, network isolation, UDF vetting), known non-findings, and triage dispositions. Every non-trivial claim is provenance-tagged (documented) / (maintainer) / (inferred); the (inferred) ones are our hypotheses.
  • SECURITY.md — private reporting via security@hive.apache.org + a pointer to the model.
  • AGENTS.md — wires AGENTS.md → SECURITY.md → THREAT_MODEL.md so the scan agent (and researchers) can mechanically find the model.

How to engage — this is a draft to react to, not a finished artifact. THREAT_MODEL.md §14 collects open questions in waves; answer inline a few at a time, correct anything wrong, and the model becomes the PMC's. Once you're happy, we queue the scan in OSS-criticality order. No deadline pressure with the Mythos 5 window being extended.

Generated-by: Claude Opus 4.8 (1M context)

… discoverability

v0 threat model produced by the ASF Security team via threat-model-producer
(Michael Scovetta rubric, run with Claude Opus) for the PMC to review, correct,
and own. Wires the AGENTS.md -> SECURITY.md -> THREAT_MODEL.md discoverability
chain the scan agent follows. Every non-trivial claim is provenance-tagged;
open questions for the PMC are collected in THREAT_MODEL.md section 14.

Generated-by: Claude Opus 4.8 (1M context)
@okumin

okumin commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Thank you! I will check the draft

@potiuk

potiuk commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

Thanks @okumin — no rush. The most useful read is the §14 "Open questions" section at the end; those are where I inferred a position and would value your confirmation or correction.

@okumin okumin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I answered some obvious points. I'm still checking the remaining

Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Incorporates okumin's PR apache#6535 review:
- direct Hive Metastore access in scope (HMS enforces caller authz at the
  application level; Spark et al. connect directly) -> §3.3/§4/§11a
- UDF/SerDe/TRANSFORM code-execution detail: built-in UDF blacklist
  (reflect/reflect2/java_method/in_file), custom UDF/SerDe admin trust,
  TRANSFORM disable via DisallowTransformHook -> §7/§8/§11a
- §14 Q1/Q2 promoted to maintainer; Q7/Q9/Q12 annotated PMC-reviewing

Generated-by: Claude Opus 4.8
@potiuk

potiuk commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Thanks okumin — this is exactly the kind of detail that makes the model useful. Folded your review in and pushed (THREAT_MODEL.md, +75/-23):

  • Direct Metastore access (your L186): added as in-scope adversary §3.3 — HMS enforces caller authorization at the application level (since Spark and similar talk to it directly), and §4 now frames network isolation as defense-in-depth rather than the primary control. Correspondingly flipped the §11a "Metastore Thrift port has no authorization" entry from out-of-scope to VALID/in-model.

  • UDF / SerDe / TRANSFORM (your L190): folded the whole breakdown into §7, with the config levers in §8 — built-in code-exec UDFs (reflect, reflect2, java_method, in_file) blocked via hive.server2.builtin.udf.blacklist; custom UDF/SerDe/InputFormat/OutputFormat as admin-trusted jar installs; TRANSFORM disabled via DisallowTransformHook in hive.exec.pre.hooks. Added a §11a non-finding for the built-in-UDF case. (Your gist was very helpful — thanks for the link.)

I've left these as "PMC reviewing" in §14 pending your follow-up, so nothing's prematurely locked:

  • doAs (L203): I noted hive.server2.enable.doAs=false as the expected posture but flagged it for the second-pair-of-eyes check you asked for.
  • Ranger-only authz (L209): left §6/§9 open while you weigh whether to treat Ranger as the only supported authorization system.
  • TLS params (L215): §8 TLS lever left unnamed until you confirm the exact Hive-side parameter names.

On your off-topic question — separate THREAT_MODEL.md for the Metastore: my lean is to keep a single THREAT_MODEL.md but with clearly separated HS2 vs HMS scope/boundary/property subsections, since it's one repo and one discoverability chain (AGENTS.md -> SECURITY.md -> THREAT_MODEL.md) and the triage dispositions are shared. If you'd rather split them, that works too — we'd just point SECURITY.md at both files. Your call; happy to restructure either way.

…to separate threat models (different security models/params)
@potiuk

potiuk commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

Thanks @okumin — really useful detail. Your answers are folded into THREAT_MODEL.md:

  • Direct Metastore access (Q1) — now in-scope: §3.3 + §4 state HMS enforces caller authorization at the application level (since Spark et al. talk to it directly), and §11a flips "Metastore Thrift port has no authz" to VALID rather than out-of-scope.
  • UDF / SerDe / TRANSFORM (Q2) — captured your full breakdown in §7/§8/§11a: the insecure built-ins (reflect, reflect2, java_method, in_file) blocked via hive.server2.builtin.udf.blacklist (Ranger configures it); custom UDFs/SerDes/InputFormats as admin-trusted code; TRANSFORM prohibited via DisallowTransformHook in hive.exec.pre.hooks.
  • doAs (Q7) — recorded your expectation that hive.server2.enable.doAs=false is the intended posture (HS2 enforces policy itself), flagged as pending a second PMC member's double-check before we finalize §4/§8.
  • Metastore protection / Ranger-only (Q9) — app-level (not network-level) folded in; "accept only Ranger as the authz system?" left open since you're still considering it.
  • TLS params (Q12) — left the §8 TLS lever unnamed pending the exact Hive-side parameter names you're checking.

On your off-topic question — splitting HS2 and HMS into separate threat models: I think that's a good idea given they have genuinely different security models and parameters, and it also reads cleaner for the scan agent. I've noted it as §14 Q15; happy to split this into THREAT_MODEL.md (HS2) + a dedicated HMS model on your nod.

No rush on the rest of your review — ping me when you've worked through the remaining points and I'll fold them in one pass.

Comment thread THREAT_MODEL.md Outdated
isolation, UDF vetting). Anything mis-assigned?
10. Confirm the by-design non-guarantees in §7.
11. Is super-linear resource use / a hang on a pathological query a bug, or is
bounding it the operator's job (YARN queues / HS2 limits)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this is an operator responsibility rather than a Hive bug. Hive accepts arbitrary HiveQL, so operators are expected to use HiveServer2 limits (e.g., hive.query.max.length) and YARN resource pools to bound the impact of pathological queries.
If a stronger isolation than HS2 and YARN can provide is required, operators should use separate HS2 instances or separate Hadoop/YARN clusters.

Comment thread THREAT_MODEL.md Outdated
code-execution-by-design (not a sandbox), per §7?~~
3. Confirm the assumed deployment: clustered, behind an operator-controlled
perimeter, with Hadoop + a metastore RDBMS + (Ranger or SQL-std auth) + KDC
as trusted dependencies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We assume a clustered Hive deployment behind an operator-controlled perimeter. Hadoop, the metastore RDBMS, the configured authorization provider, and the Kerberos KDC are trusted dependencies.
The authorization provider is typically Ranger in production deployments, though SQL-standard authorization may also be used.

Comment thread THREAT_MODEL.md Outdated
4. Is the in-scope adversary "a SQL client at the HS2 boundary" (+ a network
MITM where TLS is off)? Anything to add?
5. Confirm operators with storage/metastore-DB/cluster-process access, and
trusted admins doing authorized actions, are out of model.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Operators with direct storage, metastore DB, or cluster-process access are considered trusted and out of scope. Authorized actions by trusted administrators are also out of model. This threat model focuses on behavior via Hive’s supported interfaces, assuming that the underlying infrastructure and its administrators are trusted.

Comment thread THREAT_MODEL.md Outdated
perimeter, with Hadoop + a metastore RDBMS + (Ranger or SQL-std auth) + KDC
as trusted dependencies.
4. Is the in-scope adversary "a SQL client at the HS2 boundary" (+ a network
MITM where TLS is off)? Anything to add?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The primary in-scope adversaries are untrusted clients at Hive service boundaries: SQL clients submitting statements to HS2, and clients accessing the Hive Metastore through supported APIs.
A network MITM is also in scope when TLS or equivalent transport protection is enabled, and a Hive operator is responsible for setting up TLS properly.

@potiuk

potiuk commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Thanks @okumin — this is exactly the maintainer input the §14 open questions were fishing for, and it sharpens the model a lot. How I'll fold it in:

Answered questions → maintainer-ratified. Your adversary model (untrusted SQL/metastore clients; MITM when TLS is enabled), trusted dependencies (Hadoop, metastore RDBMS, the authz provider, KDC), and trusted-admin-out-of-scope will move from (inferred) to (maintainer) in the next push.

UDF / SerDe / TRANSFORM. The built-in-UDF blacklist (reflect, reflect2, java_method, in_file via hive.server2.builtin.udf.blacklist), the custom-UDF / SerDe / InputFormat trust model, and the TRANSFORM prohibition via DisallowTransformHook are exactly the detail the "properties / downstream responsibilities" sections needed — I'll write them in close to as you stated them.

Metastore direct access (line 186). Agreed it belongs in scope — I'll add direct Hive Metastore access (e.g. from Spark) as an in-scope interface and cite your gist.

On a separate THREAT_MODEL.md for the Metastore: my suggestion is to keep one file but split it into clearly-labelled HiveServer2 and Hive Metastore sections, each with its own scope / adversary / trust-boundary subsection — rather than two files. Automated scanners discover the model by following AGENTS.md → SECURITY.md → THREAT_MODEL.md per repo; since HS2 and the Metastore live in this one repo, a single well-sectioned file keeps that chain intact while still giving each component a distinct model. Happy to split into two files instead if the PMC prefers — your call.

Still open (no rush), left as open questions pending your word:

  • hive.server2.enable.doAs=false under auth — you wanted a second pair of eyes; flagging for other reviewers here.
  • Whether to treat Ranger as the only authorization system, or keep SQL-standard authz in the model too.
  • The TLS parameters you're still checking.

I'll push the fold-in and re-request your review. Thanks again.

@okumin

okumin commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Thanks.

On a separate THREAT_MODEL.md for the Metastore: my suggestion is to keep one file but split it into clearly-labelled HiveServer2 and Hive Metastore sections, each with its own scope / adversary / trust-boundary subsection — rather than two files

Sure. We would like to follow the best practice. Let's go with your suggestion now.

I'm still checking the unanswered questions. Wait a while

§3/§4/§7 adversaries, trusted deps, query-resource bounding; §14 Q3/Q4/Q5/Q11 marked answered.

Generated-by: Claude Code (Claude Opus 4.7)
@potiuk

potiuk commented Jun 28, 2026

Copy link
Copy Markdown
Member Author

@okumin — pushed the fold-in (c8ca131): your 2026-06-27 answers on the adversary model, trusted dependencies, out-of-scope operators/admins, and query-resource bounding are now in the model (§3/§4/§7), and §14 Q3/Q4/Q5/Q11 are marked answered. Still open whenever you have a moment: the hive.server2.enable.doAs=false double-check (you wanted a second pair of eyes), whether to treat Ranger as the only authorization system, the TLS parameter names, and the HS2-vs-Metastore split (Q15). No rush — thanks for the thorough review.

Comment thread THREAT_MODEL.md Outdated
admins doing authorized actions, are out of model.~~

**Wave 2 — trust boundaries & auth**
6. At the client→HS2 boundary, are SQL text, JDBC connection properties, and

@okumin okumin Jul 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the point of view of HS2, SQL or connection parameters are untrusted. Hive can reject non-acceptable operations through an authz plugin or by configuring deny lists (i.e., hive.conf.restricted.list, hive.conf.locked.list, and hive.conf.hidden.list)

Comment thread THREAT_MODEL.md Outdated
12. *(PMC reviewing — okumin is checking the exact TLS configuration parameter
names on the Hive side; §8 TLS lever left unnamed pending that.)* Confirm
the real names + shipped defaults of the §8 levers (especially
`hive.server2.authentication` and the default authorization model).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, all credentials or secrets should be managed by Hadoop CredentialProviderAPI. Therefore, Hive administrators should store them in a file or something, and they have to configure hadoop.security.credential.provider.path.
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html

Apache Hive does not guarantee that the content in hive-site.xml or environment variables is never exposed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HiveServer2

  • To enable authentication, hive.server2.authentication and more-specific authentication parameters (typically, hive.server2.authentication.*) need to be configured properly
  • To enable authorization, hive.security.authorization.enabled=true and hive.security.authorization.manager need to be configured, typically using Apache Ranger. hive.security.authenticator.manager should be org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator to authorize as the HS2 session user. With Ranger, hive.server2.enable.doAs is typically configured to false
  • To enable TLS, hive.server2.use.SSL=true and more-specific TLS parameters need to be configured
  • A Hive administrator should ensure security-related configurations are protected using the appropriate hive.conf.restricted.list, hive.conf.locked.list, and hive.conf.hidden.list settings, so untrusted users cannot update sensitive settings or view secret values

You can find some more information here: https://hive.apache.org/docs/latest/admin/setting-up-hiveserver2/#authenticationsecurity-configuration

HiveServer2 Web UI

If the UI port (default: 10002) is exposed to untrusted users, a Hive administrator should configure the following parameters

  • To enable authentication, at least one of hive.server2.webui.use.spnego=true, hive.server2.webui.use.pam=true, or hive.server2.webui.auth.method=LDAP, and more-specific authentication parameters need to be configured
  • To enable TLS, hive.server2.webui.use.ssl=true and more-specific TLS parameters need to be configured

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hive Metastore

If a Hive administrator exposes Hive Metastore to untrusted users or systems, such as Spark or Flink, they have to configure the following parameters.

  • To enable authentication, metastore.authentication (e.g., KERBEROS or LDAP) and more-specific authentication parameters (e.g., metastore.sasl.enabled, metastore.kerberos.* or metastore.authentication.*) need to be configured properly
  • To enable authorization, hive.security.authorization.manager should be configured properly (typically, RangerHiveAuthorizerFactory) and metastore.pre.event.listeners should be org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer. metastore.server.filter.enabled=true and metastore.filter.hook=org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer are also needed
  • To enable TLS, metastore.use.SSL and more-specific TLS parameters need to be configured

Comment thread THREAT_MODEL.md Outdated
6. At the client→HS2 boundary, are SQL text, JDBC connection properties, and
session-config overrides all treated as untrusted (subject to the conf
whitelist)?
7. *(PMC reviewing — okumin expects `hive.server2.enable.doAs=false` is the

@okumin okumin Jul 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As our threat model recommends using an authz plugin, we can say hive.server2.enable.doAs=false is typical

Comment thread THREAT_MODEL.md Outdated
12. *(PMC reviewing — okumin is checking the exact TLS configuration parameter
names on the Hive side; §8 TLS lever left unnamed pending that.)* Confirm
the real names + shipped defaults of the §8 levers (especially
`hive.server2.authentication` and the default authorization model).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HiveServer2

  • To enable authentication, hive.server2.authentication and more-specific authentication parameters (typically, hive.server2.authentication.*) need to be configured properly
  • To enable authorization, hive.security.authorization.enabled=true and hive.security.authorization.manager need to be configured, typically using Apache Ranger. hive.security.authenticator.manager should be org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator to authorize as the HS2 session user. With Ranger, hive.server2.enable.doAs is typically configured to false
  • To enable TLS, hive.server2.use.SSL=true and more-specific TLS parameters need to be configured
  • A Hive administrator should ensure security-related configurations are protected using the appropriate hive.conf.restricted.list, hive.conf.locked.list, and hive.conf.hidden.list settings, so untrusted users cannot update sensitive settings or view secret values

You can find some more information here: https://hive.apache.org/docs/latest/admin/setting-up-hiveserver2/#authenticationsecurity-configuration

HiveServer2 Web UI

If the UI port (default: 10002) is exposed to untrusted users, a Hive administrator should configure the following parameters

  • To enable authentication, at least one of hive.server2.webui.use.spnego=true, hive.server2.webui.use.pam=true, or hive.server2.webui.auth.method=LDAP, and more-specific authentication parameters need to be configured
  • To enable TLS, hive.server2.webui.use.ssl=true and more-specific TLS parameters need to be configured

Comment thread THREAT_MODEL.md Outdated
12. *(PMC reviewing — okumin is checking the exact TLS configuration parameter
names on the Hive side; §8 TLS lever left unnamed pending that.)* Confirm
the real names + shipped defaults of the §8 levers (especially
`hive.server2.authentication` and the default authorization model).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hive Metastore

If a Hive administrator exposes Hive Metastore to untrusted users or systems, such as Spark or Flink, they have to configure the following parameters.

  • To enable authentication, metastore.authentication (e.g., KERBEROS or LDAP) and more-specific authentication parameters (e.g., metastore.sasl.enabled, metastore.kerberos.* or metastore.authentication.*) need to be configured properly
  • To enable authorization, hive.security.authorization.manager should be configured properly (typically, RangerHiveAuthorizerFactory) and metastore.pre.event.listeners should be org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer. metastore.server.filter.enabled=true and metastore.filter.hook=org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer are also needed
  • To enable TLS, metastore.use.SSL and more-specific TLS parameters need to be configured

Comment thread THREAT_MODEL.md Outdated
intended posture, since HiveServer2 can enforce policies itself; asked for a
second PMC member to double-check before we finalize.)* Which `doAs` posture
is the supported/recommended one, and how does it change the authorization
story?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Apache Ranger, hive.server2.enable.doAs=false is the expected configuration.

Comment thread THREAT_MODEL.md Outdated
second PMC member to double-check before we finalize.)* Which `doAs` posture
is the supported/recommended one, and how does it change the authorization
story?
8. What properties does Hive claim to uphold given valid input (auth, authz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given valid input and a secure configuration, Hive is expected to uphold the following properties:

  • Authentication: HiveServer2 and Hive Metastore can require clients to authenticate using the configured mechanism, such as Kerberos and LDAP, depending on the endpoint.
  • Authorization scoping: Requests are authorized as the authenticated Hive session/metastore user through the configured authorization manager, typically Apache Ranger. Authorization decisions are scoped to Hive objects and operations such as databases, tables, partitions, columns, functions, and relevant metadata operations.
  • Metastore authorization: When Hive Metastore is directly exposed to clients, metastore-side authorization can be enforced through HiveMetaStoreAuthorizer as a pre-event listener, and metadata read/list results can be filtered server-side using the metastore filter hook.
  • Transport protection: HiveServer2, Hive Metastore, and the HiveServer2 Web UI can protect traffic confidentiality and integrity when TLS/SSL is enabled and correctly configured.
  • Configuration protection: Sensitive or security-critical configuration values can be restricted, locked, or hidden so that untrusted users cannot change security posture at runtime or view secret values.
  • Credential handling: Secrets can be externalized through credential providers instead of being stored directly in cleartext configuration files.

These properties are configuration-dependent. Hive does not by itself guarantee authorization for users who bypass Hive and access the underlying storage or metastore database directly; those paths must be protected separately by HDFS/object-store/IAM/database controls.

Comment thread THREAT_MODEL.md Outdated
than the network level (reflected in §3.3/§4), and is still considering
whether to treat Ranger as the only supported authorization system.)*
Confirm the operator-owned list in §6 (TLS, authz-model choice, network
isolation, UDF vetting). Anything mis-assigned?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's say Ranger is the primary authorization plugin

Comment thread THREAT_MODEL.md Outdated
whether to treat Ranger as the only supported authorization system.)*
Confirm the operator-owned list in §6 (TLS, authz-model choice, network
isolation, UDF vetting). Anything mis-assigned?
10. Confirm the by-design non-guarantees in §7.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Comment thread THREAT_MODEL.md Outdated
the real names + shipped defaults of the §8 levers (especially
`hive.server2.authentication` and the default authorization model).
13. What do scanners/fuzzers/researchers most often report that you consider a
non-finding? (Feeds §11a.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Secret exposure when a Hive administrator stores secrets in hive-site.xml, metastore-site.xml, environment variables, or system properties. They should use Hadoop CredentialProviderAPI instead

Comment thread THREAT_MODEL.md Outdated
14. Hive has no in-repo `SECURITY.md`/`THREAT_MODEL.md` today; this PR adds
them and wires `AGENTS.md → SECURITY.md → THREAT_MODEL.md`. Confirm this
in-repo model is canonical (vs the cwiki security pages), how it should
reference those pages, and who owns revisions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of today, we may say this is the canonical page. We have some security information scattered across our website. However, I can't guarantee they are up to date.

Comment thread THREAT_MODEL.md Outdated
`THREAT_MODEL.md` (e.g. `THREAT_MODEL.md` for HS2 + a separate one for HMS,
each discoverable), rather than one combined document? Leaning toward
splitting if it makes the per-component scope cleaner for both triagers and
scan agents; the PMC's call on structure.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm biased toward this statement and want to follow it.

my suggestion is to keep one file but split it into clearly-labelled HiveServer2 and Hive Metastore sections, each with its own scope / adversary / trust-boundary subsection — rather than two files

Comment thread AGENTS.md Outdated
### Key scoping facts (see THREAT_MODEL.md)
- The **HiveServer2** SQL front door is the primary untrusted boundary; the
Metastore and execution cluster are assumed to run inside an
operator-controlled perimeter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update as follows in the end?

The HiveServer2 SQL front door and directly exposed Hive Metastore endpoints are the primary untrusted boundaries; execution clusters and internal service dependencies are assumed to run inside an operator-controlled perimeter.

Apply the Hive PMC's (okumin) answers to the model's open questions:
promote the resolved §4/§5/§6/§7 claims from (inferred) to (maintainer);
reorganize §8 into HiveServer2 / Web UI / Metastore / Credentials blocks
with the maintainer-supplied parameter names; add the secret-exposure
known non-finding to §11a; record the in-repo model as canonical. Also
update AGENTS.md's primary-boundary line per the PMC's wording.

Generated-by: Claude Code (Claude Opus 4.8)

@okumin okumin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@potiuk
A big thank you! I have reviewed the generated part of THREAT_MODEL.md and put comments. 95% sounds fine to me. If it is okay, I'd apply the suggested changes myself after a few more looks.

Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md
`hive-site.xml` / `metastore-site.xml` / env vars / system properties
instead of using the Hadoop `CredentialProviderAPI`. Folded into §11a.)*
~~What do scanners/fuzzers/researchers most often report that you consider a
non-finding?~~

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may add the following sentence to §11a.

Hive defaults are not a complete secure-production baseline; some defaults
prioritize ease of adoption, compatibility, or trusted/local deployments.
Operators are responsible for enabling and correctly configuring authentication,
authorization, transport security, network isolation, and related controls for
internet-exposed or multi-tenant production deployments. `OUT-OF-MODEL: operator responsibility`

We sometimes receive a security report with default but insecure configurations.

Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md Outdated
@okumin
okumin marked this pull request as ready for review July 7, 2026 05:49
Comment thread THREAT_MODEL.md Outdated
Comment thread THREAT_MODEL.md
Co-authored-by: Shohei Okumiya <okumin@apache.org>
Comment thread THREAT_MODEL.md
@okumin okumin changed the title Add security threat model (THREAT_MODEL.md) + SECURITY.md/AGENTS.md discoverability HIVE-29706: Add AGENTS.md, SECURITY.md, and THREAT_MODEL.md Jul 8, 2026
@okumin

okumin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

I approved and linked HIVE-29706. Based on our commit guideline, I will merged this in 24 hours

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@okumin
okumin merged commit 386cc3c into apache:master Jul 9, 2026
3 of 4 checks passed
@okumin

okumin commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Merged. @potiuk Thanks for your kind support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants