index

A


access control

enforcing policies at API gateway with OPA 129-134

evaluating OPA policies 132-133

feeding OPA engine with access-control policies 131-132

feeding OPA engine with data 130-131

running OPA as Docker container 130

key components in 448-450

role-based access control

enforcing 325-328

improvements to since Istio 1.4.0 331-333

in Kubernetes 290-294

testing end-to-end flow with 328-330

using JWT as data source for 172-173

access delegation

OAuth 2.0-based

how OAuth 2.0 fixes problem 368-369

overview 21

overview 367-368

with credential sharing 375

access tokens 369, 371

request 43-44

response 44

scoped 50-51, 382

self-contained 382-383

access_token parameter 44, 76, 192, 313, 320, 330, 464

Access-Control-Allow-Credentials 92

Access-Control-Allow-Headers 92

Access-Control-Allow-Methods 92

Access-Control-Allow-Origin 92

Access-Control-Max-Age 92

Access-Control-Request-Headers 91-92

Access-Control-Request-Method 92

defining ACLs on Kafka 220-222

enabling ACLs on Kafka and identifying clients 219-220

active field 76

ALLOW action 332

allow.everyone.if.no.acl.found property 219

Alpine package manager (APK) 250

Amazon Elastic Compute Cloud (EC2) 8

Anchore 253

Angular 84-89

behind scenes of SPAs 85-89

building and running applications from source code 84-85

inspecting web application code 101-102

Apache Maven, downloading and installing 34

API contract security auditor 347

API Gateway pattern 80

API gateways 57-82

edge (entry point) security 64-67

consumer landscape of microservices 64

delegating access 65-66

reasons not to use basic authentication 66

reasons not to use mTLS 66-67

reasosn for using OAuth 2.0 67

API gateways (continued)

enforcing access-control policies with OPA 129-134

evaluating policies 132-133

feeding engine with access-control policies 131-132

feeding engine with data 130-131

running as Docker container 130

need for in microservices deployment 58-63

changes in security protocol 60-61

decoupling security from microservice 59-61

inherent complexities of deployments 62-63

rawness of microservices 63

scaling up microservice 61

proxying resource server with 93-95

role of in microservices deployment 19-20

service mesh vs. 541

Zuul

securing communication between Zuul and microservice 79-80

setting up gateway with 68-79

throttling at gateway with 110-122

API Manager, WSO2 348

APISecurity.io 347

apiVersion attribute 518

app key 504

application_id 373, 375-376

application_secret 373, 375-376

application.properties file 144, 268-269

applicationid 169, 176, 231, 266, 272, 282, 313, 330, 559, 566

applicationsecret 169, 176, 231, 266, 272, 282, 313, 330, 420, 559, 566

apply command 521

Aspen Mesh 540

assertion 386

asset management, improper 348

asynchronous actions 198

attestation 476

attribute assertions 386-387

aud attribute 163, 383, 389, 486

aud field 76

authentication

basic, reasons not to use 66

broken 344

edge (entry point) security 20-21

certificate-based authentication 21

OAuth 2.0-based access delegation 21

federated 104-107

building trust between domains 106-107

multiple trust domains 105-106

Istio

defining permissive authentication policy 310-311

enforcing JWT authentication 317-318

peer authentication and request authentication 321-323

testing end-to-end flow with JWT authentication 318-320

protection against spoofing 12-13

JWT 25

mTLS 24-25

trust-the-network approach 23-24

See also JWT (JSON Web Token)

authentication assertion 387

authentication See also JWT (JSON Web Token)

authorities attribute 331

authorization

broken

function-level authorization 346

object-level authorization 342-344

edge (entry point) security 22

OAuth 2.0

authorization code grant type 377-380

authorization server setup 39-44

enforcing security at Zuul gateway 76-77

role of authorization server 371

service-level authorization with scopes 50-54

throttling token and authorize endpoints 121

overview 18

service-to-service communication security 26-27

authorization assertion 387

authorization code 372

authorization code grant type 377-380

Authorization header 49, 66, 75

authorization server 96, 368

authorization_code 379

AuthorizationPolicy 332-333

authorizer.class.name property 219

authserver.introspection.endpoint property 72

authz directory 96

automation

dynamic analysis with OWASP ZAP 359-366

passive scanning vs. active scanning 359-360

performing penetration tests with ZAP 360-366

security testing with Jenkins 352-358

setting up and running 353-355

setting up build pipeline 355-358

static code analysis 349-352

automountServiceAccountToken element 290

autoscaling 503

availability 16-18

availableReplicas 519-520

AVI Networks 541

AWS App Mesh 540

Azure Container Registry (ACR) 422

Azure Container Service (ACS) 422

Azure Kubernetes Service (AKS) 422, 508

Azure Service Fabric 541

C


--cacert argument 259

Cambridge Analytica/Facebook scandal 21

cap_chown 251

Cascading Style Sheets (CSS) 362, 398

Center for Internet Security (CIS) 251

centralized PDP model 26

--cert parameter 259

certificate authority (CA) 79, 210, 213, 215, 258, 484

creating 140

creating with OpenSSL 470-472

certificate revocation lists (CRLs) 154-155

certificate-signing request (CSR) 152, 336, 472

certificates

certificate-based authentication 21

creating 140-142

creating certificate authority 140

generating keys for Inventory microservice 141

generating keys for Order Processing microservice 141

using single script to generate all keys 141-142

deploying TLS certificates to Istio ingress gateway 303-308

Ingress gateway with no SDS 303-305

Ingress gateway with SDS 306-308

east/west traffic security with 137-160

certificate creation 140-142

