<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: SAP API Management - Set Basic Authentication for API Proxy in Integration Suite in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/13999214#M4900940</link>
    <description>Thank you for sharing your insights on this topic.</description>
    <pubDate>Tue, 28 Jan 2025 12:10:13 GMT</pubDate>
    <dc:creator>Prasannavengatesh</dc:creator>
    <dc:date>2025-01-28T12:10:13Z</dc:date>
    <item>
      <title>SAP API Management - Set Basic Authentication for API Proxy in Integration Suite</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaq-p/13957841</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Dear All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;In SAP Integration Suite, Basic Authentication offers a simple way to safeguard your API proxies using a username and password. This blog covers how to configure Basic Authentication for your API proxy in API Management.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Follow the Below Steps to Set Basic Authentication to your API Proxy.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Step 1 : Create a Proxy with your target endpoint (For test purpose i used httpbin URL)&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;https://httpbin.org/get&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_0-1733582359836.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199419i3E70C88766A54078/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_0-1733582359836.png" alt="Karthik_ramadurai_0-1733582359836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Step 2 : Go to Policies and Assign Basic Authentication in &lt;STRONG&gt;PreFlow&lt;/STRONG&gt; Incoming request Stream&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_1-1733582978698.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199420i55D46E474FA567D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_1-1733582978698.png" alt="Karthik_ramadurai_1-1733582978698.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Provide the below code in the policy editor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;BasicAuthentication async='true' continueOnError='false' enabled='true' xmlns='http://www.sap.com/apimgmt'&amp;gt;
	&amp;lt;Operation&amp;gt;Decode&amp;lt;/Operation&amp;gt;
	&amp;lt;IgnoreUnresolvedVariables&amp;gt;true&amp;lt;/IgnoreUnresolvedVariables&amp;gt;
	&amp;lt;User ref='current.username'&amp;gt;&amp;lt;/User&amp;gt;
	&amp;lt;Password ref='current.password'&amp;gt;&amp;lt;/Password&amp;gt;
	&amp;lt;Source&amp;gt;request.header.Authorization&amp;lt;/Source&amp;gt;
&amp;lt;/BasicAuthentication&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Step 3 : Add Raise Fault Policy in &lt;STRONG&gt;PreFlow&lt;/STRONG&gt; Incoming Stream (Next to the Basic Authentication Policy)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_2-1733584889014.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199421iD0FCD7069C856A3B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_2-1733584889014.png" alt="Karthik_ramadurai_2-1733584889014.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_3-1733585027869.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199422i740D9F1E22671BE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_3-1733585027869.png" alt="Karthik_ramadurai_3-1733585027869.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;RaiseFault async="true" continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt"&amp;gt;
    &amp;lt;FaultResponse&amp;gt;
        &amp;lt;Set&amp;gt;
            &amp;lt;Headers/&amp;gt;
            &amp;lt;Payload contentType="application/json"&amp;gt;{"status" : "Error", "messege" : "401 Unauthorized" } &amp;lt;/Payload&amp;gt;
            &amp;lt;StatusCode&amp;gt;401&amp;lt;/StatusCode&amp;gt;
            &amp;lt;ReasonPhrase&amp;gt;Unauthorized&amp;lt;/ReasonPhrase&amp;gt;
        &amp;lt;/Set&amp;gt;
    &amp;lt;/FaultResponse&amp;gt;
    &amp;lt;IgnoreUnresolvedVariables&amp;gt;true&amp;lt;/IgnoreUnresolvedVariables&amp;gt;
&amp;lt;/RaiseFault&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In RaiseFault Policy ConditionString Provide below Code (Replace "&lt;FONT face="courier new,courier"&gt;YOUR_USERNAME&lt;/FONT&gt;" &amp;amp; "&lt;FONT face="courier new,courier"&gt;YOUR_PASSWORD&lt;/FONT&gt;" with your credentials)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;(current.username != "YOUR_USERNAME")  OR (current.password != "YOUR_PASSWORD")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_4-1733586105156.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199424iEDD90E217ABE3C69/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_4-1733586105156.png" alt="Karthik_ramadurai_4-1733586105156.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Save and Deploy.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Testing :&lt;/FONT&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;To Test the Basic Authentication Try a GET Call for Your API Proxy in PostMan:&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;Positive Testing :&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Provide the exact Username and Password given in the Condition String :&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_5-1733586720628.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199426iCC2CAFD848D1C1BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_5-1733586720628.png" alt="Karthik_ramadurai_5-1733586720628.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;BR /&gt;&lt;/FONT&gt;Negative Testing :&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Provide an incorrect username and password to verify if access is correctly denied.&lt;BR /&gt;&lt;BR /&gt;Incorrect Username :&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_6-1733586936015.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199427i4A0DD8A18337838C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_6-1733586936015.png" alt="Karthik_ramadurai_6-1733586936015.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Incorrect Password :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Karthik_ramadurai_7-1733587025412.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/199428i66C5D913012319D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Karthik_ramadurai_7-1733587025412.png" alt="Karthik_ramadurai_7-1733587025412.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thank You!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2024 16:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaq-p/13957841</guid>
      <dc:creator>Karthik_ramadurai</dc:creator>
      <dc:date>2024-12-07T16:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAP API Management - Set Basic Authentication for API Proxy in Integration Suite</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/13999214#M4900940</link>
      <description>Thank you for sharing your insights on this topic.</description>
      <pubDate>Tue, 28 Jan 2025 12:10:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/13999214#M4900940</guid>
      <dc:creator>Prasannavengatesh</dc:creator>
      <dc:date>2025-01-28T12:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAP API Management - Set Basic Authentication for API Proxy in Integration Suite</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/14245605#M4929446</link>
      <description>&lt;P&gt;Nice Blog. It helped a lot to understand how to set up Basic Auth.&lt;/P&gt;&lt;P&gt;Is it possible to fetch the credentials from the Security Materials? I don't like the fact, that the username and password is hardcoded in the policies.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 08:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/14245605#M4929446</guid>
      <dc:creator>TimonGartung</dc:creator>
      <dc:date>2025-10-16T08:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAP API Management - Set Basic Authentication for API Proxy in Integration Suite</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/14349184#M4938650</link>
      <description>Great blog! In the policy, I can see that the credentials are hardcoded. Is there a way to implement this without hardcoding them?</description>
      <pubDate>Sun, 15 Mar 2026 13:35:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-api-management-set-basic-authentication-for-api-proxy-in-integration/qaa-p/14349184#M4938650</guid>
      <dc:creator>Rutik_Darekar_01</dc:creator>
      <dc:date>2026-03-15T13:35:33Z</dc:date>
    </item>
  </channel>
</rss>

