<?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 Andrii Bozhyk on Medium]]></title>
        <description><![CDATA[Stories by Andrii Bozhyk on Medium]]></description>
        <link>https://medium.com/@selfired?source=rss-65a0f4ee7a01------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Andrii Bozhyk on Medium</title>
            <link>https://medium.com/@selfired?source=rss-65a0f4ee7a01------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:43:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@selfired/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[How to Start Working with Liquibase and MongoDB Powered by GitHub Actions and Maven]]></title>
            <link>https://medium.com/@selfired/how-to-start-working-with-liquibase-and-mongodb-powered-by-github-actions-and-maven-34c323151026?source=rss-65a0f4ee7a01------2</link>
            <guid isPermaLink="false">https://medium.com/p/34c323151026</guid>
            <category><![CDATA[maven]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[liquibase]]></category>
            <category><![CDATA[database-migration]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Andrii Bozhyk]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 14:51:21 GMT</pubDate>
            <atom:updated>2026-11-17T14:57:49.460Z</atom:updated>
            <content:encoded><![CDATA[<p>Database change management in NoSQL environments has evolved past chaotic manual script executions. Today, integrating <strong>Liquibase (Community Edition &gt; v5.4)</strong> with <strong>MongoDB Atlas</strong>, <strong>Maven</strong> and <strong>GitHub Actions</strong> provides a seamless, robust and automated CI/CD pipeline for document databases.</p><p>In this guide, we will walk through setting up a modern, production-ready schema migration workflow for MongoDB using Maven dependencies, unified properties configurations and automated GitHub Actions.</p><h3>Prerequisites</h3><p>Before diving into configuration, ensure you have the following ready:</p><ul><li><strong>MongoDB Atlas database</strong> cluster created and accessible.</li><li>A <strong>GitHub repository</strong> to store your source code and workflows.</li><li>Fundamental understanding of <strong>Liquibase, Maven</strong> and CI/CD concepts.</li></ul><h3>1. Project Structure</h3><p>A clean, maintainable directory structure keeps your configuration, dependencies and change sets neatly organized. Here is how your project layout should look:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*0AO6YLF9nk9J-d_OaS71ow.png" /></figure><h3>2. Managing Dependencies in Maven pom.xml</h3><p>By leveraging Maven, you can effortlessly manage the Liquibase core runtime alongside the required MongoDB extensions and drivers.</p><h3>Why This Solution is Powerful</h3><ul><li><strong>Reproducible Builds:</strong> Maven guarantees that every developer and CI runner downloads the exact same binary versions, eradicating environment mismatch bugs (“it works on my machine”).</li><li><strong>Ecosystem Integration:</strong> Rather than manually dealing with driver jars, Maven plugins (liquibase-maven-plugin) allow you to execute database updates straight from your build lifecycle or tie them natively into automation scripts.</li><li><strong>Separation of Concerns:</strong> Configuration details stay out of your source code and dependencies are cleanly version-controlled.</li></ul><h3>3. Centralizing Configuration in liquibase.properties</h3><p>Instead of cluttering your command line or workflows with database credentials and driver definitions, keep them securely grouped inside your resources directory (src/main/resources/liquibase.properties):</p><pre><br># Driver class<br>driver=liquibase.ext.mongodb.database.MongoClientDriver<br><br># Path to your master changelog file (relative to your working directory or classpath)<br>changeLogFile=src/main/resources/db/changelog/db.changelog-master.xml              <br><br># Optional: Log level and output<br>logLevel=INFO</pre><h3>4. Structuring Database Migrations in XML</h3><p>Liquibase allows you to manage NoSQL collections and structural setups via declarative XML files. Create your master changelog at src/main/resources/db/changelog/db.changelog-master.xml</p><h3>5. Securing Database Credentials with GitHub Secrets</h3><p>To safely pass your MongoDB connection strings into GitHub Actions without exposing your credentials in version control:</p><ol><li>Navigate to your GitHub repository -&gt; <strong>Settings</strong> -&gt; <strong>Secrets and variables</strong> -&gt; <strong>Actions</strong>.</li><li>Create a new repository secret named MONGO_DB_CONNECTION.</li><li>Paste your full MongoDB Atlas connection string as the value.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WwZhym62Pva15Haj8oV_4A.png" /></figure><h3>6. Automating via GitHub Actions (liquibase.yml)</h3><p>We will use the modern official setup pattern to execute our database verification steps.</p><p>Create .github/workflows/liquibase.yml:</p><pre>name: Database Migration<br>on: [push, pull_request]<br><br>jobs:<br>  migrate:<br>    runs-on: ubuntu-latest<br>    env:<br>      JAVA_TOOL_OPTIONS: &quot;--add-modules=jdk.naming.dns --add-exports=jdk.naming.dns/com.sun.jndi.dns=java.naming&quot;<br>    steps:<br>    - uses: actions/checkout@v4<br><br>    - name: Set up JDK for Maven<br>      uses: actions/setup-java@v4<br>      with:<br>        distribution: temurin<br>        java-version: &#39;17&#39;<br>        cache: maven<br><br>    - name: Show Maven-managed Liquibase properties<br>      run: |<br>        mvn -q -DforceStdout help:evaluate -Dexpression=liquibase.properties.path<br>        mvn -q -DforceStdout help:evaluate -Dexpression=mongodb.driver.version<br>        <br>    - name: Liquibase Version Check Up (Maven)<br>      run: mvn -B help:evaluate -Dexpression=liquibase.version<br><br>    - name: Validate Changelog (Maven)<br>      run: mvn -B liquibase:validate -Dliquibase.url=&quot;${{ secrets.MONGO_DB_CONNECTION }}&quot;<br><br>    - name: Run Liquibase Update (Maven)<br>      run: mvn -B liquibase:update -Dliquibase.url=&quot;${{ secrets.MONGO_DB_CONNECTION }}&quot;</pre><h3>Conclusion</h3><p>By mapping out your pipeline with Maven, GitHub Actions and Liquibase’s robust extension ecosystem, you establish a foolproof change management standard for MongoDB. Every schema modification, collection setup, and index creation is tracked, verified and deployed safely with zero manual intervention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LOS7UMqApUJN0gwVPB51bg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34c323151026" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blocking Unwanted Visitors: How to Implement IP Blacklisting in Django]]></title>
            <link>https://medium.com/@selfired/blocking-unwanted-visitors-how-to-implement-ip-blacklisting-in-django-587be6f6aba7?source=rss-65a0f4ee7a01------2</link>
            <guid isPermaLink="false">https://medium.com/p/587be6f6aba7</guid>
            <category><![CDATA[django-middleware]]></category>
            <category><![CDATA[web-threat-mitigation]]></category>
            <dc:creator><![CDATA[Andrii Bozhyk]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 11:10:57 GMT</pubDate>
            <atom:updated>2026-10-19T11:10:57.777Z</atom:updated>
            <content:encoded><![CDATA[<p>When hosting a Django application in the cloud, you occasionally encounter unwanted traffic or malicious visitors whose IP addresses you want to block outright. While cloud providers or reverse proxies (like Nginx or Cloudflare) often handle this, you can also implement a quick and lightweight IP blacklist directly inside your Django application using custom middleware.</p><p>Here is a straightforward guide on how to set this up.</p><h3>Step 1: Create the Custom Middleware</h3><p>First, we need to declare a new Python class called IPBlacklistMiddleware inside our utils package. This middleware intercepts incoming requests, checks if the visitor&#39;s IP address exists in our banned list and raises a PermissionDenied exception if a match is found:</p><pre>from django.core.exceptions import PermissionDenied<br>from django.conf import settings<br><br>class IPBlacklistMiddleware:<br><br>    def __init__(self, get_response):<br>        self.get_response = get_response<br><br>    def __call__(self, request):<br>        if hasattr(settings, &#39;BANNED_IPS&#39;) and settings.BANNED_IPS is not None:<br><br>            if request.META[&#39;HTTP_X_FORWARDED_FOR&#39;] in settings.BANNED_IPS:                <br><br>                raise PermissionDenied()<br><br>        response = self.get_response(request)<br>        return response</pre><h3>Step 2: Register the Middleware in settings.py</h3><p>To make our new middleware active, navigate to your Django settings.py file and add utils.ip_blacklist.IPBlacklistMiddleware to your MIDDLEWARE list:</p><pre>MIDDLEWARE = [<br> &#39;utils.ip_blacklist.IPBlacklistMiddleware&#39;<br>]</pre><h3>Step 3: Define Your Banned IPs</h3><p>Finally, declare the BANNED_IPS list right inside the same Django configuration file (settings.py), adding any IP addresses you wish to block:</p><pre>BANNED_IPS = [&#39;xxx.xxx.xxx.xxx&#39;]</pre><h3>Wrapping Up</h3><p>The basic infrastructure is now ready!</p><p>Keep in mind that this is a simple starting point. For a production-ready setup, you might want to extend this by playing around with PermissionDenied exception mapping/handling and adding proper logging for blocked attempts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=587be6f6aba7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>