key management challenges 151-158

key rotation 159

key usage monitoring 159-160

mTLS 138-140, 149-151

TLS, securing microservices with 142-149

generating for NGINX server and Docker client 256-257

revocation of 153-158

certificate revocation lists 154-155

Online Certificate Status Protocol 155-156

Online Certificate Status Protocol stapling 156-157

short-lived certificates 157-158

chown operation 250

ciphertext attribute 394

Citadel component 333-335, 548

claims set 388, 391

Clair project 253

client credentials grant type 372-374

client streaming RPCs 498

client_credentials grant type 44, 46, 72, 76

ClientInterceptor 193

CLONE_NEWIPC flag 436

CLONE_NEWNET flag 436

CLONE_NEWNS flag 436

CLONE_NEWPID flag 435

CLONE_NEWUSER flag 436

CLONE_NEWUTS flag 436

Cloud Native Computing Foundation (CNCF) 127, 222, 406, 450

cluster-admin role 290

ClusterIP Service 504

ClusterIP type 285, 309, 528, 553, 562

ClusterRbacConfig 327-328, 551

ClusterRole objects 293-294

ClusterRoleBinding 290-292, 294, 331

CMD instruction 426

common name (CN) 147, 219, 470, 472

Community Edition (CE) version, of Docker 413-414

compact serialization 391

Compiled successfully message 85

confidentiality 14-16

data at rest 16

data in transit 15-16

ConfigMap objects 532-533

consuming from deployment and populating environment variables 533-534

consuming from deployment with volume mounts 534

creating for Order Processing microservice 280-281

configure method 103

CONNECTING state 497

Container Engine for Kubernetes 509

Container Network Model (CNM) 443

container orchestration framework 230, 499

container runtime 500

container runtime interface (CRI) 528

container security 260

ContainerConfig element 249

containers 409, 416-417, 427, 442, 499

continuous delivery (CD) 153

continuous integration/continuous delivery pipeline (CI/CD) 151, 229, 253, 353, 466

control plane

Istio 546-548

changes to Kubernetes cluster 551-552

Citadel 548

Galley 548

Mixer 548

Pilot 547

overview 540

CORS (cross-origin resource sharing) 89-95

inspecting source 92-93

overview 91-92

proxying resource server with API gateways 93-95

same-origin policy vs. 89-91

CounterCache 117

-cp argument 392, 395

Created status 429

credential sharing 367

CRL distribution point 154

CRL Sign 485

cross-site scripting (XSS) 364-365, 400

@CrossOrigin annotation 92-93

curl command 36, 143, 145, 148, 168, 171, 174, 217, 236, 246-247, 266, 282, 285, 373-374, 376, 420, 439, 457-458, 460, 515, 522-523, 560

curl, downloading and installing 34

custom resource definitions (CRDs) 551

PeerAUthentication 321-322

RequestAuthentication 322-323

Customer message 491

Customer microservice 490

Customer object 490

Customize Jenkins page 354

D


-d flag 439

data element 268, 275, 277, 280

data exposure, excessive 345

data plane

Istio 542-546

Egress gateway 546

Ingress gateway 545-546

overview 539-540

DCT (Docker Content Trust) 237-244

generating keys 238-239

overview 238

protecting client applications from replay attacks 243-244

signature verification with 241

signing with 240-241

types of keys used in 241-243

Update Framework 237

default namespace 298, 310, 515, 557

default token secret 275

delegation keys 238, 243

delete command 512-513

DELETE method 352

Delivery microservice 166, 547

denial-of-service (DoS) 17-18

DENY action 332

DestinationRule 316, 475

deststorepass argument 473

detached mode 438

developing microservices 33-39

clone samples repository 34

required software 34

Apache Maven 34

curl 34

GIT command-line tool 34

JDK 34

source code

directory 37

overview 38-39

distinguished name (DN) 219

distributed denial-of-service (DDoS) 17-18, 112, 121, 345-346

Docker 409-447

behind scenes of docker run 437-438

Docker registry 420-422

Docker cloud platforms and registries 422

Docker Hub 421

Harbor 421

high-level architecture 415-416

inspecting traffic between Docker client and host 438-440

installing 413-414

internal architecture 434-437

containerd 435

containerd-shim 435

Linux cgroups 436-437

Linux namespaces 435-436

runc 435

Moby project 447

networking 443-447

bridge networking 445-446

host networking 446

networking in Docker production deployment 447

no networking 446

overview 409-413

publishing to Docker Hub 422-423

running on non-Linux operating systems 413

Docker Bench 251-253

Docker Bench for Security 253

docker build command 426

docker command 423

Docker Compose 440-441

Docker containers 229-261

adding value to Linux containers 411

considering security beyond 260

container name and container ID 420

containerizing applications 416-420

building application 417

building Docker images 418-419

creating Dockerfile 417-418

Docker images 417

running container from Docker images 419-420

containers prior to Docker 410-411

deploying OPA as 452

Docker Content Trust 237-244

generating keys 238-239

overview 238

protecting client applications from replay attacks 243-244

signature verification with 241

signing with 240-241

types of keys used in 241-243

Update Framework 237

life cycle 428-431

create container from an image 428-429

destroy container 431

kill container 430-431

pause running container 429-430

start container 429

stop running container 430

managing secrets in 231-237

externalizing secrets from Docker images 233-235

managing secrets in Docker production deployment 237

passing secrets as environment variables 235-236

persisting runtime data of 431-433

using bind mounts to persist runtime data 433

using Docker volumes to persist runtime data 432-433

running Docker Bench for security 251-253

running OPA as 130

