Shared posts

22 Oct 13:32

La confesión de Trump ¿Quien manda en la casa blanca?

by Free_palestine

No todos los días un presidente estadounidense da tantos detalles sobre el sometimiento de la Casa Blanca ante Tel Aviv. Y Trump lo hizo en el Parlamento israelí, ni más ni menos

etiquetas: trump, confesión, tel aviv, sheldon

» noticia original (www.youtube.com)

22 Oct 12:28

The Hidden Cost of Telemetry at Scale | Mukta Aphale | SREday Chennai 2025 Q4

by SREday

SREday Chennai 2025 Q4 - October 11 2025
Grab your ticket for the next SREday: https://www.sreday.com
Upcoming SREday CFPs: https://www.papercall.io/events?cfps-scope=&keywords=sreday

Chapters
00:00 Introduction and Speaker Background
01:14 Understanding Telemetry and Open Telemetry
03:32 The Cost of Observability
06:03 Hidden Costs and Cost Paradox
08:19 Optimizing Observability Costs
14:22 Cost Reduction Strategies
15:16 Pre-Aggregation Techniques
18:06 Sampling Methods
21:52 Edge Filtering and Logging
24:22 Demo and Practical Application
22 Oct 12:27

Cloud Cost Optimization: What, Why, & How | Ram Iyengar | SREday Chennai 2025 Q4

by SREday

SREday Chennai 2025 Q4 - October 11 2025
Grab your ticket for the next SREday: https://www.sreday.com
Upcoming SREday CFPs: https://www.papercall.io/events?cfps-scope=&keywords=sreday

Chapters
00:00 Introduction and Session Overview
00:19 Challenges of Measuring Cloud Costs
02:36 Evolution of IT Roles
04:25 The Complexity of Kubernetes
08:31 Generative AI and Cloud Cost Management
14:02 Introduction to OpenCost
16:03 OpenCost Demo
22:44 Conclusion and Q&A
22 Oct 12:27

"The Rise of SRE AI Agents" - Redefining Reliability | Clarence Selestin | SREday Chennai 2025 Q4

by SREday

SREday Chennai 2025 Q4 - October 11 2025
Grab your ticket for the next SREday: https://www.sreday.com
Upcoming SREday CFPs: https://www.papercall.io/events?cfps-scope=&keywords=sreday

Chapters
00:00 Introduction and Movie Reference
00:38 Rise of AI Agents
01:02 Cloud Providers and SRE Models
02:23 Google, AWS, and Azure SRE Agents
03:22 Azure SRE Agent Demo
08:04 Real-World Use Cases of SRE Agents
09:32 Observability Platforms and AI Agents
12:05 Key Use Cases for AI Agents in SRE
16:17 Challenges and Benefits of AI Agents
19:00 Lessons from Industry Deployments
23:29 Conclusion and Key Takeaways
22 Oct 12:27

Supercharging Performance Pipelines | Ganesh Padmanaban | SREday Chennai 2025 Q4

by SREday

SREday Chennai 2025 Q4 - October 11 2025
Grab your ticket for the next SREday: https://www.sreday.com
Upcoming SREday CFPs: https://www.papercall.io/events?cfps-scope=&keywords=sreday

Chapters
00:00 Introduction and Speaker Background
00:27 Overview of the Problem
01:52 Challenges in Performance Engineering
03:40 Proposed Solution and Tools
06:44 Implementation Details
08:51 Demo and Code Walkthrough
17:07 Future Plans and Enhancements
18:41 Q&A Session
22 Oct 12:26

Tame the Chaos: Avoid K8s Landmines with O11y & AIOps | Kaustubha Shravan | SREday Chennai 2025 Q4

by SREday

SREday Chennai 2025 Q4 - October 11 2025
Grab your ticket for the next SREday: https://www.sreday.com
Upcoming SREday CFPs: https://www.papercall.io/events?cfps-scope=&keywords=sreday

Chapters
00:00 Introduction and Speaker Background
00:25 Understanding Kubernetes Landmines
01:40 Common Causes of Outages
01:55 Configuration and Human Errors
04:15 Security Mistakes in Kubernetes
08:06 Blind Spots in Observability
09:59 Scaling Challenges in Kubernetes
12:48 Implementing AIOps for Proactive Monitoring
13:57 Hardening Kubernetes Environments
18:48 Closing Thoughts and Q&A
22 Oct 12:01

Take Control of Your Runners | Akshat Goel & Nishant Sarraff | SREday Chennai 2025 Q4

by SREday

SREday Chennai 2025 Q4 - October 11 2025
Grab your ticket for the next SREday: https://www.sreday.com
Upcoming SREday CFPs: https://www.papercall.io/events?cfps-scope=&keywords=sreday

Chapters
00:00 Introduction and Motivation
00:12 Understanding GitHub Actions
00:17 Components of GitHub Actions
01:36 Why Choose GitHub Actions?
02:47 Scalable CI/CD System
03:38 Challenges in Designing a Scalable System
07:41 Orchestrator Design Overview
11:10 Job Flow and Orchestration
15:39 Handling Failures and Optimizations
19:00 Cost and Performance Enhancements
23:18 Q&A Session
22 Oct 12:01

’27 noches’, la comedia argentina sobre la vejez que se ha vuelto viral en Netflix

by David Lorao

La película argentina 27 noches se ha convertido en uno de los títulos más vistos de Netflix desde su estreno mundial. Lejos de los thrillers policíacos o los dramas de pareja que suelen dominar la plataforma, esta historia ofrece algo distinto: una mirada ácida, tierna y profundamente humana sobre la vejez, la autonomía y los vínculos familiares. La cinta sorprende no solo por su éxito, sino por el modo en que logra emocionar y provocar reflexión con una historia que parece pequeña, pero que esconde una poderosa crítica social.

Una comedia con corazón y una pregunta incómoda

27 noches sigue a Martha Hoffman, una mujer de 83 años que ha decidido vivir sus últimos años con una libertad que su familia no está dispuesta a tolerar. Excéntrica, irónica y con una energía que descoloca a sus hijas, Martha termina internada en una clínica psiquiátrica bajo el argumento de que podría estar perdiendo la razón.

El perito judicial encargado de evaluar su caso, Leandro Casares —interpretado por Daniel Hendler, que también dirige la película—, deberá determinar si la anciana sufre una enfermedad mental o si simplemente es una mujer que se niega a envejecer en silencio.

La trama de 27 noches parte de una pregunta incómoda: ¿cuándo la protección se convierte en control? La película explora esa línea difusa entre el cuidado y la imposición, entre el amor filial y la apropiación del poder. En esa frontera se desarrolla una historia que oscila entre la comedia negra y el drama psicológico, sin perder nunca su tono cálido y humano.

El origen de ’27 noches’: una historia real que conmovió a Argentina

Lejos de ser una simple ficción, 27 noches está inspirada en hechos reales. Su guion adapta la novela Veintisiete noches, escrita por Natalia Zito y publicada en 2021, que a su vez se basó en un caso mediático ocurrido en Buenos Aires. En aquella historia, una mujer mayor fue internada contra su voluntad en un centro psiquiátrico mientras su familia se disputaba la administración de su patrimonio.

Zito —psicóloga de formación además de escritora— exploró en su libro la delgada línea entre el cuidado y la manipulación, y cómo la sociedad suele decidir por los ancianos sin escuchar su voz. Daniel Hendler tomó esa base y la trasladó al cine con una sensibilidad particular: con humor, ternura y sin convertir el conflicto en un panfleto moralista. En sus palabras, 27 noches no busca señalar culpables, sino mostrar la complejidad de una situación que podría ocurrirle a cualquiera.

Un reparto impecable y una dirección que combina humor y melancolía

La interpretación de Marilú Marini como Martha Hoffman es, sin duda, el corazón de 27 noches. La actriz argentina —que ha brillado en escenarios europeos y latinoamericanos— ofrece una de las actuaciones más potentes de su carrera. Su Martha es ingeniosa, irónica, sensible y desbordante de vida. Es un personaje que rompe con la imagen de la “abuela buena” para convertirse en una mujer dueña de sí misma, con derecho a decidir incluso equivocándose.

27 noches - Cultura
Imagen promocional con el póster ’27 noches’.
Netflix

Daniel Hendler, además de dirigir la película, interpreta al perito judicial que debe determinar el destino de Martha. Su mirada empática y dubitativa sirve como espejo del espectador: no sabe si la mujer está loca o si, en realidad, todos los demás han perdido el juicio al intentar domesticarla. Junto a ellos, un elenco sólido —Carla Peterson, Julieta Zylberberg, Humberto Tortonese, Paula Grinszpan— sostiene con naturalidad los conflictos familiares que laten detrás de cada diálogo.

Hendler, conocido por su trabajo en películas como El fondo del mar o Los paranoicos, demuestra aquí una madurez cinematográfica que conjuga ironía y emoción. En 27 noches cada plano tiene una intención. Los espacios cerrados del sanatorio contrastan con los breves momentos de libertad de Martha, y la luz, que pasa del blanco clínico al dorado crepuscular, acompaña la transformación emocional del relato.

The post ’27 noches’, la comedia argentina sobre la vejez que se ha vuelto viral en Netflix appeared first on Artículo 14.

22 Oct 10:53

Rovi se dispara en Bolsa tras cerrar una alianza con Roche en la fabricación de medicamentos

by Cehona

La nueva molécula se producirá en España. La empresa suiza dice que tendrá un impacto de 2.000 millones en la balanza comercial española

etiquetas: rovi, roche, farmaceuticas, medicamentos, sanchéz, la moncloa

» noticia original (cincodias.elpais.com)

22 Oct 10:52

Ayuso pide a Trump que elimine aranceles para el vino y el aceite de Madrid y desata el choteo: "Vergüenza ajena, descripción gráfica"

by Delay

La presidenta de la Comunidad de Madrid, Isabel Díaz Ayuso, en su carrera de fondo hacia el ridículo definitivo ha decidido subirse a un atril en Austin (Texas) y dedicarle unas palabras al presidente de EEUU, Donald Trump, a quien le ha pedido que valore retirar los aranceles al vino y, muy especialmente, al aceite madrileño porque –ha dicho– "es sano y es una inversión".

etiquetas: ayuso, vino, aceite, aranceles, trump

» noticia original (www.publico.es)

22 Oct 10:02

Las 25 frases más impactantes de las memorias de Isabel Preysler: la mujer detrás del mito

by Elena, Barrios

A lo largo de más de 300 páginas, la mujer que encarnó como nadie la elegancia discreta y el poder de la insinuación desgrana su vida sin filtros: desde su infancia en Manila hasta los amores que marcaron su destino, pasando por su llegada a una España que aún despertaba de su pasado reciente.

Con una mezcla de nostalgia, ironía y una sorprendente honestidad, Isabel Preysler abre las puertas de su mundo -ese universo de luces y sombras donde la alta sociedad, los sentimientos y los titulares se entrecruzan- para contarse tal como es: sin artificios, sin imposturas.

Entre revelaciones inesperadas y desmentidos rotundos, hemos reunido las 25 frases más impactantes que se pueden leer en sus memorias. Pequeñas cápsulas de su voz, entre la confesión íntima y la elegancia implacable, que retratan a una Isabel desconocida, pero más real que nunca.

1. Sobre su primer amor con Máximo "Junie" Kalaw: "Me dejé llevar, porque en ese momento era una adolescente quede la vida solo sabía vivirla. Él se sorprendió al comprobar que era mi primera vez. Y de esa primera vez guardo un recuerdo lleno de ternura y cariño, que lo hizo inolvidable".

2. "Me casé queriendo mucho a Julio, pero es cierto que con el paso del tiempo me enamoré locamente".

3. "A mi padre nunca le dijimos que me había casado embarazada, y nunca llegó a saberlo".

4. "Mientras que yo jamás sospeché que podía estar engañándome, Julio en cambio sentía unos celos enfermizos hacia cualquiera que se me acercara".

5. "Siempre me pedía perdón y yo me hacía la absurda ilusión de que iba a cambiar. Y digo absurda porque los celos los llevaba inscritos en su ADN".

6. La primera vez que acudió a las famosas lentejas de Mona Jiménez, sentaron a Isabel junto a Miguel Boyer. De inmediato, pensé: "¡Un socialista! Mejor no le dirijo la palabra, porque no querrá ni hablar conmigo".

