BTP Kyma Part 3: APIRules, Istio and Securing Workloads
Preview · a free account unlocks the full lesson
Secure Kyma workloads: APIRules with JWT validation against your identity provider, Istio sidecars and mutual TLS inside the cluster, authorization policies, network policies, secrets handling and namespace isolation — plus troubleshooting 401/403/503 errors.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 2 covered deploying a service on Kyma; this lesson covers securing it. APIRules are what expose a service externally and enforce access rules on it, such as validating a JWT against a specific issuer and JWKS URL. Those tokens typically come from IAS or XSUAA, and it's the issuer and audience in the token that get checked.
Istio sidecars, once injected, provide mutual TLS between services inside the mesh, and sidecar injection is controlled per namespace. On top of that, authorization policies and network policies restrict which workloads are allowed to talk to each other at all.
Secrets are supplied through service bindings rather than being stored directly in the workload, and namespaces are what isolate different teams and applications from each other. A specific failure mode worth knowing is that a missing sidecar — injection disabled for a namespace — can break mutual TLS communication and show up as 503 errors.
When troubleshooting, it helps to know the pattern: a 401 points to a token problem, a 403 points to a policy or scope problem, and a 503 points to an upstream or sidecar problem.
Decoding the JWT itself — checking its issuer, audience and scopes — resolves most 401 and 403 issues, since they're usually token mismatches rather than deep configuration bugs. A real risk is a noAuth rule left over from testing, since that publishes the API to the open internet.
In practice, this means creating an APIRule with JWT-based access, calling the service both with and without a token to confirm the difference, and then adding an AuthorizationPolicy between services — the goal being that only authenticated callers and explicitly allowed services can reach the workload.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.