running with limited privileges 247-251

dropping capabilities from root user 250-251

running container with nonroot user 248-249

securing access to Docker host 253-260

enabling mTLS at NGINX server to secure access to Docker APIs 256-260

enabling remote access to Docker daemon 254-256

virtual machines vs. containers 411-413

docker create command 428

Docker daemon 416

Docker Desktop 508

Docker Hub 416

Docker images

building 418-419

deleting images 431

externalizing secrets from 233-235

image layers 426-427

image name and image ID 423-426

Docker Hub official and unofficial images 425

Docker images with no tags (or latest tag) 423-424

Docker images with tag 424

image ID 425-426

pulling an image with image ID 426

working with third-party Docker registries 424

overview 417

running containers from 419-420

signing and verifying 237-244

generating keys 238-239

overview of DCT 238

protecting client applications from replay attacks 243-244

signature verification with DCT 241

signing with DCT 240-241

types of keys used in DCT 241-243

Update Framework 237

docker inspect command 249

docker kill command 430-431

docker login command 239

docker pause command 429-430

docker pull tomcat command 424

docker rename command 420

docker rm command 431

docker run command 142, 211, 232, 235-236, 248, 251, 257, 268, 415, 419-420, 424, 428, 433, 437-438, 446, 471

docker save command 425

docker service create command 442

docker start command 429

docker stop command 430-431

Docker Swarm 441-443

docker trust key generate command 238

Docker Trusted Registry (DTR) 421

DOCKER_CONTENT_TRUST variable 241

DOCKER_HOST variable 259

docker-compose up command 440

docker-for-desktop-binding 292

dynamic analysis, with OWASP ZAP 359-366

passive scanning vs. active scanning 359-360

penetration tests 360-366

Dynamic Client Registration Protocol 40

E


east/west traffic security over gRPC 179-195

service-to-service communications over gRPC 180-185

with JWT 190-194

with mTLS 185-190

east/west traffic security with certificates 137-160

certificate creation 140-142

creating certificate authority 140

generating keys for Inventory microservice 141

generating keys for Order Processing microservice 141

using single script to generate all keys 141-142

key management challenges 151-158

certificate revocation 153-158

key provisioning and bootstrapping trust 151-153

key rotation 159

key usage monitoring 159-160

mTLS

engaging 149-151

reasons for using 138-140

TLS, securing microservices with 142-149

running Inventory microservice over TLS 145-146

running Order Processing microservice over TLS 143-145

securing communication between two microservices with TLS 146-149

east/west traffic security with JSON Web Token (JWT) 161-178

exchanging JWT for new one with new audience 175-177

securing microservices with JWT 170-172

securing service-to-service communication with JWT 173-175

use cases for 162-168

nested JWTs 167-168

self-issued JWTs 166-167

sharing user context between microservices in different trust domains 165-166

sharing user context between microservices with shared JWT 162-163

sharing user context with new JWT for each service-to-service interaction 163-165

using JWT as data source for access control 172-173

edge (entry point) security 18-22, 64-67

authentication 20-21

certificate-based 21

OAuth 2.0-based access delegation 21

authorization 22

consumer landscape of microservices 64

delegating access 65-66

passing user context to upstream microservices 22

reason for using OAuth 2.0 67

reasons not to use basic authentication 66

reasons not to use mTLS 66-67

role of API gateway in deployment 19-20

Egress gateway 546

Elastic Container Registry (ECR), Amazon 422

Elastic Container Service (ECS), Amazon 422

Elastic Container Service for Kubernetes (EKS) 508

embedded PDPs 26

embedded service mesh 537

emptyDir volume 274

@EnableWebSecurity annotation 47

Enterprise Edition (EE) version, of Docker 413-414

entry points 5

ENTRYPOINT instruction 426

--env argument 531

ENV instruction 426

Envoy 468, 475

debugging proxy 567-568

sidecar proxy 558-559

error filter 75

EventRateLimit plugin 527

exit command 142

Exited status 430

exp attribute 384, 390, 486

expires_in 44

EXPOSE instruction 426

Extended Key Usage property 485

eXtensible Access Control Markup Language (XACML) 469

I


iat attribute 384, 390

IBM Cloud Container Registry 422

IBM Cloud Kubernetes Service 422, 509

id command 248

ID token 383-384

id-kp-clientAuth value 485

id-kp-serverAuth value 485

IDLE state 497

imperative command 519

implicit grant type 380-382

import statements 352

in-process service mesh 537

Ingress gateway 545-546

deploying TLS certificates to 303-308

with no SDS 303-305

with SDS 306-308

enabling TLS termination at 302-314

defining permissive authentication policy 310-311

deploying certificates 303-308

deploying VirtualServices 308-310

testing end-to-end flow 311-314

Ingress object 525-526

INGRESS_HOST variable 312, 318, 565

INGRESS_HTTPS_PORT variable 312, 318, 329, 565

injection 347-348

input.external package 463

insecure-sts container 248, 250, 267

Install Suggested Plugins option 354

installationName parameter 357

integrity 13-14

interceptCall method 193-194

Internet Assigned Numbers Authority (IANA) 389

--ipc argument 436

IPC namespace 436

iptables rules 558

isLoggedIn function 102

iss attribute 383, 389

Istio 296-338

architecture 542-549

changes introduced since 1.5.0 release 548-549

control plane 546-548

data plane 542-546

changes to Kubernetes cluster 550-555

control plane components 551-552

custom resource definitions 551

istio-ingressgateway Pod 554-555

istio-ingressgateway service 553-554

istio-system namespace 551

MeshPolicy 555

