liveBook · Manning

Security context

A security context is security-related configuration or execution state associated with a subject, request, container, or runtime environment.

How 4 Manning books explain it

Spring Security in Action, Second Edition

A security context is a Spring Security object that holds authentication information associated with the current execution or request.

How it is used
Retains authenticated-request data so controllers and authorization logic can use the current user and authorities.
How deep it goes
Defines the Authentication contract and explains thread-local, inheritable, and global management strategies, including asynchronous and concurrency hazards.
Examples
Uses controller access, an @Async username lookup, strategy configuration, and direct method-security tests with authenticated and unauthorized users.
What you can do after
Operate/configure it through SecurityContextHolder, retrieve authentication details, propagate them to asynchronous threads, and test secured methods.

Read how Spring Security in Action, Second Edition explains security context →

Kubernetes for Developers

A Kubernetes security context is a set of Pod or container settings that controls security-related execution properties such as the user identity.

How it is used
Configures elevated permissions for node-level work or restricts ordinary application containers to reduce risk.
How deep it goes
Shows concrete settings, startup failures, application fixes, and admission rejection diagnostics rather than an exhaustive security-context field reference.
Examples
Uses a privileged DaemonSet, a locked-down Pod, and a non-root service with port and file-permission failures.
What you can do after
Operate/configure a non-root workload and diagnose container startup or Pod admission failures.

Read how Kubernetes for Developers explains security context →

Quarkus in Action

A security context is information describing the authenticated principal and associated security state for a request or interaction.

How it is used
Connects authenticated request identity to REST-resource behavior such as ownership, filtering, and downstream service calls.
How deep it goes
Explains injection, principal lookup, anonymous handling, and filtering, but does not detail authentication-provider internals.
Examples
Demonstrates reservation creation, anonymous fallback, user ownership, and current-user reservation filtering.
What you can do after
Apply it via Jakarta REST injection to identify request users and enforce user-specific application behavior.

Read how Quarkus in Action explains security context →

Google Anthos in Action

A Kubernetes security context is a pod or container specification field that controls identity, privilege, and filesystem security settings at runtime.

How it is used
Controls container identity and host-level privileges during Pod deployment.
How deep it goes
Defines user, group, filesystem-group, and privileged settings with runtime demonstrations, but defers cluster-wide enforcement to policy tools.
Examples
Uses busybox Pods, UID and group assignments, whoami and groups checks, and attempted host kernel changes.
What you can do after
Operate/configure Pods with nonroot identities and controlled privileges, then verify identity and host-operation behavior.

Read how Google Anthos in Action explains security context →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.