7. "Miguel Boyer ha sido la historia de amor más importante de mi vida. Le amé profundamente y, aunque en alguna ocasión pensé en separarme, creo que no hubiera podido vivir sin él".

8. "Me destrozó separarme de Carlos, haciéndole tanto daño, porque me había enamorado de Miguel. Me sentí muy mal también por Hilda, quien siempre me había tratado con tanto cariño y había sido tan generosa conmigo".

9. "Para poder estar más tiempo conmigo, Miguel se inventó que le gustaba jugar al pádel, deporte que yo practicaba muchísimo".

10. "Como pareja, Miguel y yo nos enfrentamos con un problema serio: sus celos. En una ocasión le rogué que acudiera al psiquiatra para solucionarlo. El no creía en este tipo de terapias, pero consintió que le pidiera hora. Solo asistió a una sesión".

11. "Conviví con él (Mario Vargas Llosa) casi ocho años y pude conocer su parte más humana, más cotidiana, la del día a día, su verdadera personalidad, muy compleja".

12. "Me llena de perplejidad y aún no consigo entender el empeño de su entorno por intentar hacer creer a todo el mundo que Mario fue desgraciado a mi lado".

13. "El Nobel, como muchos de nuestros, amigos le llamaban, disfrutó encantado de todas las comodidades de la casa".

14. "Que el lector saque sus propias conclusiones… Sobre la carta que yo le escribí, no voy a hacer ningún comentario. Creo que explica, sin dejar ninguna duda al respecto, los motivos de nuestra ruptura (La carta a la que se refiere se la entregó en mano Rafael, su chófer y persona de toda su confianza, en la puerta de su piso de la calle Flora)".

15. "Se la mandé la mañana del lunes 12 de diciembre de 2022, tras una escena de celos infundados, después de pasar varios días sin saber nada de él".

16."El día que mis hijos se fueron asumí, mientras se me desgarraba el alma, que sería por mucho tiempo, pero jamás creí que iba a ser para siempre".

17. "Pocas veces en mi vida he llorado tanto como cuando dejé a Julio y a Enrique en el aeropuerto de Barajas para que se embarcasen rumbo a una nueva vida en Miami lejos de mí. Ese día fue el día más triste de mi vida".

18. "Su matrimonio apenas duró un año y medio en buena parte por culpa de los problemas de Ricardo con las drogas" (sobre el matrimonio de Chábeli y Ricardo Bofill).

19. "El nacimiento de Tamara fue un parto natural largo y difícil. El doctor Eduardo García del Real me tuvo que anestesiar. Tarde mucho tiempo en despertarme".

20. "Muchos me han dibujado como una Cenicienta que vino a España sin nada en busca de un futuro más próspero. Se equivocan".

21. "Cuando se me desmoronó la nariz entera todo quisieron salir corriendo de allí porque no sabían qué hacer".

22. "Tengo la nariz tan destrozada y estoy tan cansada de médicos y operaciones que ya me da igual todo".

23. "Mi primer lifting me lo hizo en California el doctor Steven Hoefflin a los 50 años".

24. "Siempre me ha sorprendido porque ni me considero elegante ni tengo la costumbre de seguir la moda".

25. "A mis años, la verdad, lo que me gustaría es taparlo casi todo".

22 Oct 09:58

La recomendación de dar cacahuetes a los bebés ayudó a 60.000 niños a evitar alergias

by teneram

Una década después de que un estudio histórico demostrara que alimentar a los bebés con productos de maní podría prevenir el desarrollo de alergias potencialmente mortales, una nueva investigación reveló que el cambio ha tenido un gran impacto en el mundo real. Aproximadamente 60.000 niños han evitado desarrollar alergias al maní después de que las directrices emitidas por primera vez en 2015 revolucionaran la práctica médica al recomendar la introducción del alérgeno a los bebés a partir de los cuatro meses.

etiquetas: alergia, cacahuete

» noticia original (lacalle.com.ve)

22 Oct 09:58

Medina Azahara anuncia el último concierto de su historia

by Albarkas

Tendrá lugar el 21 de noviembre de 2026 en el Palacio Vistalegre de Madrid

etiquetas: grupo medina azahara, último concierto, despedida

» noticia original (cordopolis.eldiario.es)

22 Oct 09:58

Colonos golpean a agricultores palestinos en video mientras crecen ataques a cosechas en Cisjordania

by Verdaderofalso

Colonos israelíes se abalanzaron esta semana sobre recolectores de aceitunas palestinos y activistas en la Cisjordania ocupada por Israel, golpeándolos con palos en un ataque que, según las autoridades de salud palestinos, se saldó con la hospitalización de al menos una mujer con heridas graves. “La violencia de los colonos se ha disparado en escala y frecuencia", señaló Ajith Sunghay, jefe de la Oficina de Derechos Humanos de la ONU en el territorio palestino, en un comunicado el martes.

etiquetas: colonos, israel, palestina, cisjordania, aceituna, agresiones, agricultores

» noticia original (www.independentespanol.com)

22 Oct 09:53

Friendly reminder de que nos consideran tan imbéciles que nos están intentando convencer de que es normal pagar miles y miles de euros en metálico sin chanchullos.

by Fino
22 Oct 09:51

Google Cloud Apigee advanced

by Antonella Blasetti

Let’s dive in…

Apigee Security Policies in Action

The OAuthV2 Policy: Your Universal Tool for Tokens

The OAuthV2 policy is a single, highly configurable policy that you use for every step of the token lifecycle. You control its behavior with a single setting: the <Operation> tag. Remember: you are granting access.

Key Operations of the OAuthV2 Policy:

  • GenerateAccessToken: This operation is used at the end of a successful grant flow. If everything checks out, it generates the access token (and optionally a refresh token) and returns it to the client app.
  • VerifyAccessToken: This should be on any API proxy that needs to be protected. It automatically looks for the Authorization: Bearer <token> header, extracts the token, and checks if it’s valid, not expired, and has the required permissions (scopes) to access the requested resource.
  • RefreshAccessToken: When an access token expires, the client can present a refresh token to an endpoint that uses this operation. The policy validates the refresh token and issues a brand-new access token, extending the user’s session without requiring them to log in again.
  • InvalidateAccessToken: Used to build “logout” functionality. This operation revokes the access and refresh tokens, making them immediately invalid.

Example in Action: Securing a “/products” API

Scenario: We have a product catalog API at /products and we want to secure it using the Client Credentials grant type.

Step 1: Create a Proxy to Generate Tokens

First, we need an endpoint where client applications can exchange their credentials for a token. We’ll create a new API proxy, let’s call it oauth-v1, with a flow that listens on /token.

  • The Request: A client app makes a POST request to https://<your-apigee-domain>/oauth-v1/token with its client_id, client_secret, and grant_type=client_credentials.
  • The Policy: In the request flow for /token, we attach an OAuthV2 policy configured to generate a token:
<!-- This policy is named "OA-Generate-Token" -->
<OAuthV2 name="OA-Generate-Token">
<Operation>GenerateAccessToken</Operation>
<!-- Define token lifespan: 1 hour -->
<ExpiresIn>3600000</ExpiresIn>
<!-- Specify which grant types are allowed -->
<SupportedGrantTypes>
<GrantType>client_credentials</GrantType>
</SupportedGrantTypes>
<!-- Tell Apigee where to find the client_id -->
<ClientId>request.formparam.client_id</ClientId>
<GenerateResponse enabled="true"/>
</OAuthV2>

The Result: Apigee validates the credentials against the registered Developer App. If they are correct, it returns a JSON payload with a new access_token.

Step 2: Secure the /products API Proxy

Now we protect our actual products API. In the API proxy that handles requests to /products, we place another OAuthV2 policy at the beginning of the request flow (the “PreFlow”).

The Request: The client app now makes a GET request to https://<your-apigee-domain>/products-v1/products and includes the header Authorization: Bearer <the_token_we_just_got>.

The Policy: This time, the policy is configured to verify the token:

<!-- This policy is named "OA-Verify-Token" -->
<OAuthV2 name="OA-Verify-Token">
<Operation>VerifyAccessToken</Operation>
</OAuthV2>

If the token is valid and not expired, the policy does nothing and the request continues on to your backend service.

If the token is missing, invalid, or expired, the policy immediately stops the flow and returns a 401 Unauthorized error to the client. Your backend service is never even touched.

With just two policies, you’ve implemented a complete, standardized OAuth 2.0 security layer without writing any security code in your actual product service.

Content, Transport, and Platform Security

Transport Security (TLS): Securing the “How”

Transport Layer Security (TLS) is the standard cryptographic protocol that ensures data is kept private and integral as it travels across the network. It’s the “S” in HTTPS.

One-Way TLS (Standard): This is what you experience every day on the web. Your browser (the client) validates the certificate of the website (the server) to ensure it’s talking to the legitimate site and not an imposter. The communication is then encrypted.

Two-Way TLS (Mutual TLS or mTLS): This is a much stricter, higher-security model. Not only does the client validate the server’s certificate, but the server also validates a certificate presented by the client. This is common in B2B or internal service-to-service communication where you need to be absolutely certain of the identity of both parties. This is the recommended best practice for traffic between Apigee and your backend services.

Keystores and Truststores:

Keystore: A repository of certificates and their corresponding private keys. This is what a server uses to present its identity to clients.

Truststore: A repository of certificates from trusted Certificate Authorities (CAs) or specific public certificates. This is what a client uses to validate the identity of a server it’s connecting to.

Apigee Platform Security: Protecting Your Secrets

It’s critical to manage sensitive data like passwords, keys, and tokens securely within the platform itself. Apigee provides several mechanisms for this.

Data Masking: the Apigee Trace tool is good for seeing what’s happening inside a proxy. By using the DebugMask Apigee API, you can define “masks” for specific JSON or XML fields to replace their values with asterisks (****) in the Trace tool.

Private Variables: If you need to store a temporary, sensitive value during the execution of a proxy flow, you can prefix the variable name with private. — For example, private.backend_password. The value of this variable will automatically be hidden from Trace sessions.

Key Value Maps (KVMs): KVMs are the standard way to store sensitive data that needs to be retrieved at runtime. They are encrypted key-value stores. You can create them at different scopes (e.g., for one environment or for the whole organization).

Use Case: Storing credentials for a backend database, third-party API keys, or other configuration secrets.You use the KeyValueMapOperations policy to retrieve a value from a KVM. Because the data is encrypted at rest, it’s a secure way to manage secrets without hardcoding them into your proxy logic.

Property Sets: These are simple, unencrypted key/value collections defined directly within an API proxy. They are useful for storing static, non-sensitive configuration data that is specific to a proxy, such as a timeout value or a target path.

Key Policies

RegularExpressionProtection

You give it a “regular expression” (a special text pattern), and it checks a part of the incoming request against that pattern. If it finds a match, it blocks the request. Its primary job is to prevent various content injection attacks.

Use Case: Preventing SQL Injection in a Query Parameter

Imagine you have an API endpoint GET /users?username=… that looks up a user. An attacker might try to trick your database by providing a malicious username like test’ OR 1=1; — . The RegularExpressionProtection policy can stop this before it ever reaches your code.