enabling TLS termination at ingress gateway 302-314

defining permissive authentication policy 310-311

deploying certificates 303-308

deploying VirtualServices 308-310

testing end-to-end flow 311-314

engaging to STS and Order Processing microservices 556-557

Envoy sidecar proxy 558-559

setting up iptables rules 558

sidecar auto injection 557-558

integration with OPA 467-468

key provisioning and rotation 333-337

via volume mounts 333-335

with SDS 335-337

overview 541

role-based access control 324-333

enforcing 325-328

improvements to since Istio 1.4.0 331-333

testing end-to-end flow with 328-330

running end-to-end sample 559-561

securing service-to-service communications with JWT 317-325

enforcing JWT authentication 317-318

JSON Web Key 324

peer authentication and request authentication 321-323

testing end-to-end flow with JWT authentication 318-320

using JWT in service-to-service communications 323-324

securing service-to-service communications with mTLS 314-317

setting up Kubernetes deployment 297-302, 555-556

cleaning up any previous work 299

deploying microservices 299-300

enabling Istio autoinjection 298-299

testing end-to-end flow 301-302

setting up on Kubernetes 549-550

limitations of Istio on GKE 550

setting up Istio on Docker Desktop 549

setting up Istio on GKE 549-550

vs. SPIRE 475

Istio Egress gateway 546

Istio Ingress gateway 546, 561

ISTIO_MUTUAL mode 306, 475

istio-citadel 552

istio-galley 552

istio-ingressgateway 318, 552, 554, 563

istio-ingressgateway Pod 554-555

istio-ingressgateway service 553-554

istio-ingressgateway-certs 303-304

istio-injection 557

istio-pilot 552

istio-policy 552

istio-proxy 567

istio-sidecar-injector 552

istio-system namespace 303, 305, 307, 335, 551

istio-telemetry 552

istioctl command-line utility 307

J


Jails 410

Java Database Connectivity (JDBC) 140

Java Development Kit (JDK), downloading and installing 34

Java KeyStore (JKS) 473

Java Platform, Enterprise Edition (Java EE) 5

Java Virtual Machine (JVM) 7

JavaScript Object Notation (JSON) 398

javax.net.ssl.trustStore property 147, 149

JDBC (Java Database Connectivity) 140

Jenkins 352-358

setting up and running 353-355

setting up build pipeline 355-358

Jenkinsfile 353

JSON Object Signing and Encryption (JOSE) 388

JSON serialization 391

JSON Web Encryption (JWE) 393-396

JSON Web Key (JWK) 324

JSON Web Key Set (JWKS) 487

JSON Web Signature (JWS) 77, 383, 388, 390-392, 485

jti attribute 390

jvm_memory_max_bytes 124

jvm_memory_used_bytes 125

JWT (JSON Web Token) 11, 153, 225, 247, 276, 301, 386-396, 416, 560

east/west traffic security with 161-178

exchanging JWT for new one with new audience 175-177

securing microservices with JWT 170-172

securing service-to-service communications with JWT 173-175

use cases for 162-168

using JWT as data source for access control 172-173

inner workings of 388-390

audience 389-390

expiration 390

identifier 390

issued time 390

issuer 389

nbf (not before) attribute 390

subject 389

JSON Web Encryption 393-396

JSON Web Signature 390-392

nested 167-168

OPA and 464-466

overview 386-388

securing service-to-service communications with 317-324

enforcing JWT authentication 317-318

gRPC 190-194

JSON Web Key 324

peer authentication and request authentication 321-323

testing end-to-end flow with JWT authentication 318-320

using JWT in service-to-service communications 323-324

self-issued 166-167

service-to-service communication security 25

JWT bearer grant type 107

JWT grant 344

JWT profile 107

JWT Profile for OAuth 2.0 Client Authentication and Authorization Grants 372

JWT Signing Request (JSR) 482

jwt_access_token 174, 246

jwt_token_value 192

JWT-SVID format 485-486

JWT.IO 276, 324

jwt.jks file 268, 273

JWTClientInterceptor class 194

K


-k option 259

Kafka

defining 220-222

enabling 219-220

configuring TLS on server 212

developing microservice to read events from topic 207-210

integration with OPA 469

setting up as message broker 202-205

kernel-level permission checks 247

--key argument 239

Key Cert Sign 485

--key parameter 259

Key Usage property 484

key-value pairs 497

keys

certificate revocation 153-158

generating for NGINX server and Docker client 256-257

generating with OpenSSL 472-473

in Docker Content Trust 238-239, 241-243

Istio 333-337

key provisioning and rotation via volume mounts 333-335

key provisioning and rotation with SDS 335-337

limitations in key provisioning and rotation via volume mounts 335

long-lived credential generation 153

management challenges 151-158

provisioning

at enterprise level 152

at Netflix 152-153

bootstrapping trust and 151-153

rotation of 159

SPIFFE 153

usage monitoring 159-160

using single script to generate all 141-142

KEYSTORE_PASSWORD key 270

KEYSTORE_SECRET variable 268

kind attribute 518

kube-proxy 500, 529-530

kube-system namespace 517

kubectl apply command 264, 532

kubectl command 270, 272, 274, 281-282, 287, 502, 516-517, 553, 557

kubectl describe command 264

kubectl describe pod command 289

kubectl get command 512-513

kubectl get deployments command 264

kubectl get events command 264

kubectl get pods 264

kubectl get service command 529

kubectl get services command 272

kubectl logs 264

kubectl run command 512

kubectl tool

creating ConfigMap objects 270

installing 510

internal communication 526-528

Kubernetes 262-295, 499-534

API server 522-523

