<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by aliplt on Medium]]></title>
        <description><![CDATA[Stories by aliplt on Medium]]></description>
        <link>https://medium.com/@alipolatbt?source=rss-6664097cbfd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iEwJYktLBFsr-VQvKxsNdw.jpeg</url>
            <title>Stories by aliplt on Medium</title>
            <link>https://medium.com/@alipolatbt?source=rss-6664097cbfd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 13:53:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alipolatbt/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kubernetes Ingress-NGINX Retirement Announced: What It Means and How to Migrate Safely]]></title>
            <link>https://medium.com/@alipolatbt/kubernetes-ingress-nginx-retirement-announced-what-it-means-and-how-to-migrate-safely-6ac3ae951e29?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ac3ae951e29</guid>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[it-application-management]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sun, 30 Nov 2025 05:08:37 GMT</pubDate>
            <atom:updated>2025-11-30T05:18:03.610Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, in this article, I will talk about an announcement made by Kubernetes on November 11th and what can be done afterwards.</p><p><a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/">https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/</a></p><p>The Kubernetes community has announced that Ingress-NGINX, one of the most widely used Ingress controllers, will be officially retired. This means the controller will no longer receive active maintenance and security updates, but existing clusters will continue to function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aRB1GIzefQBOWg7y.png" /></figure><p>In this article when you use:</p><ul><li>Why is Ingress-NGINX being deprecated?</li><li>Alternatives and the future of Kubernetes networks</li><li>A complete step-by-step migration guide</li><li>A production-ready Gateway API Helm chart</li><li>Migration scenarios (Traefik, Envoy Gateway, HAProxy)</li><li>A full explanation → Gateway API mapping table</li></ul><h4>Why Is Ingress-NGINX Controller Being Retired?</h4><h4>1. The Care Burden Has Become Unsustainable</h4><p>Although the project was widely adopted, it was sustained by a very small number of products.</p><h4>2. Flexibility Turns into a Security Risk</h4><p>Features like NGINX product features are no longer considered part of modern security practices.</p><h3>3. Kubernetes Networks Have Evolved</h3><h4>The Gateway <strong>API</strong> is emerging as the new standard: modular, extensible, cloud provider friendly, and much better.</h4><h4>Alternatives: What Should You Use Instead?</h4><h4>Gateway API (Recommended Standard)</h4><p>The official future of Kubernetes networking.</p><h4>Traefik</h4><p>Easy installation, automatic Let&#39;s Encrypt support, fast and lightweight.</p><h4>Emissary-Ingress (formerly Ambassador)</h4><p>Modern Envoy-powered controller with strong policy support.</p><h4>HAProxy Ingress</h4><p>Extremely fast and efficient, ideal for high-throughput environments.</p><h4>NGINX OSS / F5 NGINX Ingress</h4><p>A separately managed NGINX-based introductory project. These projects are independent of the Ingress-NGINX controller and will continue to operate.</p><h4>Step-by-Step Migration Guide</h4><h4>1. Start With a Full Inventory of Your Current Ingress Setup</h4><pre>kubectl get ingress --all-namespaces -o wide</pre><p>Check:</p><ul><li>All Ingress resources</li><li>Annotations in use</li><li>TLS configuration</li><li>Rewrite rules</li><li>timeout / rate-limit settings</li><li>Any NGINX snippets (these won’t be supported, these snippets and custom annotations will not work in Gateway API or other controllers)</li></ul><h4>2. Choose Your New Controller or Architecture</h4><ul><li>Long-term future-proof → <strong>Gateway API</strong></li><li>Fixed migration → <strong>Traefik</strong></li><li>High-performance + mesh-friendly → <strong>Envoy Gateway</strong></li></ul><h4>3. Deploy the New Controller in Parallel (Zero-Downtime)</h4><h4>Install Gateway API:</h4><pre>kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml</pre><p>Ingress-NGINX continues handling traffic while you slowly transition.</p><h4>4. Convert Ingress Rules to HTTPRoute</h4><h4>Old Ingress:</h4><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: web-app<br>spec:<br>  rules:<br>    - host: example.com<br>      http:<br>        paths:<br>          - path: /<br>            pathType: Prefix<br>            backend:<br>              service:<br>                name: web<br>                port:<br>                  number: 80</pre><h4>New Gateway + HTTPRoute:</h4><pre>apiVersion: gateway.networking.k8s.io/v1<br>kind: Gateway<br>metadata:<br>  name: shared-gw<br>spec:<br>  gatewayClassName: nginx<br>  listeners:<br>    - name: http<br>      port: 80<br>      protocol: HTTP<br>---<br>apiVersion: gateway.networking.k8s.io/v1<br>kind: HTTPRoute<br>metadata:<br>  name: web-app<br>spec:<br>  parentRefs:<br>    - name: shared-gw<br>  hostnames: [&quot;example.com&quot;]<br>  rules:<br>    - matches:<br>        - path:<br>            type: PathPrefix<br>            value: /<br>      backendRefs:<br>        - name: web<br>          port: 80</pre><h4>Production-Ready Gateway API Helm Chart</h4><pre>apiVersion: gateway.networking.k8s.io/v1<br>kind: Gateway<br>metadata:<br>  name: shared<br>spec:<br>  gatewayClassName: nginx<br>  listeners:<br>    - name: http<br>      protocol: HTTP<br>      port: 80<br><br>    - name: https<br>      protocol: HTTPS<br>      port: 443<br>      tls:<br>        mode: Terminate<br>        certificateRefs:<br>          - kind: Secret<br>            name: tls-cert</pre><h4>️Migration Scenarios (Alternative Controllers)</h4><h4>Traefik Migration</h4><ul><li>Automatic Let’s Encrypt</li><li>Lightweight CRDs</li><li>Good for quick transitions</li></ul><h4>Envoy Gateway Migration</h4><ul><li>GRPCRoute native support</li><li>Advanced retry/shaping policies</li><li>Excellent for high-scale systems</li></ul><h4>HAProxy Migration</h4><ul><li>Ultra-low latency</li><li>Very efficient</li><li>Ideal for heavy edge traffic</li></ul><h4>5. Testing Strategy (Canary + DNS Weight Transfer)</h4><ul><li>create-canary.example.com</li><li>Compare P95/P99 latency</li><li>Monitor 5xx rates</li><li>Slowly decrease DNS weight for Ingress-NGINX</li><li>Move all traefik to the new Gateway</li></ul><h4>6. Decommission Ingress-NGINX</h4><p>Once all migrations and testing are complete, you can decommission the Ingress-NGINX controller. Running the old controller for extended periods poses security and compatibility risks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ac3ae951e29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You have a Free Elastic license but you want to generate alarms from some logs for free, how do you…]]></title>
            <link>https://medium.com/@alipolatbt/you-have-a-free-elastic-license-but-you-want-to-generate-alarms-from-some-logs-for-free-how-do-you-4dfb2ca927dd?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dfb2ca927dd</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[elastalert]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sun, 31 Aug 2025 16:59:08 GMT</pubDate>
            <atom:updated>2025-08-31T16:59:08.350Z</atom:updated>
            <content:encoded><![CDATA[<h3>You have a Free Elastic license but you want to generate alarms from some logs for free, how do you do it?</h3><p>Hello, today I’ll be focusing on ElastAlert, an open-source tool. I’ll explain how to set up a Slack-integrated alert system using the standalone, open-source ElastAlert tool as a product on Ubuntu using ELK (Elasticsearch + Kibana).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/0*TDpwFOKM2RqPs2wy.png" /></figure><h3><strong>1. Why ElastAlert?</strong></h3><p>ElastAlert is a strong choice for sending customized log-based alerts without requiring a Kibana Gold license. It integrates directly with popular tools like Slack, providing a flexible and free solution.</p><h3>2. Environment Preparation (Ubuntu)</h3><p>Before proceeding with the process steps, it’s important to ensure your system meets the following requirements:</p><ul><li>Ubuntu 20.04 or 22.04</li><li>docker compose</li><li>Terminal (SSH or console)</li></ul><h3>3. ElastAlert Installation</h3><p>There is more than one installation method for Elastalert, but the most stable and easiest one is to install elastalert2 with docker compose (to be compatible with ELK 8).</p><p>After creating the project directory, we create docker-compose.yml</p><blockquote>mkdir elastalert-docker &amp;&amp; cd elastalert-docker<br>mkdir config rules</blockquote><blockquote>nano docker-compose.yml</blockquote><p>The file content should be as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*273Rl_AAPdVWnFGZdLaFqQ.png" /></figure><p>Then we prepare the elastalert.yml file in the config directory as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*0FR66LhWnybTYDTwpfQqSg.png" /></figure><p>You need to write whatever the Slack web hook url is.</p><p>Finally, we create a sample rule file. This means we need to write to this file the conditions under which we want the alert to be generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*gu29lERNiqRrhN7g4bZlcg.png" /></figure><p><strong>Note:</strong> This rule will send an alert to Slack if there are more than 3 logs containing “message:ERROR” in the logstash-* index in the last minute.</p><p>Now that everything is ready, we start the containers with docker-compose up -d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qacpsv_Xhep9Z1-eO-ZeiQ.png" /></figure><p>When we look at the logs, we can see that Elastalert has been installed and is working successfully.</p><p>You can access webhook creation and usage from the link below.</p><p><a href="https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/">https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/</a></p><h3>Thanks for reading, have a nice day :)</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dfb2ca927dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Disaster Recovery: Rebuilding a Kubernetes Environment in 10 Minutes with ArgoCD]]></title>
            <link>https://medium.com/@alipolatbt/disaster-recovery-rebuilding-a-kubernetes-environment-in-10-minutes-with-argocd-a2ce4727f9f7?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2ce4727f9f7</guid>
            <category><![CDATA[disaster-recovery]]></category>
            <category><![CDATA[ci-cd-integration]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[site-reliability]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Tue, 24 Jun 2025 20:42:37 GMT</pubDate>
            <atom:updated>2025-06-24T20:42:37.217Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello friends. We experienced earthquake disasters in my country and this brought up the subject of Disaster Recovery. Not only earthquakes but also an admin error may require DR. In this article, I will talk about how even if you completely lose your Kubernetes infrastructure, if you have a Git repository where you code all resources such as application, service, configmap, ingress, you can get the entire system back on its feet in minutes with ArgoCD’s GitOps approaches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y9qqY51KlfekkoJ9.png" /></figure><p><strong>1. DR Approach with GitOps &amp; ArgoCD</strong><br><strong>GitOps:</strong> Keeps Kubernetes manifests under version control in Git. Provides automatic synchronization between the real state of the environment and Git.</p><p><strong>ArgoCD:</strong> A control plane deployed in a Kubernetes cluster; tracks manifest changes and synchronizes with the running environment in a pull-based manner.</p><p>In this way, in disaster recovery (DR) scenarios, it is sufficient to simply recreate the cluster.</p><p><strong>2. DR Scenario: Cluster Deleted, What Do We Do?</strong><br>Steps:<br><strong>a) Create a new cluster</strong></p><blockquote>eksctl create cluster — name my-cluster</blockquote><p><strong>b) Install ArgoCD</strong></p><blockquote>kubectl create ns argocd</blockquote><blockquote>kubectl apply -n argocd -f <a href="https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml">https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml</a></blockquote><p><strong>c) Introduce the Git repo to ArgoCD</strong></p><blockquote>argocd login &lt;ARGO_SERVER&gt;<br>argocd app create my-app \<br> — repo <a href="https://github.com/username/gitops-demo.git">https://github.com/username/gitops-demo.git</a> \<br> — path k8s/ \<br> — dest-server <a href="https://kubernetes.default.svc/">https://kubernetes.default.svc</a> \<br> — dest-namespace default \<br> — sync-policy automated</blockquote><p><strong>d) Start the sync process or wait for it to be automatic</strong></p><blockquote>argocd app sync my-app</blockquote><p>Once these steps are completed, ArgoCD reads the manifests and performs the deploy operation, and everything is up and running automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/207/1*GXJyvhkCChZNHaL5K0PqgA.png" /><figcaption>Example Git Repo Structure</figcaption></figure><p>With these definitions, even if the cluster is destroyed, ArgoCD can recreate all resources by looking at the App CR in application.yaml.</p><p><strong>4. Why GitOps in DR Plans?</strong></p><p>Speed: In classic DR methods, it can take hours to deploy with dashes; with GitOps, this process is reduced to seconds.</p><p>Traceability: It is clearly visible on Git who made all changes and when.</p><p>Repeatability: With defined processes, “system installation from scratch” can be done without errors.</p><p>Minimized human error: There is no need for classic “kubectl apply” errors; all manifests come from Git.</p><p>ArgoCD isn’t just a deployment tool — it’s also your disaster recovery solution. As long as your manifests are versioned, you can get your system back on track with just a few commands, even if your existing cluster is deleted.</p><p>Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2ce4727f9f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Security Injection into CI/CD Processes: Automated Scanning with Trivy (Azure DevOps Integration)]]></title>
            <link>https://medium.com/@alipolatbt/security-injection-into-ci-cd-processes-automated-scanning-with-trivy-azure-devops-integration-b5ef9f92f34c?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5ef9f92f34c</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-tools]]></category>
            <category><![CDATA[devsecops-tool]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[site-reliability]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sun, 01 Jun 2025 10:09:05 GMT</pubDate>
            <atom:updated>2025-06-01T10:15:37.501Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s software development processes, integrating security from the very beginning not only increases the security of the software but also positively affects the readiness for the regulations that will emerge later. In this article, I tried to explain how we can add security scans to your Azure DevOps pipeline using the Trivy tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*N6Ajxt4HR1Xk-ynu.png" /></figure><p><strong>What is Trivy?</strong><br>Trivy is an open source security scanner developed by Aqua Security. It can scan for vulnerabilities in container images, open source dependencies and infrastructure files. It can be easily integrated into CI/CD platforms such as Azure DevOps and offers very fast usage.</p><p><strong>1- Trivy Integration into Azure DevOps Pipeline</strong></p><p>To integrate Trivy into your Azure DevOps pipeline, you can follow the steps below:</p><blockquote>- script: |<br> curl -sfL <a href="https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh">https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh</a> | sh -s — -b /usr/local/bin<br> displayName: ‘Install Trivy’</blockquote><p><strong>2- Creating and Scanning a Docker Image</strong></p><p>Once you have created your Docker image, you can scan it with Trivy:</p><blockquote>- script: |<br> docker build -t $(imageName) .<br> trivy image — exit-code 1 — severity CRITICAL,HIGH — format table $(imageName)<br> displayName: ‘Build and Scan Docker Image’</blockquote><p>This step detects critical and high-level vulnerabilities in your image and stops the pipeline.</p><p><strong>3- Publishing Trivy Report</strong><br>To further examine the scan results, you can create a report in JUnit format and publish it as test results in Azure DevOps:</p><blockquote>- script: |<br> trivy image — severity HIGH,CRITICAL — format template — template “<a href="http://twitter.com/template/junit">@template/junit</a>.tpl” -o $(Build.ArtifactStagingDirectory)/trivy-report.xml $(imageName)<br> displayName: ‘Run Trivy Scan and Generate Report’</blockquote><blockquote>- task: PublishTestResults@2<br> inputs:<br> testResultsFormat: ‘JUnit’<br> testResultsFiles: ‘$(Build.ArtifactStagingDirectory)/trivy-report.xml’<br> mergeTestResults: true<br> failTaskOnFailedTests: false<br> testRunTitle: ‘Trivy Vulnerability Scan’</blockquote><figure><img alt="Sample Trivy Report Screen" src="https://cdn-images-1.medium.com/max/1024/0*yM9aBjVVKkKJI-UT.png" /></figure><p>This step makes the scan results viewable in the “Test” tab in Azure DevOps.</p><p>Integrating Trivy into your Azure DevOps pipeline makes your software development processes more secure by automating security scans. These steps are supported by visuals, making the integration process more understandable and actionable.</p><p>Thank you for reading. Best regards</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5ef9f92f34c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding PostgreSQL Connector to Debezium]]></title>
            <link>https://medium.com/@alipolatbt/adding-postgresql-connector-to-debezium-1d4d3d0c334e?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d4d3d0c334e</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[debezium]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[devsecops-solutions]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Thu, 22 May 2025 11:07:50 GMT</pubDate>
            <atom:updated>2025-05-22T11:07:50.327Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello friends. In my previous article, I installed Debezium. Now I will configure the PostgreSQL connector and talk about solutions to possible errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J05hlnm9PbGSI7XU.png" /></figure><p>1- First of all, we need to check from the logs that our brokers and zookeepers (available in the version we use) are healthy. Kafka UI can give us an idea about this, but I look at the server logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OTBNtbfXa4fspOGzRTrNg.png" /></figure><p>2- Everything is fine on the Kafka side, we can edit our docker-compose.yml file as follows and run the systems with <strong>docker-compose up -d</strong>.</p><blockquote>version: ‘3.7’</blockquote><blockquote>services:<br> connect:<br> image: debezium/connect:2.6<br> container_name: kafka-connect<br> ports:<br> — “8083:8083”<br> environment:<br> BOOTSTRAP_SERVERS: “server1_ip:9092,server2_ip:9092,server3_ip:9092”<br> GROUP_ID: debezium-group<br> CONFIG_STORAGE_TOPIC: connect-configs<br> OFFSET_STORAGE_TOPIC: connect-offsets<br> STATUS_STORAGE_TOPIC: connect-status<br> CONFIG_STORAGE_REPLICATION_FACTOR: “3” //because we use 3 nodes<br> OFFSET_STORAGE_REPLICATION_FACTOR: “3”<br> STATUS_STORAGE_REPLICATION_FACTOR: “3”<br> KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter<br> VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter<br> KEY_CONVERTER_SCHEMAS_ENABLE: “false”<br> VALUE_CONVERTER_SCHEMAS_ENABLE: “false”<br> CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect<br> CONNECT_PLUGIN_PATH: /kafka/connect<br> extra_hosts:<br> — “server1_name:server1_ip”<br> — “server2_name:server2_ip”<br> — “server3_name:server3_ip”<br> — “postgres_db_ip:postgres_db_ip”<br> restart: unless-stopped</blockquote><blockquote>debezium-ui:<br> image: debezium/debezium-ui:latest<br> container_name: debezium-ui<br> ports:<br> — “8080:8080”<br> environment:<br> KAFKA_CONNECT_URIS: <a href="http://your_host_ip:8083/">http://your_host_ip:8083</a><br> depends_on:<br> — connect<br> restart: unless-stopped</blockquote><p>3- We check the status of the containers with docker ps -a. If they are up, we check the logs by writing our container id instead of the star with docker logs ****. If you see the output below, it is probably successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDIsY8sMGS_cvj-0vNVVfQ.png" /></figure><p><strong>Note:</strong> For this system to work, there must be 3 topics in kafka. Named below. These topics are normally created when we docker up, but if we get an error, we can down docker compose and delete the topics as below and create them manually.</p><p>A connection is made to one of the broker servers. The topics are listed with the following command.</p><p>The following 3 topics should exist as output. If not, we create them with the commands in the 2nd title.</p><p>./kafka-topics.sh — bootstrap-server broker1_ip:9092 — list</p><p>connect-offsets<br>connect-configs<br>connect-status</p><blockquote>Delete:<br>./kafka-topics.sh — bootstrap-server brokerip_1:9092 — delete — topic connect-offsets<br>./kafka-topics.sh — bootstrap-server brokerip_1:9092 — delete — topic connect-configs <br>./kafka-topics.sh — bootstrap-server brokerip_1:9092 — delete — topic connect-status<br> <br>Create: <br>./kafka-topics.sh — bootstrap-server brokerip_1:9092 — create — topic connect-offsets — partitions 1 — replication-factor 3 — config cleanup.policy=compact<br>./kafka-topics.sh — bootstrap-server brokerip_1:9092 — create — topic connect-configs — partitions 1 — replication-factor 3 — config cleanup.policy=compact<br>./kafka-topics.sh — bootstrap-server brokerip_1:9092 — create — topic connect-status — partitions 1 — replication-factor 3 — config cleanup.policy=compact</blockquote><p>After checking kafka and topics, the postgres connector will be created after sending the following request with postman to establish a connection.</p><p><strong>Note:</strong> The necessary permissions must be obtained for the relevant ports.</p><p>At the same time, the user given on the db side must have the following permissions.</p><blockquote>CREATE PUBLICATION debezium_test FOR ALL TABLES;</blockquote><blockquote>GRANT CONNECT ON DATABASE “DBNAME” TO debezium_user;<br> GRANT CREATE ON DATABASE “DBNAME” TO debezium_user;<br> GRANT USAGE ON SCHEMA public TO debezium_user;<br> GRANT SELECT ON ALL TABLES IN SCHEMA public TO debezium_user;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDTsqbM3ciOgkPV1OWxz3A.png" /></figure><p>After these operations, when you make changes to the db, you are expected to create and monitor topics. Thank you for reading.</p><p>Best regards</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d4d3d0c334e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debezium for Data Consistency!]]></title>
            <link>https://medium.com/@alipolatbt/debezium-for-data-consistency-98d6f51efd99?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/98d6f51efd99</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[middleware]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sat, 10 May 2025 15:19:45 GMT</pubDate>
            <atom:updated>2025-05-10T15:19:45.591Z</atom:updated>
            <content:encoded><![CDATA[<p>Debezium is an open-source platform used to monitor database changes in real time and convert those changes into events. It is commonly utilized in data integration and microservices architectures. When an insert, update, or delete operation occurs in a database, Debezium captures the change and forwards it to systems like Kafka. This allows different applications to respond to database changes instantly or stay synchronized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/0*M3LsIBSQMXpXULeh" /></figure><p>In short, Debezium ensures data consistency across systems by turning database-level changes into data streams.</p><p>1- First, we create a folder, go into it and create a docker-compose.yml file.</p><p><strong>mkdir debezium-docker &amp;&amp; cd debezium-docker</strong></p><p><strong>nano docker-compose.yml</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*DcqVITzwichMeEbkND7Atg.png" /></figure><blockquote>version: ‘2’<br>services:<br> zookeeper:<br> image: confluentinc/cp-zookeeper:7.5.0<br> environment:<br> ZOOKEEPER_CLIENT_PORT: 2181</blockquote><blockquote>kafka:<br> image: confluentinc/cp-kafka:7.5.0<br> depends_on:<br> — zookeeper<br> ports:<br> — “9092:9092”<br> environment:<br> KAFKA_BROKER_ID: 1<br> KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181<br> KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092<br> KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1</blockquote><blockquote>postgres:<br> image: debezium/postgres:2.6<br> environment:<br> POSTGRES_USER: postgres<br> POSTGRES_PASSWORD: postgres<br> POSTGRES_DB: inventory<br> ports:<br> — “5432:5432”</blockquote><blockquote>connect:<br> image: debezium/connect:latest<br> depends_on:<br> — kafka<br> — postgres<br> ports:<br> — “8083:8083”<br> environment:<br> BOOTSTRAP_SERVERS: kafka:9092<br> GROUP_ID: 1<br> CONFIG_STORAGE_TOPIC: my_connect_configs<br> OFFSET_STORAGE_TOPIC: my_connect_offsets<br> STATUS_STORAGE_TOPIC: my_connect_statuses<br> KEY_CONVERTER_SCHEMAS_ENABLE: “false”<br> VALUE_CONVERTER_SCHEMAS_ENABLE: “false”<br> CONFIG_STORAGE_REPLICATION_FACTOR: 1<br> OFFSET_STORAGE_REPLICATION_FACTOR: 1<br> STATUS_STORAGE_REPLICATION_FACTOR: 1</blockquote><p>2- After completing our docker-compose yml file, we stand up the containers.</p><p><strong>docker-compose up -d</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*WZPrlkLgyBTvC8UZc18kCQ.png" /></figure><p>3- We check with <strong>docker ps</strong> to list the running docker containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhbhcsEHLQSD_CjbFWFzFQ.png" /></figure><p>4- We create a Debezium Connector Record for PostgreSQL with the following command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1c1o1Kdz_Qgiu0lLSo2nuQ.png" /></figure><blockquote>curl -X POST <a href="http://localhost:8083/connectors">http://localhost:8083/connectors</a> \<br> -H “Content-Type: application/json” \<br> -d ‘{<br> “name”: “inventory-connector”,<br> “config”: {<br> “connector.class”: “io.debezium.connector.postgresql.PostgresConnector”,<br> “database.hostname”: “postgres”,<br> “database.port”: “5432”,<br> “database.user”: “postgres”,<br> “database.password”: “postgres”,<br> “database.dbname”: “inventory”,<br> “database.server.name”: “dbserver1”,<br> “topic.prefix”: “dbserver1”,<br> “plugin.name”: “pgoutput”,<br> “slot.name”: “debezium_slot”,<br> “publication.name”: “debezium_pub”<br> }<br>}’</blockquote><p>If you want, you can install debezium ui and work on gu as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*FmmZdeWqO-c5tIpRcaVsdQ.png" /></figure><p>Thank you for your time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98d6f51efd99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Mesh Setup and Traffic Management with Istio on Kubernetes]]></title>
            <link>https://medium.com/@alipolatbt/service-mesh-setup-and-traffic-management-with-istio-on-kubernetes-b8e056191e17?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8e056191e17</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sre]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sun, 04 May 2025 19:19:02 GMT</pubDate>
            <atom:updated>2025-05-04T19:21:24.356Z</atom:updated>
            <content:encoded><![CDATA[<p>As microservice-based architectures grow, managing service-to-service communication becomes increasingly complex. From load balancing to security, observability, and version-based traffic control, the challenges multiply. This is where <strong>Istio</strong>, a powerful service mesh, becomes essential.</p><p>In this guide, you’ll learn how to install Istio on Kubernetes, deploy a sample application, and implement user-specific traffic routing — all step by step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/0*fIkbNDYGIcXD_4U3.png" /></figure><h3>What is Istio?</h3><p>Istio is an open-source <strong>service mesh</strong> that adds a layer of control over service communication in Kubernetes. It handles traffic routing, observability, and security without requiring changes to your application code.</p><p>Key features include:</p><ul><li><strong>Smart traffic routing</strong> (A/B testing, canary releases)</li><li><strong>Security</strong> (mutual TLS)</li><li><strong>Observability</strong> (metrics, tracing, logs)</li><li><strong>Policy enforcement</strong></li></ul><h3>Installing Istio on Kubernetes</h3><h3>1. Download Istio CLI</h3><pre>curl -L https://istio.io/downloadIstio | sh -<br>cd istio-*<br>export PATH=$PWD/bin:$PATH</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*LZqskqpg6eKCf5nOnDSP_Q.png" /></figure><h3>2. Install Istio (Demo Profile)</h3><p>The demo profile includes everything you need for testing, including observability tools like Prometheus, Grafana, Kiali, and Jaeger.</p><pre>istioctl install --set profile=demo -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*9HcTY7bx0tRfrdp9mmu3Pg.png" /></figure><h3>3. Enable Sidecar Injection</h3><p>Label the default namespace to enable automatic Envoy sidecar injection:</p><pre>kubectl label namespace default istio-injection=enabled</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*OEM8i2FKJf6lrGE-c76aYQ.png" /></figure><h3>Deploy the Bookinfo Sample Application</h3><p>Istio provides a demo microservices app called <strong>Bookinfo</strong>, which is perfect for experimenting with Istio’s traffic management features.</p><pre>kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*hJsAW4Ys21sIWRpK8z4d_g.png" /></figure><p>You can monitor pod status using:</p><pre>kubectl get pods</pre><h3>Define Gateway</h3><pre>kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*dEcncq0Uu14glLBZBjzoVg.png" /></figure><h3>Access the Application</h3><p>If you’re using Minikube:</p><pre>minikube tunnel<br>export GATEWAY_URL=$(minikube ip):$(kubectl get svc istio-ingressgateway \<br>-n istio-system -o jsonpath=&#39;{.spec.ports[?(@.name==&quot;http2&quot;)].nodePort}&#39;)</pre><p>To test:</p><pre>echo &quot;http://$GATEWAY_URL/productpage&quot;</pre><p>Open the URL in your browser to access the Bookinfo app.</p><h3>User-Based Traffic Routing</h3><p>The reviews microservice in Bookinfo has three versions:</p><p>v1 — no stars</p><p>v2 — red stars</p><p>v3 — black stars</p><p>Let’s implement routing so that:</p><ul><li>Users with user=jason cookie see v2</li><li>Everyone else sees v1</li></ul><h3>Define DestinationRule</h3><pre>kubectl apply -f samples/bookinfo/networking/destination-rule-all.yaml</pre><h3>Create a VirtualService for User-Based Routing</h3><p>Save the following as virtual-service-reviews-user.yaml:</p><pre>apiVersion: networking.istio.io/v1beta1<br>kind: VirtualService<br>metadata:<br>  name: reviews<br>spec:<br>  hosts:<br>    - reviews<br>  http:<br>    - match:<br>        - headers:<br>            cookie:<br>              regex: &quot;.*user=jason.*&quot;<br>      route:<br>        - destination:<br>            host: reviews<br>            subset: v2<br>    - route:<br>        - destination:<br>            host: reviews<br>            subset: v1</pre><p>Apply the configuration:</p><pre>kubectl apply -f virtual-service-reviews-user.yaml</pre><h3>Test the Behavior</h3><ol><li>Visit http://$GATEWAY_URL/productpage in your browser.</li><li>Open developer tools → Application → Cookies.</li><li>Create a cookie with name user and value jason.</li><li>Refresh the page:</li></ol><p>If user=jason, you&#39;ll see <strong>red stars</strong> (v2).</p><p>Without the cookie, you’ll see <strong>no stars</strong> (v1).</p><h3><strong>Observability with Istio</strong></h3><p>Istio includes built-in dashboards for monitoring traffic:</p><h3><strong>Kiali — service graph</strong></h3><pre>istioctl dashboard kiali</pre><h3>Jaeger — distributed tracing</h3><pre>istioctl dashboard jaeger</pre><h3>Grafana — metrics visualization</h3><pre>istioctl dashboard grafana</pre><p>These dashboards help visualize live traffic, traces, and performance metrics.</p><h3>Conclusion</h3><p>Istio provides powerful tools to manage microservice traffic in Kubernetes — without touching application code. In this guide, you installed Istio, deployed Bookinfo, and implemented cookie-based routing to control which version of a service users see.</p><p>Thank you for your time !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8e056191e17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s install Minikube in our Ubuntu environment and examine it with Datadog !]]></title>
            <link>https://medium.com/@alipolatbt/lets-install-minikube-in-our-ubuntu-environment-and-examine-it-with-datadog-ca18489cae63?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca18489cae63</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[application-management]]></category>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sun, 27 Apr 2025 07:54:21 GMT</pubDate>
            <atom:updated>2025-04-27T07:54:21.148Z</atom:updated>
            <content:encoded><![CDATA[<h3>Let’s install Minikube in our Ubuntu environment and examine it with Datadog !</h3><p>Hello friends. APM products play a critical role in application management and devops processes. In this article, I will talk about setting up a simple Minikube cluster on our ubuntu server and examining it with Datadog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AznC-uGOXDOquPqP.png" /></figure><p>I installed it on Ubuntu 24.04.2. You can also try this version. After installing it, we can install Minikube cluster and integrate it with Datadog by following the steps below.</p><p>1- First, we need to install kubectl to connect to and manage the kubernetes environment. Kubectl can be downloaded with the command below.</p><p><strong>curl -LO “https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl&quot;</strong></p><p>2- We give executable permission to the ./kubectl file with the command below.</p><p><strong>chmod +x ./kubectl</strong></p><p>3- For security purposes, the following command is run for verification purposes. This command grabs the latest version of Kubernetes and downloads the correct SHA-256 hash value of the kubectl binary.</p><p>It compares the hash value of the downloaded kubectl file to the expected hash value in the .sha256 file you downloaded to check the correctness and integrity of the file.</p><p><strong>curl -LO “https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256&quot;<br>echo “$(cat kubectl.sha256) kubectl” | sha256sum — check</strong></p><p>4- Now we are ready to install kubectl.</p><p><strong>sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl</strong></p><p>When we check, we see that the installation is completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*b9s5Y7TkIFgq3kyGk1hvkg.png" /></figure><p>5- Now let’s move on to the next step, which is the minikube installation. We can download and install Minikube with the command below.</p><p><strong>curl -LO </strong><a href="https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64"><strong>https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64</strong></a><strong><br>sudo install minikube-linux-amd64 /usr/local/bin/minikube</strong></p><p>6- Then we check minikube and start it. If minikube has not started, we can start it with the <strong>minikube start</strong> command.</p><p><strong>Note:</strong> Minikube prevents you from using the docker driver with the root user. However, since I have set up a test environment, I force it with the command below and continue.</p><p><strong>sudo minikube start — driver=docker — force</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*gMoYcvrGORxEjfDiuIk0wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*3mRJA5Hyn0JYaaO8JiKfWQ.png" /></figure><p>7- Our environment is ready. Now it’s time to integrate with Datadog. If we do not have an account, we need to open one.</p><p>We create an API key from <a href="https://app.datadoghq.com/account/settings#api">https://app.datadoghq.com/account/settings#api</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-GFBBcKXr7IcG5uE8AbWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*8zdFAPv4biQ5BfctHZh4hQ.png" /></figure><p>After entering the required information, a verification code is sent to the e-mail address we specified and we enter this code.</p><p>8- If there is no helm on the server, we can quickly install helm with the command below.</p><p><strong>curl </strong><a href="https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3"><strong>https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3</strong></a><strong> | bash</strong></p><p>We add and update the Datadog helm repo.</p><p><strong>helm repo add datadog </strong><a href="https://helm.datadoghq.com/"><strong>https://helm.datadoghq.com</strong></a><strong><br>helm repo update</strong></p><p>9- We add the API key we obtained to the file below and perform deployment.</p><p><strong>helm install datadog-agent datadog/datadog \<br> — set datadog.apiKey=YOUR_API_KEY \<br> — set datadog.site=’datadoghq.com’ \ (</strong>If you selected Europe, com should change to eu)<strong><br> — set daemonset.useHostPort=true \<br> — set datadog.logs.enabled=true \<br> — set datadog.apm.enabled=true \<br> — set datadog.processAgent.enabled=true \<br> — set datadog.kubeStateMetricsEnabled=true \<br> — set datadog.networkMonitoring.enabled=true</strong></p><p>10- Installation is complete. Now let’s look at the status of the pods. Great, everything looks fine!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*lRRGBkqpfMuCi9ylQRUUHw.png" /></figure><p>11- When we check the Datadog side, we see that our environment has arrived.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*byI-3rOCdQ3P1EDiLWAY8w.png" /></figure><p>We have set up a simple test environment and completed the integration. Now we can create tasks according to our imagination and explore Datadog features.</p><p>See you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca18489cae63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to set up a simple environment to test Keycloak?]]></title>
            <link>https://medium.com/@alipolatbt/how-to-set-up-a-simple-environment-to-test-keycloak-399c657d1d1a?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/399c657d1d1a</guid>
            <category><![CDATA[site-reliability]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[app-management]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 10:15:58 GMT</pubDate>
            <atom:updated>2025-04-19T10:15:58.921Z</atom:updated>
            <content:encoded><![CDATA[<p>Keycloak is an open source identity and access management (IAM) system. In other words, it is a powerful tool for authenticating, authorizing, and providing single sign-on (SSO) to users. It makes user management a breeze, especially in modern applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*wrFG2KyP-bYhe0i1.png" /></figure><p>Now let’s see how we install it in a few short steps.</p><p>I installed it on an ubuntu server and docker compose was installed on my server.</p><p>1- We create a folder and enter it with the <strong>mkdir keycloak-setup &amp;&amp; cd keycloak-setup</strong> command.</p><p>2- We create an .env file in the relevant folder as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*VEqXXJLHbQLho55nqiLsgA.png" /></figure><p>3- Now it’s time to prepare the docker compose yaml. We can use the example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*nY0EIePYuKCX1r6F2MWLsw.png" /></figure><p>Now is the time to stand up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*DMbqTILTUHwuCyjLw7iwpg.png" /></figure><p>After the installation is complete, the containers should be in an up state. Additionally, it would be useful to check the logs for any errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihW1ydokBEVCWyBIvbSP-A.png" /></figure><p>If the logs are like the one below, you are lucky. Keycloak is probably working fine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QS66uh1s54jfEi3RZglVUg.png" /></figure><p>We can access the console by typing <a href="http://ipaddress:8080/">http://ipaddress:8080</a> in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wloM2aU-EpijJj-5JmmT4w.png" /></figure><p>We log in with the information we defined in the environment.</p><p>Now it’s time to test :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i2Mu61-_63OtaxZ6tFLJ7Q.png" /></figure><p>Thank you for your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=399c657d1d1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Personal Access Token (PAT) Management in Azure DevOps]]></title>
            <link>https://medium.com/@alipolatbt/personal-access-token-pat-management-in-azure-devops-fdb399b01b31?source=rss-6664097cbfd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdb399b01b31</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[opsec]]></category>
            <category><![CDATA[app-management]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[aliplt]]></dc:creator>
            <pubDate>Sat, 12 Apr 2025 11:14:34 GMT</pubDate>
            <atom:updated>2025-04-12T11:18:58.092Z</atom:updated>
            <content:encoded><![CDATA[<p>In Azure DevOps projects, Personal Access Tokens (PATs) are crucial for providing secure access, but if not managed properly, they can pose significant security risks.</p><p>In this article, I will discuss how PATs work in Azure DevOps, the risks associated with them, and the steps you can take to manage them more securely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*17JoHQoHTNMWaOQT" /></figure><h3>🎯 What is a PAT and Why is it Important?</h3><p>A PAT is a personal access key that allows a user to access Azure DevOps services without entering a password. It is commonly used in scenarios such as:</p><ul><li>Writing scripts</li><li>Using Azure DevOps REST API</li><li>Running pipeline processes</li></ul><p>However, there is an important detail: ➡️ PATs can only be seen and managed by the user who created them.</p><p>This means that even if a user creates a PAT and later leaves the company, the token can still be used until it expires.</p><h3>🚨 Potential Risk: “Forgotten PATs”</h3><p>Let’s consider a real-life scenario:</p><p>Imagine a team member creates a PAT for a CI/CD process, and it’s used in automation scripts. Months later, this person leaves the team. If the account isn’t disabled or the token is not manually revoked, this token can still be active.</p><p>This creates a security risk, especially in projects that are integrated with external systems, as unauthorized access can occur.</p><h3>🛡️ How to Manage This Risk?</h3><h4>✅ 1. Centralized Control with Azure AD Integration</h4><p>If you integrate Azure DevOps with Azure Active Directory:</p><ul><li>User access is automatically revoked when they leave the company</li><li>Tokens are tied to user accounts, making it easier to revoke them</li><li>You can apply additional security layers (MFA, conditional access)</li></ul><p>Azure AD integration means <strong>centralized and controlled access</strong>.</p><h4>🔍 2. Track PATs with Audit Logs</h4><p>Azure DevOps provides an organizational-level audit log. You can track the following activities:</p><ul><li><strong>PersonalAccessTokenCreated</strong> — When and by whom a PAT was created</li><li><strong>PersonalAccessTokenUsed</strong> — When and where the PAT was used (e.g., API calls)</li><li><strong>PersonalAccessTokenRevoked</strong> — Whether the token was revoked</li></ul><p>You can analyze the audit logs like this:</p><pre>cat auditlog.json | jq &#39;.records[] | select(.actionId==&quot;PersonalAccessTokenCreated&quot;)&#39;</pre><p>This command helps you filter and view only the PAT creation events. You can convert the file to CSV and analyze it in Excel.</p><h4>👤 3. Centralize PAT Management Using Service Accounts</h4><p>In enterprise environments, it’s much safer to create PATs using service accounts rather than individual user accounts.</p><p>Advantages:</p><ul><li>The creator is clearly identifiable</li><li>Permissions can be restricted</li><li>Token lifespan is easier to manage</li></ul><p>❗ <strong>Important:</strong> Regularly monitor and review the expiration dates of service account tokens.</p><h4>🔐 4. Use PAT Policies</h4><p>You can enforce the following policies in your Azure DevOps organization:</p><ul><li>Set a maximum token lifetime (e.g., 30 days)</li><li>Restrict which user groups can create PATs</li><li>Define which permissions (scopes) can be granted</li></ul><p>To configure these policies:</p><p>🛠️ <strong>Path</strong>:<br> Organization Settings &gt; Policies &gt; Personal Access Tokens</p><h4>⚙️ Bonus: Report PAT Creation Events with a Python Script</h4><p>You can use a Python script like the one below to pull PAT creation events from the audit log and output them as a CSV file (customizable as needed):</p><pre>import requests<br>import json<br>import csv<br><br>org = &quot;your-org&quot;<br>pat = &quot;your-pat&quot;<br>url = f&quot;https://auditservice.dev.azure.com/{org}/_apis/audit/auditlog?api-version=7.1-preview.1&quot;<br>response = requests.get(url, auth=(&quot;&quot;, pat))<br>data = response.json()<br>with open(&quot;pat_created_events.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as csvfile:<br>    writer = csv.writer(csvfile)<br>    writer.writerow([&quot;Timestamp&quot;, &quot;Actor&quot;, &quot;IP Address&quot;, &quot;Action&quot;])<br>    for record in data[&quot;value&quot;]:<br>        if record[&quot;actionId&quot;] == &quot;PersonalAccessTokenCreated&quot;:<br>            writer.writerow([record[&quot;timestamp&quot;], record[&quot;actorDisplayName&quot;], record[&quot;ipAddress&quot;], record[&quot;actionId&quot;]])</pre><p>This script filters only the PAT creation logs. You can later report or connect this to an automation system.</p><h3><strong>You can also view the created PATs by filtering the audit logs downloaded as JSON. To do this, follow these steps:</strong></h3><h3>✅ 1. Importing auditlog.json into Excel</h3><p>For Excel 2016+ or Office 365:</p><ol><li>Open Excel.</li><li>From the menu, navigate to:</li></ol><p><strong>Data</strong> &gt; <strong>Get Data</strong> &gt; <strong>From File</strong> &gt; <strong>From JSON</strong>.</p><p>3. Select the <strong>auditlog.json</strong> file.</p><p>4. Excel will open the Power Query Editor, where you can explore the JSON structure.</p><h3>🔎 2. Navigate to records[] in the JSON</h3><p>Within Power Query, follow these steps:</p><ul><li>You will see a field called <strong>records</strong> in the main structure. Click on it: Look for an option like “To Table” or “List into Table.”</li><li>Each row represents a single record from the records[] array.</li><li>On the far right of each row, you will find a small expand icon (⤵️). Click on it to extract the inner fields.</li><li>You will now see fields such as actionId, timestamp, actorDisplayName, etc.</li></ul><h3>🧠 3. Filter Rows with</h3><h3>actionId == &quot;PersonalAccessTokenCreated&quot;</h3><p>Now, treat it like a standard Excel/Power Query filter:</p><ul><li>Apply a filter to the <strong>actionId</strong> column and select only the rows where the value is <strong>PersonalAccessTokenCreated</strong>.</li></ul><h3>💾 4. Load Data into Excel</h3><p>In the Power Query editor, at the top left:</p><ul><li>Click <strong>Close &amp; Load</strong> &gt; <strong>Close &amp; Load To…</strong> to transfer the filtered data into a new sheet.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9jMCFOeZu12eAGpYOCgXQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdb399b01b31" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>