Skip to content

Commit a2d496c

Browse files
[8.7] docs: Document privileges to read RUM source maps; Update examples (backport #11741) (#11895)
* docs: Document privileges to read RUM source maps; Update examples (#11741) * Document required privileges to read RUM source map from ES since 8.7. * Update API key creation examples, add agentcfg role to it. (cherry picked from commit 00fb30e) # Conflicts: # docs/legacy/configuration-rum.asciidoc Signed-off-by: Carson Ip <[email protected]> * Fix conflict Signed-off-by: Carson Ip <[email protected]> --------- Signed-off-by: Carson Ip <[email protected]> Co-authored-by: Carson Ip <[email protected]> Co-authored-by: Carson Ip <[email protected]>
1 parent b3d2e66 commit a2d496c

File tree

3 files changed

+65
-12
lines changed

3 files changed

+65
-12
lines changed

docs/legacy/api-keys.asciidoc

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,24 @@ In the role descriptors box, assign the appropriate privileges to the new API ke
3737
{
3838
"names": ["{beat_default_index_prefix}-*"],
3939
"privileges": ["create_index", "create_doc"]
40-
},
40+
}
41+
]
42+
},
43+
"{beat_default_index_prefix}_sourcemap": {
44+
"index": [
4145
{
42-
"names": ["{beat_default_index_prefix}-*sourcemap"],
46+
"names": [".apm-source-map"],
4347
"privileges": ["read"]
44-
},
45-
]
48+
}
49+
]
50+
},
51+
"{beat_default_index_prefix}_agentcfg": {
52+
"index": [
53+
{
54+
"names": [".apm-agent-configuration"],
55+
"privileges": ["read"]
56+
}
57+
]
4658
}
4759
}
4860
----
@@ -126,11 +138,23 @@ POST /_security/api_key
126138
{
127139
"names": ["{beat_default_index_prefix}-*"],
128140
"privileges": ["create_index", "create_doc"]
129-
},
141+
}
142+
]
143+
},
144+
"{beat_default_index_prefix}_sourcemap": {
145+
"index": [
146+
{
147+
"names": [".apm-source-map"],
148+
"privileges": ["read"]
149+
}
150+
]
151+
},
152+
"{beat_default_index_prefix}_agentcfg": {
153+
"index": [
130154
{
131-
"names": ["{beat_default_index_prefix}-*sourcemap"],
155+
"names": [".apm-agent-configuration"],
132156
"privileges": ["read"]
133-
},
157+
}
134158
]
135159
}
136160
}

docs/legacy/configuration-rum.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Default: `"^/webpack"` (excludes stack trace frames that have a filename startin
139139
==== `source_mapping.enabled`
140140
Used to enable/disable <<sourcemaps,source mapping>> for RUM events.
141141
When enabled, the APM Server needs additional privileges to read source maps.
142-
See <<privileges-to-publish-events>> for more details.
142+
See <<privileges-rum-source-mapping>> for more details.
143143

144144
Default: `true`
145145

docs/legacy/feature-roles.asciidoc

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ information, and another for viewing it.
1616
* <<privileges-api-key,API key role>>: To create and manage API keys.
1717
* <<privileges-agent-central-config,Central configuration management role>>: To view
1818
APM Agent central configurations.
19+
* <<privileges-rum-source-mapping,RUM source mapping role>>: To read RUM source maps.
1920

2021
{es-security-features} provides {ref}/built-in-roles.html[built-in roles] that grant a
2122
subset of the privileges needed by APM users.
@@ -64,12 +65,10 @@ that has the following privileges:
6465
|Write events into {es}
6566
|====
6667

67-
. If <<configuration-rum,real user monitoring>> is enabled, additional privileges are required to read source maps.
68-
See {kibana-ref}/rum-sourcemap-api.html[RUM source map API] for more details.
69-
Assign these extra privileges to the *general writer role*.
70-
7168
. Assign the *general writer role* to users who need to publish APM data.
7269

70+
. If <<configuration-rum,real user monitoring>> is enabled, create a separate <<privileges-rum-source-mapping,RUM source mapping role>>.
71+
7372
////
7473
*********************************** ***********************************
7574
*********************************** ***********************************
@@ -333,6 +332,36 @@ which requires the following privileges:
333332
TIP: Looking for privileges and roles needed to use central configuration from the {apm-app} or {apm-app} API?
334333
See {kibana-ref}/apm-app-central-config-user.html[{apm-app} central configuration user].
335334

335+
[[privileges-rum-source-map]]
336+
=== Grant privileges and roles needed for reading source maps
337+
338+
++++
339+
<titleabbrev>Create a _source map_ user</titleabbrev>
340+
++++
341+
342+
[[privileges-rum-source-mapping]]
343+
==== APM Server RUM source mapping
344+
345+
If <<configuration-rum,real user monitoring>> is enabled, additional privileges are required to read source maps.
346+
347+
To grant an APM Server user with the required privileges for reading RUM source maps from {es} directly without {kib},
348+
assign the user the following privileges:
349+
350+
[options="header"]
351+
|====
352+
|Type | Privilege | Purpose
353+
354+
|Index
355+
|`read` on `.apm-source-map` index
356+
|Allow {beatname_uc} to read RUM source maps from {es}
357+
|====
358+
359+
The above privileges should be sufficient for RUM source mapping to work properly
360+
as long as {beatname_uc} communicates with {es} successfully.
361+
If it fails, it may fallback to read source maps via {kib} if configured,
362+
which requires additional {kib} privileges.
363+
See {kibana-ref}/rum-sourcemap-api.html[RUM source map API] for more details.
364+
336365
////
337366
*********************************** ***********************************
338367
*********************************** ***********************************

0 commit comments

Comments
 (0)