You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/current/_includes/v25.4/misc/session-vars.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
| Variable name | Description | Initial value | Modify with [`SET`]({% link {{ page.version.version }}/set-vars.md %})? | View with [`SHOW`]({% link {{ page.version.version }}/show-vars.md %})? |
2
2
|---|---|---|---|---|
3
3
| <aid="always-distribute-full-scans"></a> `always_distribute_full_scans`| When set to `on`, full table scans are always [distributed]({% link {{ page.version.version }}/architecture/sql-layer.md %}#distsql). |`off`| Yes | Yes |
4
-
| <aid="allow-unsafe-internals"></a><spanclass="version-tag">New in v25.4:</span> `allow_unsafe_internals`| Controls access to unsafe internals in the `system` database and the [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}#access-control) schema. When set to `off`, only allowlisted objects are accessible without internal privileges.<br><br>**Warning**: In future releases, this session variable will default to `off` and then will be removed. To assess potential downstream impacts on your setup, set `allow_unsafe_internals` to `off` in a non-production environment. |`on`| Yes | Yes |
4
+
| <aid="allow-unsafe-internals"></a><spanclass="version-tag">New in v25.4:</span> `allow_unsafe_internals`| Controls access to unsafe internals in the `system` database and the [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}#access-control) schema. When set to `off`, only allowlisted objects are accessible without internal privileges.<br><br>**Warning**: In a future release, this session variable will default to `off`. To assess potential downstream impacts on your setup, set `allow_unsafe_internals` to `off` in a non-production environment. |`on`| Yes | Yes |
5
5
| <aid="application-name"></a> `application_name`| The current application name for statistics collection. | Empty string, or `cockroach` for sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}). | Yes | Yes |
6
6
| <aid="autocommit-before-ddl"></a> `autocommit_before_ddl`| When the [`autocommit_before_ddl` session setting]({% link {{page.version.version}}/set-vars.md %}#autocommit-before-ddl) is set to `on`, any schema change statement that is sent during an [explicit transaction]({% link {{page.version.version}}/transactions.md %}) will cause the transaction to [commit]({% link {{page.version.version}}/commit-transaction.md %}) before executing the schema change. This is useful because [CockroachDB does not fully support multiple schema changes in a single transaction]({% link {{ page.version.version }}/online-schema-changes.md %}#schema-changes-within-transactions). : This setting is enabled by default. To disable it for [all roles]({% link {{ page.version.version }}/alter-role.md %}#set-default-session-variable-values-for-all-users), issue the following statement: `ALTER ROLE ALL SET autocommit_before_ddl = false`|`on`| Yes | Yes |
7
7
| <aid="bytea-output"></a> `bytea_output`| The [mode for conversions from `STRING` to `BYTES`]({% link {{ page.version.version }}/bytes.md %}#supported-conversions). | hex | Yes | Yes |
Copy file name to clipboardExpand all lines: src/current/v25.4/crdb-internal.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,26 +9,26 @@ The `crdb_internal` [system catalog]({% link {{ page.version.version }}/system-c
9
9
10
10
## Access control
11
11
12
-
{% include_cached new-in.html version="v25.4" %} CockroachDB treats most objects in the `crdb_internal` schema, as well as descriptors in the `system` database, as *unsafe internals*. Access to these objects is controlled by the [`allow_unsafe_internals` session variable]({% link {{ page.version.version }}/session-variables.md %}#allow-unsafe-internals). This defaults to `on`, but you can disable access by setting it to `off`:
12
+
{% include_cached new-in.html version="v25.4" %} CockroachDB treats most objects in the `crdb_internal` schema and descriptors in the `system` database as *unsafe internals*. Access to these objects is controlled by the [`allow_unsafe_internals` session variable]({% link {{ page.version.version }}/session-variables.md %}#allow-unsafe-internals). This defaults to `on`, but you can disable access by setting it to `off`.
13
13
14
14
{% include_cached copy-clipboard.html %}
15
15
~~~sql
16
16
SET allow_unsafe_internals = off;
17
17
~~~
18
18
19
-
When set to `off`, external sessions can read only the allowlisted `crdb_internal` objects that are supported for production use (the tables marked ✓ in the table below). All other tables and built-in functions that use the `crdb_internal` namespace require either an internal caller or explicitly enabling`allow_unsafe_internals` for the session:
19
+
When set to `off`, external sessions can read only the allowlisted `crdb_internal` objects that are supported for production use (the tables marked ✓ in the table below). All other tables and built-in functions that use the `crdb_internal` namespace require you to explicitly enable`allow_unsafe_internals` for the session.
20
20
21
21
{% include_cached copy-clipboard.html %}
22
22
~~~sql
23
23
SET allow_unsafe_internals =on;
24
24
~~~
25
25
26
-
Some SHOW commands, such as [SHOW DATABASES]({% link {{ page.version.version }}/show-databases.md %}), depend on internal queries that access otherwise restricted data. These commands are designed to bypass the `allow_unsafe_internals` setting, so they continue to function even when direct access to unsafe internals is disabled.
26
+
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.
27
27
28
28
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, generating a record of emergency access to system internals.
29
29
30
30
{{site.data.alerts.callout_danger}}
31
-
In future releases, the `allow_unsafe_internals` session variable will default to `off` and then will be removed. To assess potential downstream impacts on your setup, set `allow_unsafe_internals` to `off` in a non-production environment.
31
+
In a future release, the `allow_unsafe_internals` session variable will default to `off`. To assess potential downstream impacts on your setup, set `allow_unsafe_internals` to `off` in a non-production environment.
This `unsafe_internals_accessed` event shows that the internal table `crdb_internal.active_range_feeds` was accessed by user `max` who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
301
+
This `unsafe_internals_accessed` event shows 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:
This `unsafe_internals_denied` event shows that access to the internal table `crdb_internal.active_range_feeds` was denied to the user `max`, who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
321
+
This `unsafe_internals_denied` event shows that access to the internal table `crdb_internal.active_range_feeds` was denied to the user `allow_unsafe_internals_off`, who issued a [`SELECT`]({% link {{ page.version.version }}/selection-queries.md %}) statement:
- 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