as service 508-509

configuration management 530-534

ConfigMaps 532-534

hardcoding configuration data in deployment definition 531-532

constructs 501-508

controllers 524-525

deployments

creating 511-513

inner workings of 513-514

overview 507

scaling 516

Google Kubernetes Engine 509-511

creating clusters 510-511

deleting clusters 511

installing gcloud 509-510

installing kubectl tool 510

setting up default setting for gcloud 510

switching between multiple clusters 511

high-level architecture 499-500

master nodes 500

worker nodes 500

Ingress object 525-526

integration with OPA 468-469

internal communication 526-530

kubectl tool 526-528

routing requests from external clients to Pods 528-530

Istio and

changes to cluster 550-555

setting up Istio 549-550

setting up Kubernetes deployment 555-556

Minikube and Docker Desktop 508

namespaces

creating 517-518

overview 507-508

switching 518

nodes 502

objects 518-521

declarative object configurations 521

imperative object configurations 520-521

managing 520-521

resources 524

role-based access control in 290-294

associating service account with ClusterRole 293-294

talking to Kubernetes API server from STS 292-293

running Inventory microservice in 284-286

running Order Processing microservice in 278-283

creating ConfigMaps/Secrets for Order Processing microservice 280-281

creating deployment for Order Processing microservice 281

creating Service for Order Processing microservice 282

testing end-to-end flow 282-283

running STS on 263-267

creating STS deployment 263-264

defining deployment for STS in YAML 263

exposing STS outside Kubernetes cluster 265-267

troubleshooting deployment 264-265

service accounts 287-290

benefits of running Pod under custom service account 289-290

creating service account and associating it with Pod 288-289

services

ClusterIP Service 504

creating 514-515

inner workings of 515-516

LoadBalancer Service 506-507

NodePort Service 505-506

overview 503-507

setting up deployment for Istio 297-302

cleaning up any previous work 299

deploying microservices 299-300

enabling Istio autoinjection 298-299

redeploying Order Processing and STS as NodePort Services 300

testing end-to-end flow 301-302

Kubernetes LoadBalancer Service 506

Kubernetes Secrets 267-278

ConfigMap objects

consuming from deployment 271-272

creating by using kubectl client 270

defining for application.properties file 268-269

defining for keystore credentials 270

defining for keystore.jks and jwt.jks files 269

using to externalize configurations 268

creating for Order Processing microservice 280-281

exploring default token secret in every container 275-276

how Kubernetes stores 278

loading keystores with init containers 272-274

updating STS to use 276-278

Kubernetes Stack Overflow channel 265

kubeval 264

N


--name argument 246, 420, 553

--namespace argument 517-518

NATS 222-225

nbf attribute 390

nested JWTs 167-168

--net argument 246

NET namespace 436

Netflix 19, 67-68

key provisioning 152-153

short-lived certificates and 157-158

Netflix’s Security Monkey 347

network argument 443, 446

Network Information Service (NIS) 436

network-accessible functions 37

ng serve command 85, 94

NGINX servers, enabling mTLS at 256-260

configuring Docker client to talk to secured Docker daemon 259-260

generating keys and certificates for NGINX server and Docker client 256-257

protecting NGINX server with mTLS 257-259

NGRESS_HOST variable 328

Nimbus Java library 395

no credential-sharing model 367-368

node agent 478

node attester 479-480

NodePort Service 505-506

nodePort type 553

nodes 441

none value 446

nonrepudiation 14

north/south traffic security 57-82

edge (entry point) security 64-67

consumer landscape of microservices 64

delegating access 65-66

reasons not to use basic authentication 66

reasons not to use mTLS 66-67

reasosn for using OAuth 2.0 67

need for API gateways in microservices deployment 58-63

decoupling security from microservice 59-61

inherent complexities of microservice deployments 62-63

rawness of microservices 63

securing communication between Zuul and microservice 79-80

preventing access through firewall 79-80

securing communication between API gateway and microservices using mutual TLS 80

setting up API gateways with Zuul 68-79

compiling and running Order Processing microservice 68-69

compiling and running Zuul proxy 69-70

enforcing OAuth 2.0-based security at Zuul gateway 71-79

Notary 237

O


OAuth 2.0 45-48, 367-385

access delegation 21

how OAuth 2.0 fixes problem 368-369

overview 367-368

actors in flow 369-371

role of authorization server 371

role of client application 371

role of resource owner (or end user) 371

role of resource server 370-371

authorization server setup 39-44

access token request 43-44

access token response 44

interactions with server 39-41

running server 42-43

edge (entry point) security 67

enforcing security at Zuul gateway 71-79

enforcing token validation 74-75

OAuth2.0 token introspection profile 76

pitfalls of self-validating tokens 78-79

self-validation of tokens without integrating with an authorization server 76-77

grant types 371-382

authorization code grant type 377-380

client credentials grant type 372-374

implicit grant type 380-382

refresh token grant type 376-377

resource owner password grant type 374-375

invoking secured microservice from client application 48-50

resources for 384-385

running sample 46-48

scopes 382

security based on 45-46

self-contained access tokens 382-383

service-level authorization with scopes 50-54

obtaining scoped access token 50-51

protecting access to microservice 52-54

throttling token and authorize endpoints 121

OAuth 2.0 Security Best Current Practice document 344

OAuth 2.0 Threat Model and Security Considerations document 344

object-level authorization, broken 342-344

observability (monitoring and analytics) 401-408

insufficient 348-349

need for 401-403

pillars of 403-408

logging 407-408

metrics 403-404

tracing 404-406

visualization 408

with Prometheus and Grafana 122-129