<!-- This policy is named "REP-Check-SQL-Injection" in PreFlow-->
<RegularExpressionProtection name="REP-Check-SQL-Injection">
<DisplayName>Check for SQL Injection</DisplayName>
<!-- We are inspecting the 'username' query parameter -->
<QueryParam name="username">
<!-- This pattern looks for common SQL keywords and characters -->
<!-- The (?i) makes the search case-insensitive -->
<Pattern>(?i)(select|insert|update|delete|from|where|union|'|;|=)</Pattern>
</QueryParam>
</RegularExpressionProtection>

If a client calls /users?username=admin’ OR 1=1, the policy will scan the value of the username parameter. It will find the ‘ and = characters, match the pattern, and immediately return an error (typically a 400 Bad Request) without ever calling your backend service.

JSONThreatProtection

This policy doesn’t care about what the data is, but rather its shape and size. It’s designed to stop “structural” attacks where an attacker sends a perfectly valid JSON payload that is crafted to crash or overwhelm the server that has to parse it.

Use Case: Protecting a POST endpoint from a “Billion Laughs” attack

<!-- This policy is named "JTP-Protect-Order-API" -->
<JSONThreatProtection name="JTP-Protect-Order-API">
<DisplayName>Protect Order API from structural attacks</DisplayName>
<!-- Limit the total number of items across all arrays -->
<ArrayElementCount>100</ArrayElementCount>
<!-- Limit how deep the JSON nesting can go -->
<ObjectMaxDepth>10</ObjectMaxDepth>
<!-- Limit the number of keys in any single object -->
<ObjectEntryCount>50</ObjectEntryCount>
<!-- Limit the length of any string value -->
<StringValueMaxLength>2000</StringValueMaxLength>
</JSONThreatProtection>

If an attacker sends a JSON payload with an array containing 200 items, or a string value that is 5000 characters long, this policy will catch the violation before the JSON is even fully parsed.

KeyValueMapOperations

You use it to retrieve sensitive data (like credentials, API keys, or hostnames) from an encrypted Key Value Map (KVM) that you’ve configured in Apigee. This is the cornerstone of avoiding hard-coded secrets in your API logic.

Use Case: Securely Adding a Backend API Key

Let’s say your backend service requires a special header, X-API-Key, with a secret value. You don’t want to type this key directly into your policies. Instead, you store it in an encrypted KVM.

In the Apigee UI, you create an encrypted KVM named backend-secrets and add an entry:

Key: product_service_key Value: abc123supersecretkey456

Use the policy to retrieve the secret.

<!-- This policy is named "KVM-Get-Backend-Key" -->
<KeyValueMapOperations name="KVM-Get-Backend-Key" mapIdentifier="backend-secrets">
<DisplayName>Get Backend Key from KVM</DisplayName>
<Scope>environment</Scope>
<!-- 'Get' is the operation to read a value -->
<Get assignTo="private.backend.apikey">
<!-- This is the key we want to look up -->
<Key>
<Parameter>product_service_key</Parameter>
</Key>
</Get>
</KeyValueMapOperations>

This policy reads the value associated with product_service_key from the backend-secrets KVM and stores it in a special private variable named private.backend.apikey. Using the private. prefix ensures the key’s value will not appear in Trace sessions.

Use the retrieved secret. Immediately after the KVM policy, you would use an AssignMessage policy to add the key to the request header.

<!-- This policy is named "AM-Set-Backend-Header" -->
<AssignMessage name="AM-Set-Backend-Header">
<Add>
<Headers>
<!-- The {private.backend.apikey} syntax reads the variable -->
<Header name="X-API-Key">{private.backend.apikey}</Header>
</Headers>
</Add>
<AssignTo createNew="false" type="request"/>
</AssignMessage>

The request sent to your backend target will now correctly contain the X-API-Key: abc123supersecretkey456 header. You have successfully authenticated to your backend without ever exposing the secret key in your proxy’s code. If the key needs to be rotated, you can update it in the KVM without ever redeploying your API proxy.

Apigee Fault Handling

When an error occurs during API proxy processing, Apigee enters a special “fault state.” You need to explicitly handle these faults, so that the user will get a meaningful experience, with many benefits:

  • Standardized Error Responses: You can transform diverse backend or policy errors into a consistent, predictable format.
  • Improved User Experience: Instead of a generic 500 Internal Server Error, you can provide meaningful messages to the end-user (while logging detailed technical information separately).
  • Hiding Implementation Details: You prevent potentially sensitive backend stack traces or internal server information from leaking to the outside world.
  • Custom Logic: You can trigger specific actions when errors occur, like logging detailed diagnostics or sending alerts.

Fault Rules, defined within the <FaultRules> block, can exist in both the ProxyEndpoint and the TargetEndpoint configuration.

A <FaultRules> block contains one or more <FaultRule> elements and an optional <DefaultFaultRule>, with <Condition> and <Step> elements where you can attach policies.

Condition: You define a condition that checks for specific error states using fault variables. Common fault variables include:

fault.name: The name of the fault (e.g., InvalidApiKey, RaiseFault).

fault.type: Usually ErrorCode.

message.status.code: The HTTP status code set by the failing policy or the backend.

policy.{PolicyName}.failed: true if a specific policy caused the fault.

Steps: Inside the rule, you typically use policies like:

  • AssignMessage: To create a new, custom error response message (status code, headers, payload).
  • MessageLogging: To log detailed information about the error.
  • RaiseFault: Sometimes used within a Fault Rule to re-raise a different, more generic fault after logging specifics.

Complete Example: Handling API Key and Backend Errors

We have an API proxy /v1/products that requires an API key and talks to a backend product service.

  • If the API key is invalid or missing, return a specific 401 Unauthorized JSON error.
  • If the backend service is unavailable (503 Service Unavailable), return a custom 503 JSON error telling the user to try again later.
  • For any other unexpected error, return a generic 500 Internal Server Error JSON message.
<APIProxy revision="1" name="ProductProxy">
<ProxyEndpoints>
<ProxyEndpoint name="default">
<PreFlow name="PreFlow">
<Request>
<Step>
<!-- 1. Verify API Key first -->
<Name>Verify-API-Key</Name>
</Step>
<!-- Other request policies -->
</Request>
<Response/>
</PreFlow>
<Flows/>
<PostFlow name="PostFlow">
<!-- Response policies -->
</PostFlow>
<HTTPProxyConnection>
<BasePath>/v1/products</BasePath>
<VirtualHost>secure</VirtualHost>
</HTTPProxyConnection>

<!-- Fault Handling for Proxy Flow Errors -->
<FaultRules>
<!-- Rule 1: Catch Invalid API Key errors -->
<FaultRule name="InvalidKeyRule">
<!-- Condition: Checks if the Verify-API-Key policy failed with a specific error -->
<Condition>(fault.name = "InvalidApiKey") or (fault.name = "FailedToResolveAPIKey")</Condition>
<Step>
<!-- Log details -->
<Name>ML-LogErrorDetails</Name>
</Step>
<Step>
<!-- Set custom 401 response -->
<Name>AM-Set401Response</Name>
</Step>
</FaultRule>

<!-- Default Rule for any other Proxy Endpoint errors -->
<DefaultFaultRule name="DefaultProxyErrorRule">
<Step>
<Name>ML-LogErrorDetails</Name>
</Step>
<Step>
<!-- Set generic 500 response -->
<Name>AM-Set500Response</Name>
</Step>
<!-- AlwaysEnforce ensures this default runs even if another rule matched but failed internally -->
<AlwaysEnforce>true</AlwaysEnforce>
</DefaultFaultRule>
</FaultRules>

</ProxyEndpoint>
</ProxyEndpoints>

<TargetEndpoints>
<TargetEndpoint name="default">
<HTTPTargetConnection>
<LoadBalancer>
<Server name="product_backend"/>
</LoadBalancer>
<Path>/api/products</Path>
</HTTPTargetConnection>

<!-- Fault Handling for Target Flow Errors -->
<FaultRules>
<!-- Rule 2: Catch Backend 503 errors -->
<FaultRule name="BackendUnavailableRule">
<!-- Condition: Checks the HTTP status code returned by the target -->
<Condition>message.status.code = 503</Condition>
<Step>
<Name>ML-LogErrorDetails</Name>
</Step>
<Step>
<!-- Set custom 503 response -->
<Name>AM-Set503Response</Name>
</Step>
</FaultRule>

<!-- Default Rule for any other Target Endpoint errors -->
<DefaultFaultRule name="DefaultTargetErrorRule">
<Step>
<Name>ML-LogErrorDetails</Name>
</Step>
<Step>
<!-- Set generic 500 response -->
<Name>AM-Set500Response</Name>
</Step>
<AlwaysEnforce>true</AlwaysEnforce>
</DefaultFaultRule>
</FaultRules>

</TargetEndpoint>
</TargetEndpoints>

<!-- Policies definitions would go here -->
<Policies>
<!-- VerifyAPIKey -->
<Policy name="Verify-API-Key" type="VerifyAPIKey">
<APIKey ref="request.header.apikey"/>
</Policy>

<!-- AssignMessage to set 401 response -->
<Policy name="AM-Set401Response" type="AssignMessage">
<Set>
<StatusCode>401</StatusCode>
<ReasonPhrase>Unauthorized</ReasonPhrase>
<Headers>
<Header name="Content-Type">application/json</Header>
</Headers>
<Payload contentType="application/json">{
"error": {
"code": "AUTH-001",
"message": "Invalid or missing API Key.",
"requestId": "{messageid}"
}
}</Payload>
</Set>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="response"/>
</Policy>

<!-- AssignMessage to set 503 response -->
<Policy name="AM-Set503Response" type="AssignMessage">
<Set>
<StatusCode>503</StatusCode>
<ReasonPhrase>Service Unavailable</ReasonPhrase>
<Headers>
<Header name="Content-Type">application/json</Header>
</Headers>
<Payload contentType="application/json">{
"error": {
"code": "SYS-002",
"message": "The service is temporarily unavailable. Please try again later.",
"requestId": "{messageid}"
}
}</Payload>
</Set>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="response"/>
</Policy>

<!-- AssignMessage to set generic 500 response -->
<Policy name="AM-Set500Response" type="AssignMessage">
<Set>
<StatusCode>500</StatusCode>
<ReasonPhrase>Internal Server Error</ReasonPhrase>
<Headers>
<Header name="Content-Type">application/json</Header>
</Headers>
<Payload contentType="application/json">{
"error": {
"code": "SYS-001",
"message": "An unexpected error occurred. Please contact support.",
"requestId": "{messageid}"
}
}</Payload>
</Set>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="response"/>
</Policy>

<!-- MessageLogging Policy (Example) -->
<Policy name="ML-LogErrorDetails" type="MessageLogging">
<Syslog>
<Message>[ERROR] Proxy:{api.proxy.name} Revision:{api.proxy.revision} FaultName:{fault.name} StatusCode:{message.status.code} RequestId:{messageid} Details:{fault.detail}</Message>
<Host>your-log-server.com</Host>
<Port>514</Port>
</Syslog>
</Policy>

</Policies>

</APIProxy>
  1. Verify API Key: The Verify-API-Key policy runs first in the ProxyEndpoint’s PreFlow.
  2. API Key Fails: If the key is invalid, the Verify-API-Key policy sets fault.name to InvalidApiKey and stops normal flow. Apigee jumps to the ProxyEndpoint’s <FaultRules>.
    Rule 1 Matches: The condition (fault.name = “InvalidApiKey”) is true.
  3. Execute Rule 1: Apigee runs ML-LogErrorDetails (sending detailed info to your log server) and then AM-Set401Response.

This AssignMessage policy completely replaces the current message with a new response containing the 401 status and the specific JSON payload. The processing stops, and this 401 response is sent to the client.

  1. Backend Fails: If the API key was valid, the request proceeds to the TargetEndpoint. Let’s say the backend server returns a 503 Service Unavailable.
  2. Target Fault: Apigee sees the 503 from the backend and enters the fault state, jumping to the TargetEndpoint’s <FaultRules>.
  3. Rule 2 Matches: The condition message.status.code = 503 is true.
  4. Execute Rule 2: Apigee runs ML-LogErrorDetails and then AM-Set503Response. This policy replaces the message with the custom 503 JSON payload. Processing stops, and this 503 response is sent back up the chain (eventually to the client).
  5. Other Errors: If any other unexpected error occurs (e.g., a policy is misconfigured, a JavaScript policy throws an exception), neither Rule 1 nor Rule 2 will match. Apigee will then execute the <DefaultFaultRule> (either in the ProxyEndpoint or TargetEndpoint depending on where the error happened), run ML-LogErrorDetails, run AM-Set500Response, and return the generic 500 error to the client.

ProxyEndpoint and TargetEndpoint

Something this separation is pubbling. So we will explain with a typical example: your client (a mobile app) and your backend (a legacy user service) have different security requirements.

The Client’s Security: The mobile app must prove who the user is. It does this by sending a JWT (JSON Web Token) that it received when the user logged in.

The Backend’s Security: The legacy user service doesn’t understand JWTs. It’s an old system, and it requires a simple, static internal API key (let’s say, abc-123-xyz) on all requests to prove the request is coming from a trusted internal system.

This is a perfect example of why we separate the ProxyEndpoint (client-facing) from the TargetEndpoint (backend-facing).

In the ProxyEndpoint (The “Front Door”)

  • Flow: ProxyEndpoint -> Request PreFlow
  • Policy: VerifyJWT — To answer the question, “Is this a valid user from our mobile app?”
  • Action: This policy looks at the Authorization header from the client. It checks the JWT’s signature and expiration date. If the user’s token is invalid, the proxy stops here and sends a 401 Unauthorized back to the client. The backend service is never even contacted.

In the TargetEndpoint (The “Back Door”)

  • Flow: TargetEndpoint -> Request PreFlow (This is the flow that runs just before connecting to the backend)
  • Policy: AssignMessage
  • Purpose: To answer the question, “How do I authenticate the proxy itself with the backend service?”
  • Action: This policy adds a new header to the request that is about to be sent to the backend. It adds X-Internal-API-Key: abc-123-xyz.

The mobile app (client) has no idea that the backend requires a static key (abc-123-xyz). The backend service has no idea the client is using a modern JWT.

The API proxy acts as the security translator:

  1. The ProxyEndpoint validates the client’s identity.
  2. The TargetEndpoint injects the backend’s required credentials.

Later, when you modernize your backend to a new service that also understands JWTs, you can simply delete the AssignMessage policy from your TargetEndpoint. You don’t have to touch the ProxyEndpoint logic at all. The client is completely unaware that you just swapped out the entire backend.


Google Cloud Apigee advanced was originally published in Google Cloud - Community on Medium, where people are continuing the conversation by highlighting and responding to this story.

22 Oct 09:50

GCP Apigee primer

by Antonella Blasetti

A super-powerful API Gateway

Any API Gateway offers a single, managed entry point for backend services. This architectural pattern provides three critical benefits: standardization, security, and a clear separation of concerns.

Standardization and Consistency: one consistent and well-documented entry point: api.yourcompany.com for connecting several different microservice endpoints (users.api.com, products.api.com, orders.api.com).

Protocol Transformation: The gateway can act as a translator. Modern mobile app speaks RESTful JSON, but the legacy backend system only understands SOAP/XML. The gateway can handle this transformation automatically.

Standardized Error Handling: The gateway can intercept varied and sometimes cryptic error messages from different backends and transform them into a consistent format for the client application.

Centralized Security Enforcement: It checks every single request before it’s allowed to access your backend systems. Instead of every single microservice having to implement its own logic for validating API keys, OAuth tokens, or JWTs, this task is given to the gateway.

Separation of Concerns & Frontend Decoupling

The Facade Pattern: The gateway acts as a facade, hiding the complexity of the backend system. A front-end developer can make a single call to the gateway (e.g., GET /v1/my-account). The gateway then builds the calls to the various backend microservices and returns a single response.

Separating the client (e.g., a mobile app) from the backend (e.g., a user database) with a stable API contract provides two transformative advantages: parallel development and independent evolution.

Parallel Development: Once the API contract is defined and agreed upon, teams no longer have to wait for each other.
backend team → business logic, front-end team → user interface against a mock API that simulates the contract.

Independent Evolution: The API contract acts as a protective shield. The backend system can be completely rewritten, moved from a legacy monolith to modern microservices, or migrated to a different cloud provider. As long as the new system continues to honor the original API contract, the client applications that depend on it will continue to work withoutchange.

Use Case: Modernizing a Retail Platform Without Disrupting Business

A company has a successful mobile app that gets product information from a single, aging, and slow monolithic backend system. They want to migrate to a microservice architecture, but they cannot afford to break the mobile app or force millions of users to update it.

The Solution (with an API Contract):

  • An API Gateway is placed in front of the old monolith to enforce this contract.
  • The mobile app team continues to release new features; simultaneously, a separate backend team starts building a new “Product Microservice.”

The Progressive Switch (Canary Release): Once the new microservice is ready, the operations team avoids a risky “big bang” cutover. Instead, they reconfigure the API Gateway to perform a safe, progressive switch:

  • Phase A (1% Traffic)Phase B (Monitor)
  • Phase C (Gradual Increase)
  • Phase D (Full Cutover)
  • The Result: From the mobile app’s perspective, nothing has changed. The app — and its users — are unaware that the entire backend system has been replaced. The company successfully modernized its technology stack with zero downtime, zero disruption to the client experience, and minimal risk.

Why Apigee?

Apigee is powerful but, under the hood, it is built on a complex architecture. Do I need all this?

It depends. Apigee is capable to modernize applications without the need of any reengineering, just letting Apigee do the work in the middle between Client and Backend.

Apigee acts as a unified control plane. A central platform team can create and enforce global policies using Shared Flows. Individual teams can then build their own API proxies but are required to use these shared flows, ensuring consistency.

Apigee uses API Products to bundle your API resources into logical packages for specific audiences (e.g., “Free Tier” vs. “Premium Partner Tier”).

Apigee let you had any application login in a no coding and controlled way.

Apigee Architecture: Management Plane and the Runtime Plane

Management Plane : This is the central control center, fully managed by Google. You use the Apigee UI or API here to design proxies, create products, and view analytics. It is the single source of truth for all configuration.

Runtime Plane: This is the engine that processes your live API traffic.

The two planes communicate over a secure, internal Runtime API. When you deploy a change in the Management Plane, it uses this API to push the new configuration to the Runtime Plane. The Runtime Plane, in turn, uses this API to send analytics data back up. Your customer traffic only ever hits the Runtime Plane.

Look similar to Kubernetes? yes. For Apigee Hybrid, under the hood there is a Kubernetes (K8s) cluster in your own environment. K8s provides the scalability and high availability needed to handle traffic spikes and failures.

Flexible Deployment Models

Apigee offers different deployment models to fit your organization’s needs.

Apigee X (SaaS): The fully cloud-native version of Apigee, where both the Management and Runtime planes are managed by Google. This is the simplest option, ideal for cloud-first organizations.

Apigee Hybrid (Multi-Cloud Runtime): This model allows you to manage a system of applications deployed across a multi-cloud environment. The Management Plane stays in Google’s cloud, while you deploy the Runtime Plane wherever you want — in your own data center, in AWS, or in Azure. This is crucial for meeting data residency requirements, lowering latency, and leveraging existing infrastructure.

Apigee Adapter for Envoy: Securing the Service Mesh
This is an advanced model for managing East-West (service-to-service) traffic within a microservices architecture. It acts like a lightweight keycard reader for your internal services, providing fast, decentralized security checks that are still centrally managed by Apigee.
It is important when you need to use Apigee logic also when microservices are speaking to each other.

Organizational Structure:

To effectively manage an API program, you need a clear, hierarchical structure. In Apigee, this is achieved through Organizations, Environments, APIs (Proxies and Shared Flows), Target Servers, and API Products.

  1. Apigee Organization. The top-level container; your company’s entire Apigee account. It is not the GCP Organization. It lives inside your GCP Project.

Contains all your environments, APIs, products, and developers. Manages user access and roles for the entire platform.

2. Environments. Runtime execution contexts, typically mapped to your software development lifecycle (e.g., dev, staging, prod).
An Environment lives within an Organization. They provide crucial runtime and data isolation. An API Proxy or Shared Flow must be deployed to an Environment to be active. Environment can be grouped into Environment groups. The envs are all exposed through the same set of public-facing hostnames (e.g., api.mycompany.com).

3. Target Servers. A named reference to a backend endpoint (hostname, port, and other details). Target Servers are scoped to a specific Environment. This is important.
Instead of hardcoding a backend URL in your API Proxy, you reference a Target Server by name. This allows you to promote the exact same API Proxy code through your environments. In the dev environment, the Target Server product_backend might point to dev.myapi.com, while in the prod environment, the same-named Target Server product_backend points to the production load balancer URL. This decouples your proxy logic from your environment-specific infrastructure.

4. APIs (Proxies and Shared Flows)

API Proxy: The technical implementation of your API. It’s a bundle of configurations, policies, and code that intercepts requests, enforces governance, and routes traffic to a backend. It is the core “gateway” for a specific service.

Shared Flow: A reusable sequence of policies. Think of it as a function or a subroutine. You build a Shared Flow once (e.g., for a standard security check or logging routine) and then call it from multiple different API Proxies.

5. API Products. It groups together resources (endpoints) from one or more API Proxies and associates them with a specific service plan (e.g., quotas, access rights).

A developer’s application is granted an API key that gives it access to a specific API Product, which in turn defines which API Proxy endpoints it is allowed to call.

Use Case: A Complete Picture at “Retail-Inc”

Let’s refine our retail company example to include all these components.

Organization: Retail-Inc.

Environments: development and production.

Target Servers: They create a Target Server named catalog-backend in both environments:

Shared Flow: To avoid repeating code, they create a Shared Flow named Standard-Company-Security. This flow contains three policies:

  • A VerifyAPIKey policy.
  • A JSONThreatProtection policy to prevent malformed requests.
  • A SpikeArrest policy for basic rate limiting.
    They deploy this Shared Flow to both development and production.

API Proxy: They build a single API Proxy called products-v1.

  • In its first step (the “PreFlow”), it uses a FlowCallout policy to execute the Standard-Company-Security Shared Flow. Now, every request to this proxy is automatically protected.
  • Its Target Endpoint is configured to send traffic to the catalog-backend Target Server, not a hardcoded URL.
  • They deploy this proxy to development and production. The proxy’s code is identical in both environments.

API Products: They create their business offerings:

  • Product Catalog — Free Tier (bundles read-only GET requests from products-v1).
  • Partner Inventory — Premium Tier (bundles the same GETs plus an inventory endpoint from products-v1).

The Resulting Workflow:

  • A developer signs up for the “Free Tier” product and gets an API key.
  • Their application makes a call to the products-v1 proxy running in the production environment.
  • The proxy first executes the Standard-Company-Security Shared Flow, which validates the API key.
  • The request is then routed to the Target Endpoint.

The Target Endpoint looks up the catalog-backend Target Server within the production environment and sends the request to https://prod-catalog.internal:8443.

This structure is robust, maintainable, and scalable. You can update your security policy in one place (the Shared Flow) and have it apply to all your proxies. You can change your backend infrastructure without ever touching your deployed proxy code.

Core Building Blocks

API Proxies: A layer that sits in front of your backend service.

Environments: isolated space where your API proxies are deployed and run (e.g., dev, test, prod) mapped to hostnames.

Environment Groups: logical grouping of one or more Environments with the same hostnames (e.g., api.mycompany.com); it lets you choose which of its member Environments should actually receive and process the traffic (i.e. blue-green, canary).

Policies: Pre-built modules that add functionality like security or traffic management. Policies are logic, not permissions.

Shared Flows: A reusable sequence of policies.

API Products: A bundle of your API resources packaged for developers.

App Developers & Developer Apps: A developer registers an “App” to get an API key.

Key Value Maps (KVMs): A simple data store for configuration data.

API-First and OpenAPI Specifications

API-First Design: the API is the central contract between your service and its consumers.

What is OpenAPI? The Blueprint for Your API

The OpenAPI Specification (OAS) is the blueprint for your API: a standard, language-agnostic format for describing RESTful APIs. It’s a single file (YAML or JSON) that defines everything about your API:

  • Endpoints (Paths): What are the available URLs? (e.g., /users/{userId})
  • Operations (Methods): What HTTP methods can you use on those paths? (GET, POST, PUT, DELETE)
  • Parameters: What information can you send in the path, query, or headers?
  • Request/Response Bodies (Schemas): What does the data look like? (e.g., a User object has a firstName string and an id integer).
  • Security: How do you authenticate? (e.g., API Key, OAuth 2.0).

This “blueprint” is both human-readable and, crucially, machine-readable. This machine-readability is what unlocks its true power.

So, it becomes a single source of truth that can automate many parts of the API lifecycle.

1. Generate Interactive Documentation Automatically

What you do: Feed your OpenAPI file into tools like Swagger UI or Redoc. You will get an interactive API documentation portal where developers can read about your endpoints and even try them out live in the browser.

Generate Client SDKs and Server Skeletons

What you do: Use code generation tools (like OpenAPI Generator) with your OAS file. You will get client libraries (SDKs) and server-side boilerplate code in dozens of languages.

3. Automate Testing and Mocking

What you do: Use your OAS file to generate mock servers or automated contract tests. You will get the ability for your front-end and back-end teams to work in parallel.

Example with Prism: Prism is an open-source tool that works with an openapi.yaml file.

  • You give this file to Prism. With a single command, it instantly starts a live mock server that behaves exactly as your specification describes.
  • If your spec says GET /users returns an array of user objects, the Prism server will do just that, creating realistic mock data on the fly that matches your defined schema.
  • Your front-end team can immediately start building against this stable, predictable mock server. Your back-end team can develop the real business logic in parallel. This breaks the dependency between teams and dramatically accelerates the development timeline.

4. Create Apigee Proxies Instantly

What you do: In Apigee, instead of creating an API proxy manually, you simply upload your OpenAPI specification. Apigee automatically creates the proxy and all the conditional flows for your different paths and methods.

Deep Dive into the API Proxy

An API Proxy intercepts all incoming requests, perform a series of actions, and then, if appropriate, forward the request to your backend. The API Proxy is composed of several key concepts:

Proxy Endpoint: It’s the public-facing interface that client applications call, with two main parts:

  • The Public Address (Virtual Host): hostname for your API, like api.mycompany.com.
  • The Base Path: This is the first part of the URL path, like /v1/products. It acts as a routing instruction, telling the API gateway which specific API proxy is responsible for handling the request. This allows you to host many different APIs on the same public hostname.
  • Target Endpoint: the “back door” → private endpoint that the proxy calls on your behalf (https://internal-product-service:8080). It defines how the proxy connects to your actual backend service in a logical way.

This separation is the key to decoupling. You can completely change your Target Endpoint (move your backend to a new server, a new cloud, etc.) without the clients calling the Proxy Endpoint ever noticing.

Flows — the Hooks+Actions

A Flow is a sequence of processing steps that a request follows as it travels through the proxy. An API proxy is structured into a series of flows that are executed in a specific order.

PreFlow: This is executed for every single request that comes into the proxy, no matter the URL path. The place for universal logic like security checks.

Conditional Flows: These are executed only if a certain condition is met, usually matching the URL path and verb. For example, you would have a conditional flow for GET /products and a separate one for POST /products.

PostFlow: This is executed for every single request just before the response is sent back to the client. This is ideal for universal logging or adding standard headers to all responses.

Example: The Lifecycle of a Request

The Goal:

  • ALL requests must be secured with an API Key.
  • GET /products/{id} requests should be cached to improve performance.
  • POST /products requests must be transformed from JSON to XML for a legacy backend.
  • ALL successful responses must include a unique X-Request-ID header for tracking.

The Implementation:

  • Request PreFlow: Contains a VerifyAPIKey policy.
  • Conditional Flow GetProduct (Condition: proxy.pathsuffix MatchesPath “/{id}” and request.verb = “GET”):
  • Request: Contains a ResponseCache policy to check for a cached response.
  • Response: Contains the same Response-Cache policy to store the response if it’s new.
  • Conditional Flow CreateProduct (Condition: request.verb = “POST”)
  • Request: Contains a JSONtoXML policy to transform the payload.
  • Response PostFlow: Contains an AssignMessage policy to add the X-Request-ID header.

Walkthrough: Caching a GET /v1/products/123 Request

  • Client sends request.
  • Request PreFlow: The VerifyAPIKey policy runs first. If the key is valid, the flow continues. If not, it stops and returns a 401 Unauthorized error immediately.
  • Conditional Flow GetProduct (Request): The ResponseCache policy runs. It checks its cache for an entry matching the key /v1/products/123.
  • If Cache Hit: The stored response is immediately retrieved. The proxy skips the connection to the Target Endpoint entirely and jumps straight to the Response PostFlow. This is extremely fast.
  • If Cache Miss: The flow continues to the Target Endpoint.
  • Target Endpoint: The request is sent to the backend product service.
  • Target returns response.
  • Conditional Flow GetProduct (Response): The ResponseCache policy runs again. It sees this is a new response for this key and stores it in the cache for the next request.
  • Response PostFlow: The AssignMessage policy runs, adding the X-Request-ID header to the response.
  • Client receives the final response.

This structure allows you to compose layered logic. The PreFlow acts as a universal gatekeeper, while Conditional Flows apply the specific business logic required for each individual operation your API exposes.

Policies: The Reusable Building Blocks

The name “Policy” can be misleading. It sounds like a simple rule, but it’s more accurate to think of a policy as a pre-built, configurable procedure that performs a powerful, specific action without you writing any code. Examples:

The VerifyAPIKey policy performs a full security workflow: finding the key, validating it against the correct API Product, and ensuring the resource is allowed.

The JSONtoXML policy performs the complex procedure of parsing a JSON structure and transforming it into a valid XML document.

Why an Extra Hop Can Make Your API Faster

A common and valid question is: “Doesn’t adding an API proxy create an extra network hop and slow down my API?”

1. How the Proxy Makes You Faster

Caching: The proxy can cache responses to common GET requests. This single feature can eliminate 80–90% of traffic for some endpoints, dramatically reducing backend load and providing lightning-fast responses to users.

Offloading Intensive Tasks: Your backend services are freed from the repetitive, CPU-intensive work of handling security and connections. The proxy manages tasks like SSL/TLS termination, validating OAuth tokens, and checking API keys. This allows your backend to be leaner and focus only on its core business logic, enabling it to respond faster.

Connection Pooling: The proxy maintains a persistent pool of connections to your backend services. This avoids the overhead of establishing a new, secure connection for every single incoming client request, which is a major performance gain for high-traffic APIs.

Control and Insight

Preventing System Overload: A slow API is often an overloaded API. Policies like SpikeArrest and Quota protect your backend services from being overwhelmed by sudden traffic bursts or misbehaving clients.

Actionable Analytics: The proxy gives you detailed analytics, allowing you to pinpoint which backend operations are slow, identify high-traffic endpoints that are candidates for caching, and understand usage patterns.

Environments and Groups

1. Environments: The Runtime Context

An Environment is a runtime execution context. It’s an isolated space that may map, for example, to your Software Development Life Cycle (SDLC), such as dev, staging, and prod.

Runtime Isolation: The prod environment can be scaled with massive resources, while the dev environment can be much smaller. A code error or a load test that crashes the dev environment has zero impact on the prod environment.

Configuration Isolation: different Target Servers, KVMs, and other resources for each environment. This means the same proxy revision, when deployed to dev, will automatically talk to the dev backend, and when deployed to prod, it will talk to the prod backend.

Data Isolation: Analytics, caching, and KVM data are all scoped to the environment, so your production data is never mixed with test data.

2. Environment Groups: The Public Hostname

An Environment Group is a logical grouping of one or more Environments that are all exposed through the same set of public-facing hostnames (e.g., api.mycompany.com).

Decoupling: When a request comes in to api.mycompany.com, the Environment Group is what decides which of its member Environments should actually receive and process the traffic.

How They Work Together

  • You create one or more Environments (prod-us-east, prod-eu-west)
  • You deploy your API proxy to each of these Environments.
  • You create an Environment Group (production-hosts).
  • You assign your public hostname (api.mycompany.com) to this Group.

Use Case1: Zero-Downtime Blue-Green Deployment

You need to deploy a new, potentially dangerous version of your products-v1 proxy. How?

  • Create an Environment Group called production-group and assign the hostname api.mycompany.com to it.
  • Create two Environments and add them to this group: prod-blue and prod-green.
  • Initially, configure the group to route 100% of traffic for api.mycompany.com to the prod-blue environment.
  • Deploy the new version of your proxy (rev-11) to the prod-green environment. It is now live, but no public traffic. You can run final integration tests against it using an internal hostname.
  • The Switch: When you are ready, you make a single configuration change in the Environment Group. You re-route the traffic for api.mycompany.com to point to prod-green: nearly instantaneous.
  • All new traffic now flows to the prod-green environment running the new version.

So, you have successfully released a new version with zero downtime. If any problems are discovered, you can instantly roll back by simply switching the routing in the Environment Group back to prod-blue.

Use Case 2: Geographic Routing for Performance and Data Residency

Scenario: a global e-commerce application with a large number of users in both North America and Europe. You have backend services deployed in GCP regions in us-east1 and europe-west1. You need to ensure two things:

  • Users get the fastest possible response by connecting to the datacenter closest to them.
  • European user data is processed only within the EU to comply with GDPR.

Environments: You create two distinct environments:

  • prod-us: The Apigee runtime for this environment is deployed in the us-east1 region. It’s configured to talk to your US-based backend services.
  • prod-eu: The Apigee runtime is in europe-west1. It’s configured to talk to your EU-based services.

Environment Group: You create a single group called production-web and assign your public hostname api.my-global-shop.com to it. You add both prod-us and prod-eu to the production-web group.

Routing: You configure your global DNS load balancer. You set it up so that traffic originating from North American IP addresses is routed to the prod-us environment’s load balancer, and traffic from European IPs is routed to the prod-eu environment’s load balancer.

A user in London making a call to api.my-global-shop.com is transparently routed to the prod-eu environment in Europe. The entire transaction, from the gateway to the backend, stays within the European network, providing the lowest possible latency.

Use Case 3: Dedicated Environments for Partners

Scenario: You have a “Platinum Partner” who pays a significant amount for premium, high-SLA access to your APIs. They are concerned that “noisy neighbors” — other, less critical consumers of your API — could impact their performance during traffic spikes.

Environments: You have your standard production environment that serves the general public. You create a new, dedicated environment called prod-partner-acme with guaranteed, isolated compute and network resources.

Deploy Proxies: You deploy the same API proxies to both the production and prod-partner-acme environments. The proxy code is identical.

Environment Groups: You create two separate groups:

public-apis: You assign api.my-company.com to this group and attach the production environment.

partner-apis: You assign a custom hostname, acme.api.my-company.com, to this group and attach only the prod-partner-acme environment.

Isolation: Your Platinum Partner is given the dedicated hostname acme.api.my-company.com. All their traffic is routed to their private, isolated environment. A massive, unexpected traffic spike on your public API (api.my-company.com) will have zero impact on the partner’s performance.

Management: Even though you have two separate runtime environments, your API development team still manages only a single set of API proxies. When they deploy an update, they deploy the same revision to both environments, ensuring consistency.

Use Case 4: Gradual API Version Deprecation

Scenario: You have a legacy v1 of your Orders API that you want to retire. You have built a new v2 version, but you know some will be slow to migrate. You want to stop new developers from using v1 while still allowing existing v1 users to function for a limited time.

Environments: You have your production environment. You create a new, temporary environment called production-legacy.

Deploy Proxies: You deploy the new orders-v2 proxy to the production environment.
You deploy the old orders-v1 proxy to the production-legacy environment.

Environment Group: You have your production-apis group for api.my-company.com. You attach both the production and production-legacy environments to it.

Routing:

  • You route the base path /v2/orders to the production environment.
  • You route the base path /v1/orders to the production-legacy environment.

Coexistence: For a period of time, both v1 and v2 of your API are served from the same hostname (api.my-company.com), allowing existing clients to continue functioning.

But on your developer portal, you hide the documentation for v1, so no new developers can discover or sign up to use it.

Decommissioning: You can monitor the analytics for the production-legacy environment. Once traffic to /v1/orders drops to zero, you know all clients have migrated. You can then safely remove the /v1 routing from the group and delete the production-legacy environment and the old proxy, completing the deprecation process cleanly.

Routing and Testing

URL: https://api.mycompany.com/v1/inventory/stores/123/products/abc

  • Base Path of /v1/inventory
  • Proxy Path Suffix : built-in Apigee flow variable with the part of the URL path that comes after the Proxy’s Base Path. SO → /stores/123/products/abc

qqq

Environments and Groups

1. Environments: The Runtime Context

An Environment is a runtime execution context. It’s an isolated space that may map, for example, to your Software Development Life Cycle (SDLC), such as dev, staging, and prod.

Runtime Isolation: The prod environment can be scaled with massive resources, while the dev environment can be much smaller. A code error or a load test that crashes the dev environment has zero impact on the prod environment.

Configuration Isolation: different Target Servers, KVMs, and other resources for each environment. This means the same proxy revision, when deployed to dev, will automatically talk to the dev backend, and when deployed to prod, it will talk to the prod backend.

Data Isolation: Analytics, caching, and KVM data are all scoped to the environment, so your production data is never mixed with test data.

2. Environment Groups: The Public Hostname

An Environment Group is a logical grouping of one or more Environments that are all exposed through the same set of public-facing hostnames (e.g., api.mycompany.com).

Decoupling: When a request comes in to api.mycompany.com, the Environment Group is what decides which of its member Environments should actually receive and process the traffic.

How They Work Together

  • You create one or more Environments (prod-us-east, prod-eu-west)
  • You deploy your API proxy to each of these Environments.
  • You create an Environment Group (production-hosts).
  • You assign your public hostname (api.mycompany.com) to this Group.

Use Case: Zero-Downtime Blue-Green Deployment

You need to deploy a new, potentially dangerous version of your products-v1 proxy. How?

  • Create an Environment Group called production-group and assign the hostname api.mycompany.com to it.
  • Create two Environments and add them to this group: prod-blue and prod-green.
  • Initially, configure the group to route 100% of traffic for api.mycompany.com to the prod-blue environment.
  • Deploy the new version of your proxy (rev-11) to the prod-green environment. It is now live, but no public traffic. You can run final integration tests against it using an internal hostname.
  • The Switch: When you are ready, you make a single configuration change in the Environment Group. You re-route the traffic for api.mycompany.com to point to prod-green: nearly instantaneous.
  • All new traffic now flows to the prod-green environment running the new version.

So, you have successfully released a new version with zero downtime. If any problems are discovered, you can instantly roll back by simply switching the routing in the Environment Group back to prod-blue.

Routing and Testing

URL: https://api.mycompany.com/v1/inventory/stores/123/products/abc

  • Base Path of /v1/inventory
  • Proxy Path Suffix : built-in Apigee flow variable with the part of the URL path that comes after the Proxy’s Base Path. SO → /stores/123/products/abc

Get all products in a store: proxy.pathsuffix MatchesPath “/stores/{store_id}/products” and request.verb = “GET”

Targeting Specific Environments for Development and Testing

If the public hostname api.mycompany.com is assigned to an Environment Group that contains dev, staging, and prod, how do you guarantee that your test request hits the staging environment and not the live prod one?
you do not use the public hostname for dev and test.

The Public Hostname (api.mycompany.com) is for your end-users and production applications. Traffic to this address is managed by the Environment Group, which will route it to your production environment(s).

Each Environment (dev, staging, prod, etc.) also has its own unique, internal hostname. This address is generated by Apigee and provides direct access to the proxy revisions deployed in that specific environment, completely bypassing the Environment Group’s routing rules.

A Deeper Look at Policies

Conditions

A condition is a statement that evaluates to either true or false at runtime. The component will only be executed if its condition evaluates to true.

<Condition>proxy.pathsuffix == "/orders"</Condition>
<Condition>(request.verb = "POST" OR request.verb = "PUT")
AND request.header.Content-Type = "application/json"</Condition>

Traffic Management Policies

Spike Arrest: Acts like a circuit breaker. It protects against sudden, massive spikes in traffic that could be caused by a malicious attack (DDoS) or a buggy client application. It smooths traffic by limiting the number of requests processed per second, but unlike a quota, it doesn’t have a concept of a total count over a longer period.

Use Case: A bug in your mobile app causes it to retry a failed connection thousands of times per second. Without a Spike Arrest policy, this flood of traffic could crash your backend servers. You configure a Spike Arrest policy to allow a maximum of 100ps (requests per second). When the buggy app sends its flood of traffic, Apigee processes the first 100 requests within that second and then immediately rejects the rest with a 503 Service Unavailable error until the next second begins. This protects your backend from the traffic spike while still allowing well-behaved clients to get through.

Quota :business policy. It enforces the number of requests a developer’s app is allowed to make over a longer period (minute, hour, day, month). This is the core policy used to create different tiers of service (e.g., Free vs. Premium). The count is tied to the API Key of the developer app.

Response Cache: it stores the response of a successful backend request in a high-speed, in-memory cache for a short period. If another identical request comes in while the entry is in the cache, Apigee serves the cached response directly without ever contacting the backend.

Security Policies

Verify API Key: This is the most fundamental security policy. It checks for an API key in the incoming request (usually in a header or query parameter).
Basic Access Control You place a Verify API Key policy in the Request PreFlow of your proxy. This ensures that every single request that comes in must have a valid API key. If a request arrives without a key, or with an invalid one, the policy immediately stops processing and returns a 401 Unauthorized error. The request never reaches your backend.

OAuth v2.0: This policy (which is actually a family of related policies) implements the full OAuth 2.0 standard. It’s used when you need to allow a third-party application to access a user’s data on their behalf, without the user ever sharing their password with that application. It involves generating, validating, and revoking access tokens.

JWT (JSON Web Token): This group of policies (GenerateJWT, VerifyJWT, DecodeJWT) allows you to work with the JWT security standard.
Securing Microservices :

  • When a user logs into your Auth Service, it generates a JWT containing the user_id and their role (e.g., “admin”). This JWT is signed with a secret key. When the user’s browser makes a call to the Orders Service, it includes this JWT.
  • The Orders Service API proxy uses a VerifyJWT policy. The policy checks the token’s signature using the shared secret key. If the signature is valid, the policy knows the token hasn’t been tampered with. It then extracts the user_id and role from the token and uses them to enforce fine-grained access control.

CORS : Adds the necessary HTTP headers (Access-Control-Allow-Origin, etc.) to a response to allow a web page from one domain to make API calls to your API on a different domain. This is a standard security mechanism built into all web browsers.

JSON and XML Threat Protection: These policies nspect incoming JSON or XML payloads and check for common attack patterns designed to overwhelm the backend parser, such as excessively deep nesting, huge arrays/documents, or malicious content.
Securing a Publicly Exposed Endpoint
Your POST /v1/feedback endpoint accepts a JSON payload from any user on the internet. A malicious actor could send a 100 MB JSON file or a file with 10,000 levels of nested objects. This could consume all the memory of your backend server and cause it to crash (a Denial of Service attack). By placing a JSON Threat Protection policy in front, you can configure sane limits (e.g., max document size 10KB, max nesting depth 5 levels). The policy will inspect the payload, and if it exceeds these limits, it will be rejected before it ever reaches your backend code.

Regular Expression Threat Protection: This is a more general-purpose threat protection policy. It scans parts of a request (like a query parameter or header) for patterns that could indicate an attack, most commonly a SQL Injection attack.
Preventing SQL Injection

Your legacy backend has a known vulnerability where the search query parameter is directly used to build a database query. A request containing “DROP TABLE users;” could be disastrous. You can use a Regular Expression Threat Protection policy (often called RegularExpressionProtection) to scan the q parameter for common SQL keywords like DROP, INSERT, UPDATE, etc. If a match is found, the request is blocked, protecting your vulnerable backend from the attack.

Access Control: This is a simple but powerful policy that allows or denies access to your API based on the incoming IP address of the client.
Restricting Access to Internal Tools
You can use an Access Control policy to create a “whitelist” of your company’s known public IP address ranges. Any request that does not originate from one of those IPs will be rejected.

Extension Policies

They can let you use your own custom code or integrate with other services.

JavaScript / Java Callout
Allows you to execute custom code written in JavaScript or Java directly within your API flow. This code has full access to read and modify all flow variables.

Service Callout: It allows your API proxy to pause its current flow, act as an HTTP client itself, and make a request to a completely separate third-party API.
Data Enrichment with an External Service
An e-commerce API receives an order containing a shipping address.

  • It uses an ExtractVariables policy to pull out the street, city, and zip code.
  • It uses a Service Callout policy to send these address parts to an external address validation service (like SmartyStreets or the USPS API).
    The validation service responds with {“isValid”: true, “isResidential”: true}.

Flow Callout : Executes a Shared Flow → create reusable logic within Apigee. You build a sequence of policies (e.g., for security or logging) once in a Shared Flow, and then any number of different API proxies can execute it using a single Flow Callout policy.
Centralized Security Governance
A company’s central security team builds and manages a Shared Flow called standard-company-security. This flow contains a VerifyJWT policy, an AccessControl policy, and a JSONThreatProtection policy, representing the company’s baseline security standard. Now, every other team building APIs simply adds a single Flow Callout policy to their PreFlow that points to standard-company-security. This guarantees that every single API in the company adheres to the same security standard, and if the security team needs to make an update, they only have to do it in one place.

Message Logging: Sends request or response data, or any flow variables, to an external logging endpoint, such as Splunk, Sumo Logic, or a standard syslog server. This is an asynchronous process, meaning it doesn’t slow down the API flow.
Auditing and Debugging
You need to log every POST request made to your Payments API for auditing purposes. In the PostFlow (after the backend has confirmed the transaction was successful), you add a Message Logging policy. You configure it to create a custom log message containing the request.verb, the client.ip, the user.id (a custom variable), and the response.status.code, and send this message to your central logging system.

Data Capture: get data from your API traffic and save it to Apigee Analytics for use in custom reports.

Connecting to the Backend

Apigee communicates with your backend services with a Target Endpoint, that has two main elements that work together:

Route Rules: conditional statement that determines which backend target to use for a given request. “If this condition is true, send the request to Target A; otherwise, send it to Target B.” → dynamic routing.

HTTPTargetConnection: This is the element that defines a specific backend. It contains the URL, SSL/TLS settings, and other connection details for a single target.

  • You can have a default HTTPTargetConnection that is used if no Route Rules match
  • Conditional Route Rules for specific scenarios.

No Hardcoded Targets

When you first create a proxy, it’s very easy to put a direct URL into the HTTPTargetConnection like this:

<! - The WRONG Way →
<HTTPTargetConnection>
<URL>[https://my-backend-server-prod.mycompany.com/v1](https://my-backend-server-prod.mycompany.com/v1)</URL>
</HTTPTargetConnection>

It creates several major problems:

It’s Not Portable: When you want to promote this API proxy from your dev environment to staging and then to prod, you have to manually edit the proxy code at each step to change the URL.

It’s Not Resilient: What happens if my-backend-server-prod goes down? With a hardcoded URL, your API is completely broken. You have no way to failover to a backup server.

The Solution: Target Servers

It is a named reference, or a pointer, to one or more backend server hostnames. It is a layer of abstraction between your proxy’s code and your environment’s infrastructure.

A Target Server in Apigee acts as a Load Balancer. A load balancer is a component that distributes incoming network traffic across multiple backend servers. This provides two key benefits:

The Correct Workflow:

  • Define Target Servers in each Environment: you create a Target Server named inventory_backend. You configure it with the hostname of your development server: dev.inventory.mycompany.com.
  • In your prod environment, you create a Target Server with the exact same name: inventory_backend. Here, you configure it with the hostnames of your two production servers: prod-inv-1.mycompany.com and prod-inv-2.mycompany.com. You also configure a load balancing algorithm (e.g., Round Robin) and a health check.
  • Now, in your API proxy’s HTTPTargetConnection, you do not use a <URL> tag. Instead, you use the <LoadBalancer> tag to reference the Target Server by its name.
<! - The CORRECT Way →
<HTTPTargetConnection>
<LoadBalancer>
<Server name="inventory_backend" />
</LoadBalancer>
<Path>/v1</Path> <! - The base path is now separate →
</HTTPTargetConnection>

Use Case: Dynamic Routing with Route Rules

Let’s combine these concepts for a final, powerful use case.

Scenario: A company is migrating its Products backend from a legacy monolith to a new microservice. They want to route all GET (read-only) requests to the new, fast microservice, but for now, all POST (write) requests must still go to the old, reliable monolith.

The Setup:

In the prod environment, create a Target Server named products_legacy pointing to the old monolith.

In the prod environment, create a Target Server named products_microservice pointing to the new service.

The Target Endpoint Configuration:

<TargetEndpoint name="default">
<PreFlow name="PreFlow">
<! - Request/Response policies →
</PreFlow>
<Flows/>
<PostFlow name="PostFlow">
<! - Request/Response policies →
</PostFlow>
<! - Route Rule to send all GET requests to the new microservice →
<RouteRule name="new-service-read-requests">
<Condition>request.verb = "GET"</Condition>
<TargetEndpoint>products_microservice</TargetEndpoint>
</RouteRule>
<! - The default route for everything else (POST, PUT, DELETE) is the legacy monolith →
<HTTPTargetConnection>
<LoadBalancer>
<Server name="products_legacy" />
</LoadBalancer>
<Path>/v1/products</Path>
</HTTPTargetConnection>
</TargetEndpoint>
<! - Define a separate connection block for the microservice →
<TargetEndpoint name="products_microservice">
<HTTPTargetConnection>
<LoadBalancer>
<Server name="products_microservice" />
</LoadBalancer>
<Path>/api/v2/products</Path>
</HTTPTargetConnection>
</TargetEndpoint>

This configuration uses a RouteRule to conditionally forward traffic based on the HTTP verb, allowing for sophisticated migration and routing patterns while abstracting all the physical hostname details into environment-specific Target Server configurations.

Logging

You can log almost any data available in an API proxy flow, including:

Request/Response Data: Headers, query parameters, payloads, and status codes.

API Proxy Variables: Standard variables (like client.ip, proxy.pathsuffix) and any custom variables you create.

Custom Messages: Hardcoded strings or dynamically generated messages.

Error and Fault Information: Details about why a request failed.

Where You Can Send Logs

Google Cloud Logging (Recommended): This is the native, integrated solution for Apigee X and hybrid. It offers powerful querying, monitoring, and alerting capabilities within the Google Cloud ecosystem. To use it, you set the <CloudLogging> element in your policy.

Syslog: You can send logs to a third-party logging server (like Splunk, Sumo Logic, or an ELK stack) that supports the syslog protocol. This is configured using the <Syslog> element and requires specifying the host and port of your log management service.

HTTP/S: You can also send log messages to an HTTP/S endpoint. This is useful for integrating with custom logging services or APIs. This is configured using the <HTTP> element.

How You Can Control Logging

Conditional Logging: You can trigger the MessageLogging policy only when specific conditions are met (e.g., log only when there is an error).

Asynchronous Logging: Logging is performed out-of-band, meaning it doesn’t block the API request/response flow, so there’s no performance penalty for your API.

Data Masking and Redaction: You can use other policies, like the AssignMessage policy, to remove sensitive data (like passwords or API keys) from variables before they are logged.

Formatting: You can format your log messages as plain text or JSON for easier parsing by external systems.

The PostClient flow in Apigee is a special phase in the API proxy execution that runs after the response has been sent back to the client. Its primary purpose is to perform tasks that shouldn’t delay the client from receiving its response.

Asynchronous: It runs out-of-band with the main request-response flow. This means it doesn’t add any latency to the API call from the client’s perspective.

Response Sent: It only executes after the client has received the response.

Limited Policies: You can’t run just any policy in this flow. The main goal is to prevent any manipulation of the response that has already been sent.

Guaranteed Execution: This flow will run even if a fault occurs in the main flow, making it ideal for final logging.

The most common and impactful use case for the PostClient flow is logging.

Centralized Logging: You can use the MessageLogging policy to send detailed logs to third-party systems like Splunk, Google Cloud Logging, or other syslog endpoints. This is perfect for capturing the final state of the transaction, including metrics like the total processing time.

Analytics: Gathering data for analytics or billing purposes without impacting the user’s experience.

Metrics: Capturing start and end timestamps of the response to calculate precise latency measurements.

Allowed Policies:

MessageLogging: The most frequently used policy in this flow.

ServiceCallout: For sending data to external systems in a “fire-and-forget” manner.

FlowCallout: To execute a Shared Flow that contains other compatible policies.


GCP Apigee primer was originally published in Google Cloud - Community on Medium, where people are continuing the conversation by highlighting and responding to this story.

22 Oct 09:22

Milicias anti Hamás, líneas imaginarias y montajes: las mil y una maneras de Israel para reventar el acuerdo

by capitan__nemo

Las autoridades israelíes lideradas por Benjamín Netanyahu han demostrado durante los primeros días de alto el fuego en Gaza que tienen una rampa de salida siempre disponible para retomar la ofensiva en caso de que la evolución de la tregua no les convenza. El domingo, después de que un incidente sobre el que existen distintas versiones terminara con la muerte de dos soldados israelíes en Rafah, el Gobierno sionista ordenó decenas de bombardeos sobre el enclave palestino y el bloqueo medieval a la ayuda humanitaria.

etiquetas: israel, gaza, reventar acuerdo, paz, milicias anti hamas, bombardeo

» noticia original (www.elsaltodiario.com)

22 Oct 09:22

Un joven de 13 años mata a su compañero de clase, lo corta con una sierra eléctrica y se come parte del cuerpo "por curiosidad"

by karakol

Al ser interrogado por la policía egipcia, el chico afirmó que había asesinado a su compañero porque estaba replicando las escenas violentas que había visto en películas y en videojuegos. Confesó que lo golpeó brutalmente, que después lo desmembró con la sierra eléctrica de su padre —que es carpintero— y que finalmente esparció sus restos por la ciudad. También dijo que había comido parte de su cuerpo: "Era como pollo empanado". La autopsia practicada a los restos confirmó su versión.

etiquetas: joven, compañero, sierra, cuerpo, egipto

» noticia original (www.20minutos.es)

22 Oct 09:21

El Gobierno andaluz congela la subida salarial a 77.000 empleados públicos para derivar el gasto a la crisis de los cribados

by luspagnolu

Los sindicatos, que acudieron el viernes para firmar un acuerdo negociado durante meses, barajan ahora movilizaciones ante la negativa de la Consejería de Justicia y Función Pública. La subida salarial costaba 200 millones y la Junta ha anunciado 100 millones extra para sanidad de partidas "no ejecutadas" del Presupuesto.

etiquetas: gobierno, andaluz, congelación, subida, salarial, empleados, públicos

» noticia original (www.eldiario.es)

22 Oct 09:21

La fontanera del PSOE se ofreció dos veces a Sabadell para frenar la opa de BBVA con información sensible

by Igorymi

La mano derecha de Cerdán en las cloacas de Ferraz, Leire Díez, se reunió en Madrid y Tarifa con emisarios del Sabadell en los primeros meses de la OPA para trasladarles que disponía de material de BBVA capaz de dinamitar la absorción. A cambio de entregarle ese material comprometedor, Leire y Dolset exigieron al Sabadell el pago de un millón de euros. El pacto incluía una dimensión política. Las fuentes consultadas aseguran que los fontaneros del PSOE prometieron que, en caso de acuerdo, el Gobierno redoblaría su oposición a la OPA.

etiquetas: leire díez castro, psoe, bbva, sabadell

» noticia original (www.elconfidencial.com)

22 Oct 09:21

Okdiario y El Mundo dedican una campaña de tintes islamófobos contra el Padre Ángel

by onainigo
Han publicado varios artículos criticando que el fundador de Misioneros de la Paz haya cedido para el rezo musulmán una zona de una iglesia del municipio madrileño de Mejorada del Campo.
22 Oct 09:21

¿Más turistas equivale a más empleo? Un estudio de dos universidades catalanas lo desmiente

by onainigo
Según un estudio, el aumento de visitantes no beneficia los salarios ni los puestos de trabajo
22 Oct 09:20

Más de 2.000 vacas sacrificadas por la dermatosis extienden el miedo entre los ganaderos: "Es devastador"

by onainigo
Los 17 focos detectados ya en Girona tienen a todo el sector en alerta y obligan a vacunar a contrarreloj entre quejas de los afectados por pasividad y falta de prevención de la Generalitat.
22 Oct 09:20

Tras ver 150 episodios de 'Bluey' un grupo de investigadores ha descubierto que enseña una valiosa lección a los niños: la resiliencia

by Lon
Los éxitos de la televisión infantil son a menudo imprevisibles, pero basta ver un par de episodios de 'Bluey' para entender el mérito detrás del fenómeno.
22 Oct 08:19

Ilia Topuria confirma que su paso al boxeo será una realidad: "Tengo el objetivo de ponerme a prueba"

by Gabriel, Moreira

Ilia Topuria es uno de los mejores artistas marciales del mundo. El hispano-georgiano ya es doble campeón de la UFC, y por su cabeza pasa la posibilidad de coronarse como triple campeón de la compañía. Se trata de un objetivo a corto plazo que podría ser una realidad si todos los condicionantes se cumplen.

Sin embargo, otro de los sueños de 'El Matador' pasa por cambiar de disciplina. En numerosas ocasiones, Ilia Topuria ha afirmado que quiere enfrentar a los mejores dentro del boxeo con el objetivo de probarse en un deporte completamente diferente.

Lo cierto es que su golpeo es anómalo dentro de las MMA, siendo uno de los mejores 'strikers' de la compañía. Su poder de finalización es muy alto y su golpeo es muy limpio, lo que invita a pensar que podría tener éxito en este nuevo deporte.

Y ante estas capacidades, Ilia ha vuelto a reiterar su deseo.

Ilia Topuria insiste en su debut dentro del boxeo

El hispano-georgiano ha insistido en varias ocasiones con que su aparición en el boxeo será una realidad. La última se ha producido recientemente durante su visita a Georgia, donde ha disfrutado varios días de la ciudad y sus ciudadanos.

En una rueda de prensa, el campeón del peso ligero de la UFC ha confirmado que cambiará las MMA por el boxeo tarde o temprano, sin especificar una fecha exacta: "Tengo el objetivo de ir al boxeo y ponerme a prueba en esta disciplina. Estoy seguro de que esto sucederá. Todavía no tengo una fecha exacta, pero sucederá", declaraba.

El reto de Topuria a Terence Crawford

A partir de esta convicción de Ilia Topuria, hay que recordar que el propio hispano-georgiano retó al campeón Terence Crawford a un duelo boxístico. Una invitación que señala su confianza en cuanto a nivel de boxeo, queriendo pelear contra uno de los mejores púgiles de la historia.

Todo comenzó con un mensaje publicado en X, donde el campeón de la UFC escribía: "No hablaré de lo que pasaría entre Crawford y yo en un octágono, hablaré de lo que pasaría en un ring. ¡Lo pongo a dormir en el primer contacto!".

Tras este mensaje, Crawford se encargaba de responder a Topuria: "Este tipo está borracho. Muchos peleadores de MMA beben mucho. Debe haber tomado algo de alcohol ese día", comentaba.

Sin embargo, no quedó ahí la cosa. Crawford, que enfrentaba a Canelo Álvarez, salió al ring con la canción de 'El Mariachi', algo que fue considerado como una provocación por parte de Topuria, que usa la misma canción para salir al octágono.

Por ello, Topuria no dudó en responder: "Primero me llama borracho… luego sale con mi canción. Crawford, cuando quieras, te enseñaré a bailar ese mariachi en el ring. Y Canelo, te guardo una ronda después de él", confirmaba.

 

Topuria necesita la aprobación de la UFC

No es la primera vez que la UFC se encuentra con la ambición de un peleador por debutar en boxeo. Ya ocurrió con Conor McGregor, el cual se enfrento a Floyd Mayweather en un duelo que pasó a la historia de los deportes de contacto.

Sin embargo, para que esto suceda es necesario contar con el apoyo de la compañía de artes marciales mixtas. Al tener contrato vigente, con peleas por realizar, Ilia Topuria debe sentarse con el mandamás de la UFC para lograr el permiso para participar en una velada de boxeo.

Recientemente, Dana White, presidente de la UFC, había mostrado su negativa a estas intenciones, algo que podía frustrar el deseo del campeón: "Espero realmente que eso no pase". A pesar de ello, el hispano-georgiano mantiene la esperanza de poder charlar con él y convencerle.

"Es algo que quiero hacer y no creo que Dana me diga que no quiere ayudarme a lograr mi sueño. Contaré con su apoyo, no me cabe duda. Cuesta convencerlo, pero estoy seguro de que saldrá bien", declaraba Topuria en la rueda de prensa posterior a WOW 22.

 

Por el momento, parece que las miradas de Ilia Topuria se mantienen en la UFC. El luchador defenderá el cinturón del peso ligero próximamente e intentará coronarse como triple campeón de la compañía. No obstante, la insistencia del hispano-georgiano en su 'traspaso' al boxeo parece indicar que, tarde o temprano, el cambio ocurrirá, emulando en cierta manera la carrera de otros luchadores.

22 Oct 08:16

Ansiosa, evitativa o segura: descubre tu estilo de apego y por qué sabotea tus relaciones

by Óscar López

Hay personas que, cuando inicia una relación, tienen una conexión con su pareja que puede tener un menor o mayor grado de afecto. La psicología reconoce varios estilos de apego. Algunos, lejos de aportar a la relación, pueden generar inseguridades, frustraciones e incluso el efecto contrario, el distanciamiento.

Por ello, entender estas dinámicas del apego y cómo afectan a una relación sentimental es la clave para evitar este tipo de problemas. Conoce cuáles son y realiza una breve autoevaluación para descubrir qué tipo de apego tienes tú.

La teoría y los tipos de apego

Una pareja
Shutterstock

La teoría del apego nace en la década de los cincuenta, desarrollada por el psicólogo británico John Bowlby y expandida por Mary Ainsworth. Estos hallaron que las experiencias en los vínculos de la infancia dictan tanto las expectativas como el valor que nos damos en las relaciones amorosas de adultos.

Sus planteamientos son la base del apego según la psicología actual, que identifica uno seguro y otros inseguros, el evitativo y el ansioso. 

El apego seguro se desarrolla al haber tenido una niñez basada en la sensibilidad, en la confianza y en la atención. Los adultos con apego seguro están cómodas con la cercanía e intimidad de la pareja, pero también se valoran y tienen autonomía suficiente.

Por el contrato, los estilos de apego inseguros dan pie a relaciones inestables. Por un lado, el apego ansioso nace de una infancia donde ha faltado atención a menudo. Ya en la adultez, esta persona necesita una validación constante, que puede transformarse en celos, demandas constantes y complacencia excesiva.

En esa línea, el apego evitativo responde a una edad temprana cuando no ha habido un cuidador, o era distante a nivel emocional. A esta persona le ha tocado valerse por sí misma y que reprime sus necesidades.

Respecto a la visión de la persona con apego evitativo de una relación sentimental, valora principalmente su independencia. Evitan la excesiva cercanía e intimidad, y son percibidos como adultos fríos y distantes.

Haz este mini-test y descubre tus estilos de apego

Amor - Sociedad
Una pareja disfruta de su amor juntos (Licencia Unsplash)

Reflexiona y marca las afirmaciones siguientes con las que más te identifiques:

1 Cuando estoy en una relación:

  • Me siento cómoda con la cercanía, pero también estoy bien pasando tiempo a solas y haciendo cosas por mi cuenta.
  • Me preocupa mucho que mi pareja me quiera lo suficiente o que me pueda abandonar. A menudo busco tranquilidad o validación.
  • Valoro mucho mi independencia, y me siento incómoda cuando las cosas se ponen demasiado intensas o íntimas emocionalmente.

2 Durante un conflicto o desacuerdo:

  • Puedo expresar mis sentimientos y escuchar los de mi pareja sin sentir que la relación está en peligro.
  • Me pongo muy ansiosa, a veces reacciono de forma exagerada y me cuesta regular mis emociones hasta que se resuelve el conflicto.
  • Tiendo a retirarme, evitar la discusión. Necesito mucho espacio para calmarme, a veces actuando fría o distante.

3 Sobre la intimidad y vulnerabilidad:

  • Me resulta fácil compartir mis pensamientos y sentimientos más profundos con mi pareja.
  • A veces comparto todo demasiado rápido, o busco la intimidad de forma urgente para sentirme segura.
  • Me cuesta mucho mostrar mi vulnerabilidad. Prefiero resolver mis problemas yo sola.

Si has escogido principalmente la primera opción, es probable que tengas un estilo de apego seguro. Si has escogido más segundas opciones, entonces tu apego es ansioso. Y si has escogido más veces la tercera propuesta, el apego es evitativo.

The post Ansiosa, evitativa o segura: descubre tu estilo de apego y por qué sabotea tus relaciones appeared first on Artículo 14.

22 Oct 08:14

"No podéis rendiros": la súplica de una descendiente de esclavos ante unos amigos que quieren huir de Trump

by Andrés Gil

"No podéis rendiros": la súplica de una descendiente de esclavos ante unos amigos que quieren huir de Trump

Las dudas de vivir bajo el trumpismo, de repente tienen un reproche entre quienes más han sufrido por EEUU

Trump se abona a los volantazos con Ucrania: cumbre con Putin suspendida, presiones a Zelenski y Tomahawks de ida y vuelta

Hay un debate recurrente entre los que vivimos aquí. Y es hasta qué punto el país se está haciendo más o menos invivible para muchas personas a causa del miedo informado y justificado. 

El fin de semana pasado fui invitado a una cena a las afueras de Washington donde había compañeros periodistas, pero también otras personas que no lo son. Y había estadounidenses y españoles. En un momento dado de la cena, una amiga explicó que hacía unos días había estado en otra reunión parecida en la que varias personas habían expresado su voluntad por salir de EEUU por lo asfixiante que les estaba resultando el trumpismo.

La persecución de los más vulnerables, la criminalización del migrante, el antifeminismo rampante, el insulto constante al diferente, la persecución del rival político a través del Departamento de Justicia, el acoso a los medios –está haciéndose con la CBS y corre riesgo la CNN– y otros muchos motivos hacen a muchos estadounidenses con recursos y posibilidades buscar otros horizontes lejos de Trump.

Hablábamos de todo esto el sábado por noche, después de una de las mayores movilizaciones en todo EEUU contra un presidente. Y mientras hablábamos vimos el vídeo elaborado con IA difundido por Trump Truth Social, en el que bombardeaba con excrementos.

Y en medio de todas estas reflexiones, esta amiga contaba que en otra cena similar hacía unos días con conversaciones semejantes, una mujer respondió con vehemencia a sus compañeros: “No os podéis marchar, no os podéis rendir”.

Esta mujer argumentó: “Mis antepasados fueron esclavos en este país, y yo me he ido a vivir cerca de los campos en los que ellos trabajaron de forma forzosa. Mis antepasados han sufrido en esta tierra y han entregado mucho sufrimiento por este país para que ahora vosotros os marchéis, nos abandonéis y se lo regaléis a Trump y los suyos”.

El razonamiento resultaba impactante: una persona que viene de una familia de esclavos reivindica la sangre derramada por su familia en EEUU como ejemplo de sacrificio por un país y una vida mejor para luchar, para seguir luchando y dar la batalla contra el trumpismo, en lugar de optar por la vía del exilio.

Un exilio que, en todo caso, a estas alturas de la deriva trumpista, es selectivo entre quienes tienen margen económico o perfiles profesionales concretos –profesores, científicos, por ejemplo– que pueden tener una salida más limpia y son fáciles de acomodar puestos de trabajo equivalentes en otros lugares del mundo. 

O, también, aquellos que tienen raíces con las que reencontrarse.

En este sentido, este martes, en otra cena con amigos periodistas en torno a unos tacos caseros de birria maravillosos en casa de mis queridos Pablo y Alba, otro compañero explicaba que se estaba produciendo un fenómeno interesante de personas migrantes en EEUU que se están planteando firmemente el horizonte de volver a sus países de origen. 

Así, por ejemplo, contaba que la vivienda en San Salvador estaban creciendo a consecuencia de los salvadoreños estadounidenses que estaban comprando casas en El Salvador con la ilusión de volver a su país.

La manifestación 'No kings' de este sábado en Washington DC.
La manifestación 'No kings' de este sábado en Washington DC.

En un programa reciente de la cadena pública NPR, decían que los ciudadanos estadounidenses que solicitaron pasaportes irlandeses habían aumentado un 60% en los dos primeros meses del año en comparación con el año pasado. Y que Reino Unido también había registrado un número récord de estadounidenses que solicitaron la ciudadanía británica en los tres primeros meses de 2025.

Irlanda y Reino Unido son países con mucha afinidad con EEUU y con los que muchos estadounidenses pueden tener vínculos familiares. 

Otro país al que miran con interés los que viven aquí es Canadá. El mismo compañero que contaba la anécdota de los salvadoreños que piensan en volver, a pesar de Bukele, explicaba que tenía dos amigos que se habían marchado a Vancouver: se trata de un militar retirado y su compañero, es decir, de una pareja homosexual que ya hizo planes de marcharse antes de las elecciones.

“Si gana Trump, nos vamos”, decían. Y así ha sido, ahora viven en Canadá.

Esta pareja, como muchas otras, son a las que se dirige la súplica de la mujer afroamericana descendiente de esclavos, que ve cómo a su alrededor hay personas que, si pueden, prefieren echarse a un lado, con lo que eso supone de renuncia a disputar el país.

En este sentido, mi amigo Pablo recordó un artículo en la revista The Atlantic, escrito por George Packer en el pasado abril, en el que respondía a la decisión de Marci Shore, Timothy Snyder y Jason Stanley, todos los profesores de Yale y expertos en autoritarismo que explicaban por qué Estados Unidos es especialmente vulnerable a un retroceso democrático y por qué abandonan el país para ocupar puestos en la Universidad de Toronto.

“Los profesores Timothy Snyder, Marci Shore y Jason Stanley abandonan Yale para incorporarse a la Universidad de Toronto”, escribía Packer: “Algunas de sus razones pueden ser personales y profesionales, pero estos conocidos académicos —dos historiadores y un filósofo— no solo están cambiando de trabajo. Están huyendo de EEUU porque ven que el país está cayendo bajo un régimen autoritario. Están viendo cómo se marchita el estado de derecho y desaparece el debido proceso, mientras un escalofrío de miedo se apodera de los bufetes de abogados, las universidades y los propietarios de medios de comunicación más poderosos del país. Se marchan mientras pueden”.

“Lo mismo hacen miles de estadounidenses que buscan trabajo en el extranjero, investigan escuelas extranjeras para sus hijos, intentan convertir el país natal de sus abuelos en un segundo pasaporte o ahorran varios cientos de miles de dólares para comprar la ciudadanía de Dominica o Vanuatu”, afirma Packer: “Huir de Estados Unidos antes de que le amenacen es muy parecido a obedecer por adelantado

“Cuando me enteré de la noticia del éxodo de Yale, me pregunté si mi incapacidad para explorar una salida me hacía estúpido y complaciente. No quiero pensar que soy uno de esos optimistas ingenuos que no ven el láser apuntando a su propia cabeza, que no quieren perder sus ahorros y esperan a huir hasta que es demasiado tarde. Quizás debería aplaudir la sabiduría y el coraje de los profesores al darse cuenta de que había llegado el momento de marcharse. Pero, en cambio, me sentí traicionado”, escribe Packer.

“La creencia de que Estados Unidos representa una idea más allá de la sangre y la tierra hace que su identidad sea frágil, porque una idea vive en la mente de las personas, donde está sujeta a mentiras, odio, ignorancia, desesperación e incluso extinción”, continúa The Atlantic. Pero precisamente por eso, mientras haya suficientes estadounidenses que sigan creyendo en la idea con la convicción suficiente como para quedarse aquí y luchar, el país en el que tú y yo vivimos seguirá existiendo para la generación que nos suceda. Incluso con los memes de Trump, las tablas arancelarias, los chats de Signal y la policía enmascarada, Estados Unidos seguirá siendo mi hogar profanado. La lección de Snyder es este mandato: 'Sé un patriota“.

Y con esto lo dejo hasta la semana que viene.

Gracias por estar ahí.

Un saludo

22 Oct 07:51

Amnistía Internacional avisa que tras un año de la dana aún se construye en zona inundable

by Lon
Amnistía Internacional alerta de que, un año después, la construcción sobre zonas inundables en los municipios afectados por la dana del pasado 29 de octubre “sigue poniendo en riesgo a decenas de miles de personas” y advierte de que las ayudas han sido insuficientes y con un impacto desigual sobre personas migrantes y...
22 Oct 07:51

Pensar más en la vida buena y menos en la felicidad

by capitan__nemo

Hace unos días me vi envuelto en una conversación sobre el trajín de vivir. Intercambiamos afables frases protocolarias y lugares comunes, hasta que de imprevisto mi interlocutor sentenció: «Al final de lo que se trata es de ser feliz». Quizá fui muy brusco, pero le contesté que a mí cada vez me interesa menos la felicidad. No había ni cinismo ni impostura en mi respuesta, pero nada más pronunciarla me amonesté a mí mismo y recordé la advertencia que Edgar Cabanas y Eva Illouz comparten en su fantástico ensayo Happycracia: «La felicidad parece

etiquetas: felicidad, industria, capitalismo neoliberal, tiranía felicifoide, lacan

» noticia original (espaciosumanocero.blogspot.com)