Skip to content

Commit 6ec7c8c

Browse files
committed
Incorporated Peach’s feedback.
1 parent cc360c1 commit 6ec7c8c

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/current/_includes/v25.4/performance/lease-preference-system-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ALTER DATABASE system CONFIGURE ZONE USING constraints = '{"+region=us-east1": 1
66
~~~
77

88
{{site.data.alerts.callout_info}}
9-
Access to tables and built-in functions in the `system` database is controlled by the [`allow_unsafe_internals` session variable]({% link {{ page.version.version }}/session-variables.md %}#allow-unsafe-internals). However, the above `ALTER DATABASE system` statement executes regardless of the variable's setting because it does not access tables or invoke built-in functions.
9+
Access to tables and built-in functions in the `system` database is controlled by the [`allow_unsafe_internals` session variable]({% link {{ page.version.version }}/session-variables.md %}#allow-unsafe-internals). The above `ALTER DATABASE system` statement executes regardless of the variable's setting because it does not access tables or invoke built-in functions.
1010
{{site.data.alerts.end}}
1111

1212
Run all subsequent schema changes from a node in the specified region.

src/current/v25.4/crdb-internal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ The `crdb_internal` [system catalog]({% link {{ page.version.version }}/system-c
1616
SET allow_unsafe_internals = off;
1717
~~~
1818

19-
With `allow_unsafe_internals` set to `off`, access only [`information_schema` tables]({% link {{ page.version.version }}/information-schema.md %}).
19+
With `allow_unsafe_internals` set to `off`, you should access only [`information_schema` tables]({% link {{ page.version.version }}/information-schema.md %}).
2020

2121
{{site.data.alerts.callout_info}}
22-
If you need information that is not available through production-supported [`information_schema` tables]({% link {{ page.version.version }}/information-schema.md %}), work with your account team or contact [Cockroach Labs support](https://support.cockroachlabs.com).
22+
If you need information not available through production-supported [`information_schema` tables]({% link {{ page.version.version }}/information-schema.md %}), contact your account team or contact [Cockroach Labs support](https://support.cockroachlabs.com).
2323
{{site.data.alerts.end}}
2424

2525
When `allow_unsafe_internals` is set to `off`, external sessions can still read allowlisted `crdb_internal` objects that are supported for production use (those marked ✓ in the table below). To access all other tables and built-in functions in `crdb_internal` and `system`, you must explicitly enable `allow_unsafe_internals` for the session.
@@ -31,7 +31,7 @@ SET allow_unsafe_internals = on;
3131

3232
Some `SHOW commands`, such as [`SHOW DATABASES`]({% link {{ page.version.version }}/show-databases.md %}), and CockroachDB tools, such as the [DB Console]({% link {{ page.version.version }}/ui-overview.md %}) and [`cockroach debug zip`]({% link {{ page.version.version }}/cockroach-debug-zip.md %}), rely on internal queries that access restricted data. These commands and tools are designed to bypass the `allow_unsafe_internals` setting and continue to function even when direct access is disabled.
3333

34-
CockroachDB emits [log events to the `SENSITIVE_ACCESS` channel]({% link {{ page.version.version }}/logging-use-cases.md %}#example-unsafe-internals) when a user overrides or is denied access to unsafe internals, creating a record of emergency access to system internals. Monitor these logs to ensure that neither workloads nor you and your users are unintentionally accessing unsafe internals.
34+
CockroachDB emits log events to the [`SENSITIVE_ACCESS` channel]({% link {{ page.version.version }}/logging-use-cases.md %}#example-unsafe-internals) when a user overrides or is denied access to unsafe internals, creating a record of emergency access to system internals. Monitor these logs to ensure that neither workloads nor you and your users are unintentionally accessing unsafe internals.
3535

3636
{{site.data.alerts.callout_danger}}
3737
In a future release, the `allow_unsafe_internals` session variable will default to `off`. To prepare for this change and [assess potential downstream impacts]({% link {{ page.version.version }}/logging-use-cases.md %}#unsafe-internals-disabled) on your setup, set `allow_unsafe_internals` to `off` in a non-production environment.

src/current/v25.4/logging-use-cases.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,50 +286,50 @@ These events record both successful and denied attempts to access internal syste
286286

287287
##### Unsafe internals enabled
288288

289-
This command enables access to unsafe internals for the user `allow_unsafe_internals_on`:
289+
This command enables access to unsafe internals for the user `can_access_unsafe_internals`:
290290

291291
{% include_cached copy-clipboard.html %}
292292
~~~ sql
293-
ALTER ROLE allow_unsafe_internals_on SET allow_unsafe_internals = on;
293+
ALTER ROLE can_access_unsafe_internals SET allow_unsafe_internals = on;
294294
~~~
295295

296-
When the user `allow_unsafe_internals_on` connects to a session and accesses an unsafe internal object, the event is logged:
296+
When the user `can_access_unsafe_internals` connects to a session and accesses an unsafe internal object, the event is logged:
297297

298298
{% include_cached copy-clipboard.html %}
299299
~~~ sql
300300
SELECT count(*) FROM crdb_internal.active_range_feeds;
301301
~~~
302302

303-
This `unsafe_internals_accessed` event indicates that the internal table `crdb_internal.active_range_feeds` was accessed by user `allow_unsafe_internals_on`, who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
303+
This `unsafe_internals_accessed` event indicates that the internal table `crdb_internal.active_range_feeds` was accessed by user `can_access_unsafe_internals`, who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
304304

305305
~~~
306-
W250930 19:51:01.128927 464484 8@util/log/event_log.go:90 ⋮ [T1,Vsystem,n1,client=127.0.0.1:65020,hostssl,user=‹allow_unsafe_internals_on›] 23 ={"Timestamp":1759261861128925000,"EventType":"unsafe_internals_accessed","Query":"SELECT count(*) FROM \"\".crdb_internal.active_range_feeds"}
306+
W250930 19:51:01.128927 464484 8@util/log/event_log.go:90 ⋮ [T1,Vsystem,n1,client=127.0.0.1:65020,hostssl,user=‹can_access_unsafe_internals›] 23 ={"Timestamp":1759261861128925000,"EventType":"unsafe_internals_accessed","Query":"SELECT count(*) FROM \"\".crdb_internal.active_range_feeds"}
307307
~~~
308308

309309
##### Unsafe internals disabled
310310

311-
To assess potential downstream impacts, disable `allow_unsafe_internals` in a test or staging environment. Monitoring tools or scripts that rely on these internals may be affected. `unsafe_internals_denied` events indentify which tools or scripts attempted to access these internals.
311+
To assess potential downstream impacts, disable `allow_unsafe_internals` in a test or staging environment. Monitoring tools or scripts that rely on these internals may be affected. `unsafe_internals_denied` events identify which tools or scripts attempted to access these internals.
312312

313313
This example shows how to identify users denied access to unsafe internal tables.
314314

315-
This command disables access to unsafe internals for the user `allow_unsafe_internals_off`:
315+
This command disables access to unsafe internals for the user `can_not_access_unsafe_internals`:
316316

317317
{% include_cached copy-clipboard.html %}
318318
~~~ sql
319-
ALTER ROLE allow_unsafe_internals_off SET allow_unsafe_internals = off;
319+
ALTER ROLE can_not_access_unsafe_internals SET allow_unsafe_internals = off;
320320
~~~
321321

322-
When the user `allow_unsafe_internals_off` connects to a session and attempts to access an unsafe internal object, the event is logged:
322+
When the user `can_not_access_unsafe_internals` connects to a session and attempts to access an unsafe internal object, the event is logged:
323323

324324
{% include_cached copy-clipboard.html %}
325325
~~~ sql
326326
SELECT count(*) FROM crdb_internal.active_range_feeds;
327327
~~~
328328

329-
This `unsafe_internals_denied` event indicates that access to the internal table `crdb_internal.active_range_feeds` was denied for the user `allow_unsafe_internals_off`, who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
329+
This `unsafe_internals_denied` event indicates that access to the internal table `crdb_internal.active_range_feeds` was denied for the user `can_not_access_unsafe_internals`, who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
330330

331331
~~~
332-
W250930 15:47:06.906181 122782 8@util/log/event_log.go:90 ⋮ [T1,Vsystem,n1,client=127.0.0.1:57104,hostssl,user=‹allow_unsafe_internals_off›] 18 ={"Timestamp":1759247226906172000,"EventType":"unsafe_internals_denied","Query":"SELECT count(*) FROM \"\".crdb_internal.active_range_feeds"}
332+
W250930 15:47:06.906181 122782 8@util/log/event_log.go:90 ⋮ [T1,Vsystem,n1,client=127.0.0.1:57104,hostssl,user=‹can_not_access_unsafe_internals›] 18 ={"Timestamp":1759247226906172000,"EventType":"unsafe_internals_denied","Query":"SELECT count(*) FROM \"\".crdb_internal.active_range_feeds"}
333333
~~~
334334

335335
- Preceding the `=` character is the `crdb-v2` event metadata. See the [reference documentation]({% link {{ page.version.version }}/log-formats.md %}#format-crdb-v2) for details on the fields.

0 commit comments

Comments
 (0)