defining metric in Prometheus 128-129

monitoring Order Processing microservice 123-127

scraping data from microservices 127

time-series data 128

OCSP (Online Certificate Status Protocol)

overview 155-156

stapling

overview 156-157

requiring 157

OFF mode 328

offline key 242

ON mode 328

ON_WITH_EXCLUSION mode 328

ON_WITH_INCLUSION mode 328

one-time passcode (OTP) 13

one-to-one mapping 164

OPA (Open Policy Agent) 448-469

alternatives to 469

deploying as Docker container 452

enforcing access-control policies at API gateways with 129-134

evaluating policies 132-133

feeding engine with access-control policies 131-132

feeding engine with data 130-131

running as Docker container 130

external data 458-466

bundle API 466

JWT 464-466

loading data from filesystem 461-462

overload 462-464

pull data during evaluation 466

push data 459-460

high-level architecture 450-451

integrations 466-469

Istio 467-468

Kafka 469

Kubernetes admission controller 468-469

key components in access control systems 448-450

overview 450

policies 455-458

protecting and deploying OPA servers with mTLS 453-455

OPA Gatekeeper 469

opaque token 104, 107

Open Container Initiative (OCI) 435

Open Web Application Security Project (OWASP) 342, 359-360

OpenCensus 406

OpenID Connect 95-103

inspecting Angular web application code 101-102

inspecting authorization server code 103

inspecting resource server code 103

login flow 96-100

overview 383-384

resources for 384-385

openid scope 384

OpenShift Container Platform (OCP) 422, 509

OpenShift Container Registry (OCR) 422

OpenSSL 140, 210-211, 256, 303

creating certificate authority 470-472

generating keys for an application 472-473

OpenTelemetry 406

OpenTracing 406

Operation 218

operation-level throttling 120

Oracle Container Registry 422

Organization for the Advancement of Structured Information Standards (OASIS) 469

Origin header 92

-out argument 471

out-of-process service mesh 297, 537

OWASP API Security vulnerabilities 342-349

broken authentication 344

broken function-level authorization 346

broken object-level authorization 342-344

excessive data exposure 345

improper asset management 348

injection 347-348

insufficient logging and monitoring 348-349

OWASP API Security vulnerabilities (continued)

lack of resources and rate limiting 345-346

mass assignment 346-347

security misconfigurations 347

OWASP ZAP 359-366

passive scanning vs. active scanning 359-360

penetration tests 360-366

P


-p argument 419

partitioned process ID (PID) namespace 435

-passout argument 471

pay method 351

payload parameter 388, 391

Payment microservice 201

peer.authz.policy.yaml 333

PeerAUthentication CRD 321-322

PEM Converter Online 324

penetration tests 360-366

permissions 325

PersistentVolume 508

PhoneNumber message 491

--pid argument 435

Pilot component 547

Pipeline tab 356

PKS (Pivotal Container Service) 422, 509

Pods

benefits of running under custom service account 289-290

creating service accounts and associating them with 288-289

istio-ingressgateway 554-555

routing requests from external clients to 528-530

policy administration point (PAP) 26, 448, 540

policy decision point (PDP) 26, 449, 548

policy enforcement point (PEP) 448, 539

policy information point (PIP) 449

policy subcomponent 548

port argument 512

ports array 553

POST method 38, 63, 151, 286, 301, 347, 352

post-request filter 75

@PostMapping annotation 38

prabath ID 422-423

prabath.pub 239

pre string 75

preflight request 91

PreparedStatement construct 348

prerequest filter 75

Principal 218

private key file 554

privilege-based throttling 121-122

privileged processes 247

Process Containers 410

process_start_time_seconds 124

Products microservice 403, 405

Prometheus 122-129

defining metrics 128-129

monitoring Order Processing microservice 123-127

scraping data from microservices 127

time-series data 128

promsd Service 552

protected attribute 391

proto3 490

Protobuf (Protocol Buffers) 490-492, 543

protocol translation 543

proxy_init container 559

proxy_init image 558

public key infrastructure (PKI) 477

public-key encryption 16

publish method 207

pull command 238, 241

pull model 10

push command 238, 241

R


rate limiting 345-346

RBAC (role-based access control)

enforcing 325-328

improvements to since Istio 1.4.0 331-333

in Kubernetes 290-294

associating service account with ClusterRole 293-294

talking to Kubernetes API server from STS 292-293

testing end-to-end flow with 328-330

reactive microservices 196-225

Kafka as message broker 202-205

developing microservice to read events from topic 207-210

mTLS for authentication 214-217

NATS as message broker 222-225

overview 197-201

TLS to protect data in transit 210-214

configuring TLS on Kafka server 212

configuring TLS on microservices 212-214

read scope 44, 50-51, 53

READY state 497

Red Hat Enterprise Linux 260

Red Hat OpenShift 260

Red Hat OpenShift Service Mesh 541

redirect_uri parameter 378, 380-381

reference token 104, 382

refresh token 76, 372, 375

refresh token grant type 376-377

Rego 131, 455

replay attacks, protecting client applications from 243-244

replicas argument 442-443

ReplicaSet 513

ReplicationSet controller 528

Report URI Decode PEM Data tool 334

Report URI PEM decoder 276

repositories 420

repository keys 239

RequestAuthentication CRD 322-323

@RequestBody annotation 38

@RequestMapping annotation 38

RequestMethod class 352

--resolve parameter 259, 313, 319, 330, 566-567

Resource 219

resource owner 368

resource owner password 372

resource owner password grant type 374-375

resource server 84, 95, 105, 368

ResourcePattern 219

