<?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 API Expert on Medium]]></title>
        <description><![CDATA[Stories by API Expert on Medium]]></description>
        <link>https://medium.com/@apiexpert?source=rss-8942162f9709------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EQffFO8dzlpotUTGRigdBA.png</url>
            <title>Stories by API Expert on Medium</title>
            <link>https://medium.com/@apiexpert?source=rss-8942162f9709------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 05 Nov 2026 00:18:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@apiexpert/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[Springboot JPA with IBMi AS400 : The Entity]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">One of the other big roadblocks you will have when using Springboot JPA with AS400 is that when creating entities, you have to get them&#x2026;</p><p class="medium-feed-link"><a href="https://apiexpert.medium.com/springboot-jpa-with-ibmi-as400-the-entity-bd4947d02bd1?source=rss-8942162f9709------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://apiexpert.medium.com/springboot-jpa-with-ibmi-as400-the-entity-bd4947d02bd1?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd4947d02bd1</guid>
            <category><![CDATA[as400]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[jpa]]></category>
            <category><![CDATA[ibm-i]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Wed, 14 Oct 2026 12:01:16 GMT</pubDate>
            <atom:updated>2026-10-14T12:01:16.311Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Springboot JPA with IBMi AS400 : The Datasource]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">When first stepping into my current position working with the AS400, I had a team mate tell me that you could not do JPA on the IBMi.</p><p class="medium-feed-link"><a href="https://apiexpert.medium.com/springboot-jpa-with-ibmi-as400-d54110ad7797?source=rss-8942162f9709------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://apiexpert.medium.com/springboot-jpa-with-ibmi-as400-d54110ad7797?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/d54110ad7797</guid>
            <category><![CDATA[as400]]></category>
            <category><![CDATA[spring-data-jpa]]></category>
            <category><![CDATA[ibm-i]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 12:27:10 GMT</pubDate>
            <atom:updated>2026-10-16T11:19:25.807Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Websphere Liberty for Springboot]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">When I started working with the IBMI/AS400, the entire architecture seemed alien; then they asked me to help with their Websphere Liberty&#x2026;</p><p class="medium-feed-link"><a href="https://apiexpert.medium.com/websphere-liberty-for-springboot-896f50997ab8?source=rss-8942162f9709------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://apiexpert.medium.com/websphere-liberty-for-springboot-896f50997ab8?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/896f50997ab8</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[websphere]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 16:55:14 GMT</pubDate>
            <atom:updated>2026-10-10T16:56:36.370Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[External Properties in Springboot]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">In Springboot, I have often gotten tired of hardcoding annotations or putting secure keys in application.properties that potentially get&#x2026;</p><p class="medium-feed-link"><a href="https://apiexpert.medium.com/external-properties-in-springboot-4ca97b36fba4?source=rss-8942162f9709------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://apiexpert.medium.com/external-properties-in-springboot-4ca97b36fba4?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ca97b36fba4</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 17:16:09 GMT</pubDate>
            <atom:updated>2026-10-09T11:45:34.669Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Orchestration Layer vs Service Layer]]></title>
            <link>https://apiexpert.medium.com/what-is-the-orchestration-layer-9ff183cdf8b4?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ff183cdf8b4</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[services]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[orchestration]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 13:47:07 GMT</pubDate>
            <atom:updated>2026-10-16T22:27:51.343Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*fxA7gY5RmVh0bRYrxuOuWA.png" /></figure><p>In the Springboot/Java software development, I often see people building out services in which they then call other services from. This is often a very big mistake as it obfuscates those service calls and makes it harder to test your application.</p><p>Now this isn’t always a bad thing BUT it should not be done without reason. And the biggest reason for this happening is that people just don’t know to put service calls into an orchestration layer (or they forgot).</p><p>But what is an Orchestration Layer? Let’s take a dive into the many different classes that do orchestration and what the orchestration layer is.</p><h3>What is the Orchestration Layer</h3><p>An orchestration layer acts as a ‘coordinator’ pulling related tasks together for a single outcome. Think of it like a chef that pulls all the dishes together to create a meal that then gets served to the client. The chef doesn’t make each dish of the meal; for that they rely on the kitchen staff assigned to each different area.</p><p>The same is true for the orchestration layer.</p><p>In Java, an orchestration layer is a centralized software component that coordinates those services, API calls and/or data pipelines to complete a single business process. The orchestrator does not perform the underlying business logic itself… it merely calls and coordinates them.</p><p>That business logic is separated into services and the orchestration layer calls/coordinates between these services.</p><h3>Examples Of Orchestration Layer in Java/Springboot</h3><p>Depending on what you are building, the orchastration layer exists in different places in Springboot. For example, for a:</p><ul><li><strong>CLI</strong> : If you are building a CLI app, the orchestration can exist in either the MAIN function or in a bootstrap/init class called by the applicationrunner/clirunner.</li><li><strong>Scheduler</strong> : For a cron job/scheduler, the orchestration is handled in the function annotated with @Scheduler</li><li><strong>Web App</strong>: Orchestration is commonly done in the @Controller or @RestController for almost all web apps. This is the most common orchestrator.</li></ul><h3>Where to place logic for the Orchestration Layer?</h3><p>The orchestrator looks for the ‘business logic’ in <strong>@Services.</strong></p><p>Now normally, you place all business logic in services as it is meant for business logic specifically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*tciG5kPMX5vVul8WMyeTpg.png" /></figure><p>You CAN place it in @Components BUT that is not the intent of that class; components are mainly used for Utility classes, schedulers, and generic helpers due to the fact that components can be used in BOTH orchestration layer and service layer (see example below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*0m8QIRVO7KOtxWLpRavUVA.png" /></figure><p><strong>And Thats It!</strong></p><p>Now you understand the difference between orchstration and service layers and when to use either.</p><p>If you liked this article, please like and subscribe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ff183cdf8b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ai Code Review Reviewed]]></title>
            <link>https://apiexpert.medium.com/ai-code-review-reviewed-a35d57cb0104?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/a35d57cb0104</guid>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[ai-code-review]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 22:34:37 GMT</pubDate>
            <atom:updated>2026-07-26T22:34:37.175Z</atom:updated>
            <content:encoded><![CDATA[<p>So yesterday, I figured I would finally try and see how AI Code Review does and tested Copilot by asking it to do a code review of one of my more stable repos; Here is that outcome…</p><h3>Critical Issues(???)</h3><p>These are the issues that the AI tool rated as ‘CRITICAL’ (including the fact that printlns were used in places that needed logging)…</p><p><strong>SQL Injection / Parameter Validation Risk</strong></p><ul><li><strong><em>AI Assumption</em></strong>: The createApiDescriptor() method processes user-supplied values from JSON configuration files without sufficient validation. While mockData is validated, foreign key references and parameter types are not escaped before being used in cache operations.</li><li><strong><em>Actual Risk</em></strong>: LOW. The application uses external properties files for loading configuration settings. They are stored in the running users home directory. This means that in order to craft a malicious file, the user would nee WRITE privileges locally on that machine for that user. In other words, you are already FUCKED if this happens.</li></ul><p><strong>Hardcoded Credentials &amp; String Interpolation</strong></p><ul><li><strong><em>AI Assumption</em></strong>: Mail sender credentials use string interpolation (&quot;${apiProperties.getMail().getUsername()}&quot;), which means they&#39;re rendered as strings, not actual values. This suggests incomplete implementation.</li><li><strong><em>Actual Risk</em></strong>: None. This is merely bad formatting</li></ul><p><strong>Unhandled Exceptions with </strong><strong>System.exit(0)</strong></p><ul><li><strong><em>AI Assumption</em></strong>: The framework calls System.exit(0) on initialization failures, which is too aggressive for a library (not an application). This crashes the entire JVM without allowing graceful degradation.</li><li><strong><em>Actual Risk</em></strong>: None. We want the server to DIE if key configuration fails; it should not continue processing.</li></ul><p><strong>Insecure Error Messages with </strong><strong>println() in Production Code</strong></p><ul><li><strong><em>AI Assumption</em></strong>: Direct use of println() for logging errors to stdout. No structured logging for production environments; errors may be lost.</li><li><strong><em>Actual Risk</em></strong>: None. Merely bad logging</li></ul><p><strong>Deprecated AGPL License Conflict in Documentation</strong></p><ul><li><strong><em>AI Assumption</em></strong>: BeapiWebAutoConfiguration.groovy header mentions &quot;AGPL v2 License,&quot; but README.md states &quot;Reciprocal Public License (RPL-1.5)&quot;. Inconsistent licensing.</li><li><strong><em>Actual Risk</em></strong>: This is laughable that this registered as CRITICAL. Merely did not update license in classes</li></ul><h3>High Priority Issues</h3><p>I don’t know how AI thinks a ‘println’ is more critical than a NullPointerException but this is the ranking I got…</p><p><strong>NullPointerException Risk in </strong><strong>ApiCacheService.getApiCache()</strong></p><ul><li><strong><em>AI Assumption</em></strong>: cacheManager?.getCache(&#39;ApiCache&#39;)?.get(controllername)?.get() chains optional operations but throws generic exceptions on failure.</li><li><strong><em>Actual Risk</em></strong>: Very Low (on Blocking/Synchronous apis). BUT… it is a risk that SHOULD be mitigated. So score one for AI.</li></ul><p><strong>Security Filter Chain Ordering Issues</strong></p><ul><li><strong><em>AI Assumption</em></strong>:: Filters are added without verifying their order relative to other Spring Security filters. JwtRequestFilter and RequestInitializationFilter may not execute in intended order.</li><li><strong><em>Actual Risk</em></strong>: None. You can declare the order in the FilterRegistrationBean otherwise the order defaults.</li></ul><p>etc etc etc</p><h3>Review?</h3><p>The AI code review greatly exagerated typos and issues and thought there was greater threat than there was in almost everything.</p><p>It was good at finding typos and minor issues but does not understand ‘architecture’</p><p>Now I would not say it is not without value but the value that it adds in greatly exaggerated. I was pleased to see some things that could be fixed and issues that had gotten past me.</p><p>Code reviews still require eyeballs on the code but this is a nice additive feature for assists.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a35d57cb0104" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Build BAD API’s]]></title>
            <link>https://apiexpert.medium.com/how-to-build-bad-apis-1d8ea82f67b8?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d8ea82f67b8</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[open-api]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 17:17:38 GMT</pubDate>
            <atom:updated>2025-10-07T17:21:14.453Z</atom:updated>
            <content:encoded><![CDATA[<p>When most developers start building apis, they all use the same tools:</p><ul><li>IAM</li><li>OpenAPI</li><li>Gateway</li></ul><p>But there are inherent security issues with every single one of these tools that cause them to be <strong>HORRIBLE for security and governance</strong>.</p><p>In this article, I will go over the issues with each one of these tools and explain why they make you apis easy to hack and difficult to share setup parameters within your network.</p><h3>OpenAPI : Not a RULES doc</h3><p>So if you ask ChatGPT (or others) if OpenApi is a rules doc, it will respond like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*D2nGe_pciNRUOESxDS5vpw.png" /></figure><p>So what does this mean? It means that it does not handle security rules… only routing data. Things like RBAC/ABAC which are tightly bound to the route are not being implemented or documented.</p><p>So when an ADMIN or USER role accesses an endpoint, there is no parameter telling the client whether it has access or not and what parameters to send: <strong>OpenAPI just uses the same parameters for ALL ROLES!</strong></p><p>Additionally, it has no way to define Swagger api docs to show appropriate information to each separate ROLE; an ADMIN and USER will see the same apidocs thus disclosing information about your backend and giving a USER a false sense of access.</p><p>Worst of all, <strong>This can lead to privilege escalation</strong>.</p><h3>Gateway/IAM: Only good for JWT/TLS</h3><p>Try asking ChatGPT about what security should be handled in the api gateway and you will get an interesting answer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*2MYKam9zM-lx3CEy0bqOjA.png" /></figure><p>The ‘<strong>Notably Excluded</strong>’ part at the bottom dictates why these pieces are left out and that they have to be INTEGRATED into the api application to avoid being bypassed.</p><p>This is because an ‘internal redirect’ can bypass all security at the gateway because the request is re-used in the application.</p><p>This is a double-edged sword too because SOOOOOOOO many developers rely on tools like IAM/Gateway to secure their apis when <strong>all they really are good for is the handling of the JWT and TLS.</strong></p><h3>Bringing These Up With Vendors</h3><p>Now first, you have to understand that vendors are interested in creating a tool that hits the largest market they can and they ignore what tyhey don’t understand.</p><p>I have talked to all the major gateway vendors at conferences AND in their offices and they all agree: you have to create these security rules in your api backend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*_rJ_8s7mxozm17kYwDLNDg.png" /></figure><p>Unfortunately, I had a non-helpful talk with the OpenAPI team which <a href="https://medium.com/@apiexpert/openapi-openly-humiliates-themselves-82e4a30a4899">illustrated their lack of understanding of the api call flow</a>.</p><p>The OpenAPI committers called internal redirects ‘made up’ and the lead for the project even LIED and stated that Roy Fielding said they were.</p><p>Roy Fielding then interjected that he NEVER stated such and that internal redirects have existed since the very first HTTP server.</p><p>So you cannot rely on expertise of creators behind tools as even they are ignorant or <strong>motivated by pushing their own tools (rather than fixing them</strong>).</p><h3>In Closing</h3><p>Api security requires a hybrid of tools and integration of these rules into both schemas and functionality in order for your api backend to be fully secure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*CbSaLJjMkRihF6pzCfiQxw.png" /></figure><p>Take every word from vendors with a HUGE GRAIN of salt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d8ea82f67b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adventures in AI Security : Claude (Part 2)]]></title>
            <link>https://apiexpert.medium.com/adventures-in-ai-security-claude-part-2-efb37b97895a?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/efb37b97895a</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Sun, 17 Aug 2025 15:54:53 GMT</pubDate>
            <atom:updated>2025-08-18T15:55:00.881Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adventures in AI Security : Claude (Part 2)</h3><p>Following up on my previous story, I wanted to implement a fully secured api backend with:</p><ul><li>authorization/authentication</li><li>RBAC/ABAC</li><li>session management</li></ul><p>Most AI generated code only focuses on authentication/authorization and skips all other security. This is mainly due to the fact that the models it is trained mainly implements JWT tokens and nothing else.</p><p>So we thought we would try to see if AI can handle writing security.</p><h3>Tools</h3><p>Again, we are still using Java and Springboot due to their robust and mature securty tools and libraries.</p><h3>Authorization/Authentication (Score: A)</h3><p>Claude did great at adding this functionality with a filter and then adding an endpoint for ‘login’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2J-Cj-ea9Kb9kO-n0b8Ag.png" /></figure><p>This is 100% expected because the vast majority of models it is trained on implements this functionality.</p><h3>RBAC/ABAC (Score: D)</h3><p>Claude was able to implement RBAC ok but when asking it to implement ABAC for the request/response, it hardcoded functionality into the endpoint as a one-off; in other words, it did not implement the functionality in a re-usable way.</p><p>It also took 3–4 iterations to get this even semi-correct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7ZdRZ20SLB8f4s2J8eTAA.png" /></figure><p>This code was overly complex and not reusable. It <strong>ALSO did not implement ABAC for the RESPONSE dataset</strong> per ROLE so was only a partial implementation.</p><p>Additionally, it added endpoints that I did not ask for and even wiped out previous endpoints that I HAD asked for. I had to do a reversion in order to get the original endpoints back.</p><h3>Session Management (Score: F)</h3><p>This is where it completely failed. Claude could not associate the JWT with the session and had a nervous breakdown trying over and over to implement this.</p><h3>Conclusion</h3><p>As we added more and more security to the code, Claude got worse and worse. This is consistent behaviour we have witnessed in Claude as well as other models.</p><ul><li><strong>JWT (complete)</strong> : 1 iteration</li><li><strong>RBAC (complete)</strong>: 2–3 iterations</li><li><strong>ABAC (partial)</strong> : 3–4 iterations</li><li><strong>Session management (incomplete)</strong>: 6 iterations</li></ul><p>Most AI can only do the basics and the more complexity you add, the more mistakes it starts making.</p><p>This is a common issue with AI in that the more complexity added, the more mistakes it starts to make.</p><p>I have tested this by switching some of the functionality and it seems the first 1–2 items added can be accomplished for the most part but trying to accomplish a completely secure application is impossible.</p><p>This seems to be an inherent scalability issue with AI and something that cannot be fixed with existing models.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efb37b97895a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adventures in AI Security : Access Control (Part 1)]]></title>
            <link>https://apiexpert.medium.com/adventures-in-ai-security-access-control-part-1-30742e1feb1b?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/30742e1feb1b</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Fri, 08 Aug 2025 16:56:35 GMT</pubDate>
            <atom:updated>2025-08-08T17:05:04.821Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adventures in AI Security : Access Control (Part 1)</h3><p>Over the last week, I have been writing about AI’s and vibe coding and how they cannot handle security or write secure code.</p><p>Below is a list of functionality that I have been trying to implement in AI with a vibe coded api endpoint:</p><ul><li>Access Control</li><li>Authentication / Authorization</li><li>Session Management</li><li>Transport Security</li><li>Rate Limiting / Throttling</li><li>CORS / IP whitelisting</li><li>Internal Redirects &amp; Workflow Control</li><li>API Versioning &amp; Deprecation</li></ul><p>From that list, only <strong>authentication / authorization</strong> is the only consistent feature that most models can implement… everything else is a bit of a gamble or <a href="https://medium.com/p/088133d00d1d">the LLM’s simply cannot implement</a>.</p><p>So I thought I would write a series of articles on AI’s capabilities in security and how the top models for coding respond for each of these features.</p><p>Today I will start with <strong>Access Control (RBAC/ABAC)</strong></p><h3>The Tools</h3><p>I will be asking each of the models to code using <strong>springboot and Java</strong> as they have a very mature set of security tools and libraries.</p><h3>ChatGPT (Score : C+)</h3><p>This took me about 7 iterations and it WAS able to create the code but it was a mess with no ability to handle api governance since all the RULES were hardcoded using annotations</p><p>Additionally, it was trying to handle all ABAC functionality in the endpoint rather than in a filter or interceptor; this makes it impossible to implement with any caching scheme and is HIGHLY redundant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*FvV8PDflndfgnljTDwHEyA.png" /></figure><p>This literally makes it so that you would have to include code like this in EVERY SINGLE ENDPOINT! This makes any api development highly convoluted, messy and overly verbose.</p><p><strong>SCORE: C</strong> — It accomplished the bare minimum but not in a way that made it usable for other endpoints.</p><h3>Claude (Score: F)</h3><p>I tried over and over with Claude and it just couldn’t do it… regardless of the number of iterations. It had problems implementing both RBAC and/or ABAC and just failed miserably.</p><p>Also, I didn’t ask for a JWT but it implemented one anyway.</p><p>AND… it’s default endpoint was ‘login’ which I did not ask it to implement.</p><p>Claude was making assumptions all over the place and this was not in it’s favor.</p><p><strong>Score : F</strong></p><h3>Copilot (Score: F)</h3><p>Copilot also failed at this and could not implement ABAC; it could implement RBAC using hardcoded annotations (just like Claude) but could not properly secure request variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*KbJ7RTZPhhjZ0qjYVPB43g.png" /></figure><p><strong>Score : F</strong></p><h3>Conclusion</h3><p>I was surprised that ChatGPT got as far as it did thus showing some improvement in it’s capability to AT LEAST implement the requested security feature … BUT it did not do it in a way that the code could be used across multiple apis.</p><p>I also was not surprised by Claude or Copilot’s failures as they responded pretty much the way they have on previous passes.</p><p>Still I must say I was surprised that ChatGPT got it partially right.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30742e1feb1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Cannot Secure your API’s]]></title>
            <link>https://apiexpert.medium.com/claude-cannot-secure-your-apis-76a8ba4ce3ab?source=rss-8942162f9709------2</link>
            <guid isPermaLink="false">https://medium.com/p/76a8ba4ce3ab</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[API Expert]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 18:40:32 GMT</pubDate>
            <atom:updated>2025-08-08T01:11:00.461Z</atom:updated>
            <content:encoded><![CDATA[<p>So following up on my <a href="https://medium.com/@apiexpert/chatgpt-states-it-cannot-handle-security-088133d00d1d">previous story about how ChatGPT states it does not understand security</a>, I thought I would test out <strong>Claude.</strong></p><p>Claude is an AI that specializes in writing code and should be able to handle it. So I gave it a try and the results were not great.</p><p>First off, when I asked it about it’s ability to handle security, Claude was confident and stated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*2qQVXuwy18cp6N5H5IpEAg.png" /></figure><p>So I tested it out</p><h3>The Sample Application</h3><p>First, I asked it to do everything it would need to secure an api backend in a Java/Springboot application and the only thing it did was JWT tokens thus <a href="https://medium.com/@apiexpert/why-are-apis-not-secured-7e48b3295489">missing 90% of required security</a> for the application.</p><p>It hallucinated and literally insisted that it was doing input/output validation but did not have an RBAC or ABAC implementation.</p><p>It also insisted on putting this behind a gateway which <strong>ONLY PROTECTS ON THE INGRESS</strong> thus ignoring its own security responsibilities:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*_rJ_8s7mxozm17kYwDLNDg.png" /></figure><p>Additionally, it also didn’t associate the JWT with the session to avoid session hijacking; this alone was an even bigger concern as a man-in-the-middle attack can grab a token and impersonate an individual.</p><h3>Second Iteration</h3><p>On the second iteration, it continued to hallucinate by thinking it was associating the token with the session but had not implemented anything.</p><p>It also thought it had implemented RBAC/ABAC but still had not.</p><h3>Third Iteration</h3><p>This time, it was attempting to pass the session with the token rather than associating the token with the session in the application. This potentially leads to even EASIER token hijacking…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*HTARYe9utCrezIIYwoedSw.png" /></figure><p>TECHNICALLY, this COULD WORK if you then were also checking to see if session_id sent by token matched (which Claude is not) <strong>BUT</strong> you do not want to send private information in the token as it can be abused… which is what Claude is doing.</p><p>It DID hardcode an RBAC solution but again failed utterly to build an ABAC solution based on sent ROLES for both request/response params; it WAS checking the request params but was not basing them on the sent ROLE thus allowing for users to get other ROLES data per endpoint.</p><h3>Conclusion</h3><p>As ChatGPT stated that it’s models did not have enough data to properly handle security, Claude demonstrated this.</p><p>With every iteration, the code just got more and more convoluted without actually implementing what was being asked.</p><p>The filters and classes it was using were correct (which I was impressed with) but it didn’t understand what had to be done to implement these security behaviours.</p><p>All in all I would say this is another fail for AI in handling security.</p><h3>UPDATE (8–7–2025)</h3><p>I tried again later by just telling it to create a filter that associates the JWT token with the session and after two tries, it did succeed. <strong>BUT</strong> it still could not properly handle RBAC/ABAC for the request response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*fIfrHnFNbENVqvI_yLzBrg.png" /></figure><p>Apparently it can do some things if you task it with one thing at a time but when it comes to more complex scenarios like RBAC/ABAC, which has to be integrated altogether and are interdependent, it easily gets confused.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76a8ba4ce3ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>