Skip to content

Commit 8c89be8

Browse files
committed
Address comments
1 parent 10b2e0c commit 8c89be8

File tree

5 files changed

+53
-17
lines changed

5 files changed

+53
-17
lines changed

docs/attributes-registry/enduser.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111

1212
## End User Attributes
1313

14-
Describes information about the end user, which can be used as a subdomain of browser, client, or user domains.
14+
Describes the end user.
1515

1616
| Attribute | Type | Description | Examples | Stability |
1717
|---|---|---|---|---|
18-
| <a id="enduser-id" href="#enduser-id">`enduser.id`</a> | string | Unique identifier of an authenticated user in the system. | `<authenticated_user_id>` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
18+
| <a id="enduser-id" href="#enduser-id">`enduser.id`</a> | string | Unique identifier of an authenticated user in the system. | `username` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1919
| <a id="enduser-pseudo-id" href="#enduser-pseudo-id">`enduser.pseudo.id`</a> | string | Pseudonymous identifier of an end user. This identifier is unique to the user but does not reveal their actual identity. | `QdH5CAWJgqVT4rOr0qtumf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2020

2121
## Deprecated End User Attributes
2222

23-
Describes deprecated end user attributes.
23+
Describes deprecated enduser attributes.
2424

2525
| Attribute | Type | Description | Examples | Stability |
2626
|---|---|---|---|---|
2727
| <a id="enduser-role" href="#enduser-role">`enduser.role`</a> | string | Actual/assumed role the client is making the request under extracted from token or application security context. | `admin` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed. |
28-
| <a id="enduser-scope" href="#enduser-scope">`enduser.scope`</a> | string | Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). | `read:message, write:files` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed. |
28+
| <a id="enduser-scope" href="#enduser-scope">`enduser.scope`</a> | string | Deprecated, no replacement at this time. | `read:message, write:files` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Removed. |

docs/general/attributes.md

+42-2
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ These attributes may be used for any operation with an authenticated and/or auth
396396

397397
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
398398
|---|---|---|---|---|---|
399-
| [`enduser.id`](/docs/attributes-registry/enduser.md) | string | Unique identifier of an authenticated user in the system. | `<authenticated_user_id>` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
399+
| [`enduser.id`](/docs/attributes-registry/enduser.md) | string | Unique identifier of an authenticated user in the system. | `username` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
400400
| [`enduser.pseudo.id`](/docs/attributes-registry/enduser.md) | string | Pseudonymous identifier of an end user. This identifier is unique to the user but does not reveal their actual identity. | `QdH5CAWJgqVT4rOr0qtumf` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
401401

402402
<!-- markdownlint-restore -->
@@ -409,7 +409,47 @@ system. It is expected this information would be propagated unchanged from node-
409409
using the Baggage mechanism. These attributes should not be used to record system-to-system
410410
authentication attributes.
411411

412-
`enduser.pseudo.id` attribute can be set by a specific client component, e.g. through a cookie out of the Span's HTTP request headers. Client side application should be able to stamp this attribute on any telemetry item emitted by the application whenever this cookie is available.
412+
Examples of where the `enduser.id` value is extracted from:
413+
414+
| Authentication protocol | Field or description |
415+
| :---------------------- | :------------------------------ |
416+
| [HTTP Basic/Digest Authentication] | `username` |
417+
| [OAuth 2.0 Bearer Token] | [OAuth 2.0 Client Identifier] value from `client_id` for the [OAuth 2.0 Client Credentials Grant] flow and `subject` or `username` from get token info response for other flows using opaque tokens. |
418+
| [OpenID Connect 1.0 IDToken] | `sub` |
419+
| [SAML 2.0 Assertion] | `urn:oasis:names:tc:SAML:2.0:assertion:Subject` |
420+
| [Kerberos] | `PrincipalName` |
421+
422+
| Framework | Field or description |
423+
| :---------------------- | :------------------------------ |
424+
| [JavaEE/JakartaEE Servlet] | `javax.servlet.http.HttpServletRequest.getUserPrincipal()` |
425+
| [Windows Communication Foundation] | `ServiceSecurityContext.Current.PrimaryIdentity` |
426+
427+
[SAML 2.0 Assertion]: http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html
428+
[HTTP Basic/Digest Authentication]: https://tools.ietf.org/html/rfc2617
429+
[OAuth 2.0 Bearer Token]: https://tools.ietf.org/html/rfc6750
430+
[OAuth 2.0 Client Identifier]: https://tools.ietf.org/html/rfc6749#section-2.2
431+
[OAuth 2.0 Client Credentials Grant]: https://tools.ietf.org/html/rfc6749#section-4.4
432+
[OpenID Connect 1.0 IDToken]: https://openid.net/specs/openid-connect-core-1_0.html#IDToken
433+
[Kerberos]: https://tools.ietf.org/html/rfc4120
434+
[JavaEE/JakartaEE Servlet]: https://jakarta.ee/specifications/platform/8/apidocs/javax/servlet/http/HttpServletRequest.html
435+
[Windows Communication Foundation]: https://docs.microsoft.com/dotnet/api/system.servicemodel.servicesecuritycontext?view=netframework-4.8
436+
437+
Given the sensitive nature of this information, SDKs and exporters SHOULD drop these attributes by
438+
default and then provide a configuration parameter to turn on retention for use cases where the
439+
information is required and would not violate any policies or regulations.
440+
441+
Enduser attributes capture end user identity. They are likely to contain PII and should be populated, processed, and stored with caution.
442+
Information about the end user is usually available on the client side (in a mobile or browser application).
443+
Enduser attributes are populated by the user application in coordination with OpenTelemetry SDK.
444+
Some OpenTelemetry distributions auto-collect this information from HTTP cookies.
445+
When user information is available, it's RECOMMENDED to add it to all spans and events emitted in the scope
446+
of operation initiated by this user.
447+
448+
Application in coordination with OpenTelemetry SDK and Distro MAY propagate user information from the client application
449+
to the front end and across different backend services using custom HTTP cookies and/or [Baggage]<https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/baggage/api.md>.
450+
451+
Enduser information is collected and populated manually by user application or specialized components,
452+
other instrumentations such as HTTP or RPC are not expected to populate these attributes by default.
413453

414454
## General thread attributes
415455

model/enduser/common.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ groups:
22
- id: identity
33
type: attribute_group
44
brief: >
5-
These attributes may be used for any operation with an authenticated and/or authorized enduser.
5+
Describes end user identity.
66
attributes:
77
- ref: enduser.id
88
requirement_level: recommended

model/enduser/deprecated/registry-deprecated.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ groups:
22
- id: registry.enduser.deprecated
33
type: attribute_group
44
display_name: Deprecated End User Attributes
5-
brief: "Describes deprecated end user attributes."
5+
brief: "Describes deprecated enduser attributes."
66
attributes:
77
- id: enduser.role
88
type: string
@@ -14,9 +14,5 @@ groups:
1414
type: string
1515
deprecated: "Removed."
1616
stability: experimental
17-
brief: >
18-
Scopes or granted authorities the client currently possesses extracted from token
19-
or application security context. The value would come from the scope associated
20-
with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3)
21-
or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
17+
brief: "Deprecated, no replacement at this time."
2218
examples: 'read:message, write:files'

model/enduser/registry.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ groups:
33
type: attribute_group
44
display_name: End User Attributes
55
brief: >
6-
Describes information about the end user, which can be used as a subdomain of browser, client, or user domains.
6+
Describes the end user.
77
attributes:
88
- id: enduser.id
99
type: string
1010
brief: "Unique identifier of an authenticated user in the system."
11-
examples: [ '<authenticated_user_id>' ]
12-
stability: experimental
11+
examples: [ 'username' ]
12+
stability: development
1313
- id: enduser.pseudo.id
1414
type: string
15-
stability: experimental
15+
stability: development
1616
brief: >
1717
Pseudonymous identifier of an end user. This identifier is unique to the user but does not reveal their actual identity.
1818
examples: ['QdH5CAWJgqVT4rOr0qtumf']

0 commit comments

Comments
 (0)