ResourceServerTokenServices 47

response_type parameter 98, 378, 381

@RestController annotation 38

--rm argument 432

Role object 290

RoleBinding 290

root key 239, 242-243

route filter 75

RPCs (remote procedure calls) 497-498

bidirectional streaming RPCs 498

channels 497

client streaming RPCs 498

request metadata 497

server streaming RPCs 498

unary RPCs 497

See also gRPC

S


same-origin policy vs. CORS 89-91

SAML grant 344

SAML Profile for OAuth 2.0 Client Authentication and Authorization Grants 372

SAN (Subject Alternate Name) 483

scaling 110-111

scope attribute 172

scope field 76

scope parameter 381

scopes 50-54

binding capabilities to OAuth 2.0 access tokens 382

obtaining scoped access token 50-51

protecting access to microservice 52-54

SDS (Secret Discovery Service)

deploying TLS certificates to Istio Ingress gateway

with no SDS 303-305

with SDS 306-308

key provisioning and rotation with 335-337

secure-sts container 274

securing microservices 3-54

challenges of 7-11

broader attack surface and higher risk of attack 7-8

deployment complexities and bootstrapping trust 8-9

distributed nature and sharing user context 11

distributed security screening and poor performance 8

immutability of containers and maintainance of service credentials and access-control policies 10-11

polyglot architecture and development team expertise 11

requests spanning multiple microservices and tracing difficulty 9-10

developing microservices 33-39

edge (entry point) security 18-22

authentication 20-21

authorization 22

passing user context to upstream microservices 22

role of API gateway in deployment 19-20

fundamentals of 12-18

authentication 12-13

authorization 18

availability 16-18

confidentiality 14-16

integrity 13-14

nonrepudiation 14

securing microservices (continued)

north/south traffic security with API gateways 57-82

OAuth 2.0 45-48

authentication server setup 39-44

invoking secured microservice from client application 48-50

running sample 46-48

security based on 45-46

service-level authorization with scopes 50-54

reactive microservices 196-225

Kafka as message broker 202-210

mTLS for authentication 214-217

NATS as message broker 222-225

overview 197-201

TLS to protect data in transit 210-214

service-to-service communication security 22-31

authorization 26-27

crossing trust boundaries 28-31

propagating user context between microservices 27-28

single-page applications for invoking secured microservices 83-108

securing microservices on Kubernetes 262-295

Kubernetes Secrets 274-278

exploring default token secret in every container 275-276

how Kubernetes stores Secrets 278

updating STS to use 276-278

managing secrets in Kubernetes environment 267-274

consuming ConfigMaps from deployment 271-272

creating ConfigMaps by using kubectl client 270

defining ConfigMap for application.properties file 268-269

defining ConfigMap for keystore credentials 270

defining ConfigMaps for keystore.jks and jwt.jks files 269

loading keystores with init containers 272-274

using ConfigMap to externalize configurations in Kubernetes 268

role-based access control 290-294

associating service account with ClusterRole 293-294

talking to Kubernetes API server from STS 292-293

running Inventory microservice 284-286

running Order Processing microservice 278-283

creating ConfigMaps/Secrets 280-281

creating deployment 281

creating service 282

testing end-to-end flow 282-283

running STS on Kubernetes 263-267

creating STS deployment in Kubernetes 263-264

defining deployment for STS in YAML 263

exposing STS outside Kubernetes cluster 265-267

troubleshooting deployment 264-265

service accounts 287-290

benefits of running Pod under custom service account 289-290

creating and associating with Pod 288-289

securing microservices with Istio 296-338

enabling TLS termination at Istio Ingress gateway 302-314

defining permissive authentication policy 310-311

deploying certificates 303-308

deploying VirtualServices 308-310

testing end-to-end flow 311-314

key management 333-337

key provisioning and rotation via volume mounts 333-335

key provisioning and rotation with SDS 335-337

role-based access control 324-333

enforcing 325-328

improvements to since Istio 1.4.0 331-333

testing end-to-end flow with 328-330

securing service-to-service communications with JWT 317-325

enforcing JWT authentication 317-318

JSON Web Key 324

peer authentication and request authentication 321-323

testing end-to-end flow with JWT authentication 318-320

using JWT in service-to-service communications 323-324

securing service-to-service communications with mTLS 314-317

setting up Kubernetes deployment 297-302

cleaning up any previous work 299

deploying microservices 299-300

enabling Istio autoinjection 298-299

redeploying Order Processing and STS as NodePort Services 300

testing end-to-end flow 301-302

self-issued JWTs 166-167

selfLink attribute 524

server streaming RPCs 498

server-start-successful message 69

server.port property 36, 43, 144-145

server.ssl.key-store property 213

server.ssl.key-store-password property 213

ServerInterceptor 194

serverIP 489

serverPort 489

Service 265, 442, 503-505, 530

service mesh 538-541

API gateway vs. 541

architecture 539-540

control plane 540

data plane 539-540

implementations 540-541

reasons for using 536-537

See also Istio

Service Mesh pattern 58, 80, 230

service-to-service communication security 22-31

JWT 25

mTLS 24-25

trust-the-network approach 23-24

authorization 26-27

crossing trust boundaries 28-31

gRPC

overview 180-185

securing with mTLS 185-190

propagating user context between microservices 27-28

with JWT 173-175, 317-324

enforcing authentication 317-318

JSON Web Key 324

peer authentication and request authentication 321-323

testing end-to-end flow 318-320

using in service-to-service communications 323-324

with mTLS 314-317

serviceAccountName element 289

ServiceRole 325, 328, 551

ServiceRoleBinding 326, 328, 331, 551

