wp_security_context_v1¤
wayland.wp_security_context_v1 ¤
Client security context
The security context allows a client to register a new client and attach security context metadata to the connections.
When both are set, the combination of the application ID and the sandbox engine must uniquely identify an application. The same application ID will be used across instances (e.g. if the application is restarted, or if the application is started multiple times).
When both are set, the combination of the instance ID and the sandbox engine must uniquely identify a running instance of an application.
Methods:
-
destroy
–Destroy the security context object
-
set_sandbox_engine
–Set the sandbox engine
-
set_app_id
–Set the application id
-
set_instance_id
–Set the instance id
-
commit
–Register the security context
error ¤
-
already_used
–Security context has already been committed -
already_set
–Metadata has already been set -
invalid_metadata
–Metadata is invalid
destroy ¤
destroy() -> None
Destroy the security context object
Destroy the security context object.
set_sandbox_engine ¤
Set the sandbox engine
Attach a unique sandbox engine name to the security context. The name should follow the reverse-DNS style (e.g. "org.flatpak").
A list of well-known engines is maintained at: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
It is a protocol error to call this request twice. The already_set error is sent in this case.
Parameters:
set_app_id ¤
Set the application id
Attach an application ID to the security context.
The application ID is an opaque, sandbox-specific identifier for an application. See the well-known engines document for more details: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
The compositor may use the application ID to group clients belonging to the same security context application.
Whether this request is optional or not depends on the sandbox engine used.
It is a protocol error to call this request twice. The already_set error is sent in this case.
Parameters:
set_instance_id ¤
set_instance_id(instance_id: str) -> None
Set the instance id
Attach an instance ID to the security context.
The instance ID is an opaque, sandbox-specific identifier for a running instance of an application. See the well-known engines document for more details: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
Whether this request is optional or not depends on the sandbox engine used.
It is a protocol error to call this request twice. The already_set error is sent in this case.
Parameters:
commit ¤
commit() -> None
Register the security context
Atomically register the new client and attach the security context metadata.
If the provided metadata is inconsistent or does not match with out of band metadata (see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md), the invalid_metadata error may be sent eventually.
It's a protocol error to send any request other than "destroy" after this request. In this case, the already_used error is sent.