servlet filter 5

setCheckTokenEndpointUrl method 48

setEnvironment method 147, 149-150

setName function 491

setns system 435

share system 435

Shipping microservice 489

short-lived certificates 157-158

short-lived JWTs 78

shouldFilter method 117

SHUTDOWN state 497

SIGKILL signal 430

signatures array 391

signed JWT 383

SIGSTOP signal 429

SIGTERM signal 430

Simple Mail Transfer Protocol (SMTP) 140

single responsibility principle (SRP) 59, 536

Skylake platform 510

snapshot key 243

socat 255-256

Software Guard Extensions (SGX) 157

software-defined networking (SDN) 260

Solaris Containers 410

Solaris Zones 410

SonarQube 349-351, 354, 357-358

SonarScanner 354

SPAs (single-page applications) 84-108, 397

cross-origin resource sharing 89-95

inspecting source 92-93

overview 91-92

proxying resource server with API gateways 93-95

same-origin policy vs. 89-91

federated authentication 104-107

building trust between domains 106-107

multiple trust domains 105-106

MPAs vs.

drawbacks 400

running with Angular 84-89

behind scenes of SPAs 85-89

from source code 84-85

securing with OpenID Connect 95-103

inspecting Angular web application code 101-102

inspecting authorization server code 103

inspecting resource server code 103

login flow 96-100

spec attribute 518, 524

spec element 289

SPIFFE (Secure Production Identity Framework for Everyone) 153, 474-487

inspiration behind 477

overview 475-477

SPIFFE ID 477-478

SPIFFE Runtime Environment 478-483

SPIFFE Verifiable Identity Document 483-486

JWT-SVID 485-486

X.509-SVID 483-485

trust bundle 486-487

Spinnaker 466

SPIRE (SPIFFE Runtime Environment) 153, 475, 478-483

Spring Boot 142

Spring Boot gRPC module 491

Spring Boot Maven plugin 143

SPRING_CONFIG_LOCATION variable 234, 267

spring-boot plugin 35, 46

SpringApplication class 39

@SpringBootApplication annotation 39

SQL (Structured Query Language) 347, 360

SQLite 466

srcstorepass argument 473

SRP (single responsibility principle) 59, 536

ssl_certificate parameter 257

ssl_certificate_key 258

ssl_client_certificate parameter 258

ssl_verify_client 258

ssl.client.auth 216

ssl.endpoint.identification.algorithm property 213

ssl.principal.mapping.rules property 219-220

ssl.truststore.location property 216

sslContext 189

static code analysis 349-352

status attribute 518

STRICT mode 321

stringData element 277

Structured Query Language (SQL) 347, 360

sts-deployment 557

sts-service 266, 300, 564

sts.ecomm.com 319, 330

STSs (security token services)

engaging Isto to 556-557

Envoy sidecar proxy 558-559

setting up iptables rules 558

sidecar auto injection 557-558

redeploying as NodePort Services 300

running on Kubernetes 263-267

creating STS deployment 263-264

defining deployment for STS in YAML 263

exposing STS outside Kubernetes cluster 265-267

talking to Kubernetes API server from STS 292-293

troubleshooting deployment 264-265

updating microservice with Istio configurations

creating VirtualService resource 564

redeploying STS 562-563

updating to use Kubernetes Secrets 276-278

Stubby 488

sub attribute 383, 389, 486

-subj argument 472

Subject Alternate Name (SAN) 483

Subject Alternative Names attribute 334-335, 337

subject_token argument 177

subject_token_type argument 177

SVID (SPIFFE Verifiable Identity Document) 483-486

JWT-SVID 485-486

X.509-SVID 483-485

symmetric-key encryption 16

synchronous actions 198

T


-t option 418

tags 423

target key 239, 243

targetPort type 554

tasks 442

TCP connection 492-495

TCP sockets 254, 415

telemetry subcomponent, Mixer 548

Terraform 466

The Update Framework (TUF) 237

throttling, at API gateway with Zuul 110-122

fair usage policy 113-114

maximum handling capacity 118-119

operation-level throttling 120

privilege-based throttling 121-122

quota-based 111-118

throttling OAuth 2.0 token and authorize endpoints 121

time-series data 128

timestamp key 243

TLS (Transport Layer Security) 142-149

enabling termination at Ingress gateway 302-314

defining permissive authentication policy 310-311

deploying certificates 303-308

deploying VirtualServices 308-310

testing end-to-end flow 311-314

reactive microservices 210-214

configuring TLS on Kafka server 212

configuring TLS on microservices 212-214

securing communication between two micro- services with TLS 146-149

TLS bridging 15

tls mode 475

TLS tunneling 15

tlscert argument 259

tlskey argument 259

tlsverify argument 259

token parameter 464

token validation

enforcing 74-75

OAuth2.0 token introspection profile 76

self-validation

pitfalls of 78-79

without integrating with authorization server 76-77

TOKEN variable 171, 174, 177, 283, 293, 313, 320, 330, 567

token_type field 44, 76

token-based authentication 455

TokenEndpointURL property 48

tokenServices method 47

topics vs. queues 200

traces 407

tracing 9, 159

TRANSIENT_FAILURE state 497

transport protocol 490

trust bundle 486-487

trust domains

crossing trust boundaries in service-to-service communication security 28-31

federated authentication

building trust between domains 106-107

multiple trust domains 105-106

sharing user context between microservices in different trust domains 165-166

trust-the-network approach 23-24

trustCertCollectionFilePath 190

Trusted Platform Module (TPM) 157, 159

type-2 hyperviso 411

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.234.62