<?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: CAP Unrestricted User Attribute Access in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201823#M4565455</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the current implementation the non existance of an attribute in the JWT shall be handled as "unrestricted" access. We will change this behaviour in the next weeks aund roll it out.&lt;/P&gt;&lt;P&gt;The new behaviour will then be that there will be a specifiv value $UNRESTRICTED in the JWT .&lt;/P&gt;&lt;P&gt; In the xs-security.json you will be able to switch between the old and the new behaviour but for CAP we will move to the new version as the CAP authorization check runtimes will move to the new behaviour.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Matthias&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 08:06:31 GMT</pubDate>
    <dc:creator>matthias_buehl</dc:creator>
    <dc:date>2020-06-04T08:06:31Z</dc:date>
    <item>
      <title>CAP Unrestricted User Attribute Access</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaq-p/12201820</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
  &lt;P&gt;according to the &lt;A href="https://cap.cloud.sap/docs/guides/authorization#predicated-privileges-in-where-clauses"&gt;documentation&lt;/A&gt;, a WHERE comparison with a user attribute from the JWT token, which is not present in the token, always results in TRUE.&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;If a user attribute used in a WHERE clause isn’t provided in JWT, then the corresponding attribute comparison in the WHERE clause is evaluated to TRUE.&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;In our application, however, this is not the case.&lt;BR /&gt;I have assigned a role in which the attribute is marked as unrestricted.&lt;BR /&gt;This attribute is then not present in the JWT token, but the user has the scope associated with the role.&lt;/P&gt;
  &lt;P&gt;However, the executed SELECT does not return any results and also contains a restriction to the attribute..&lt;/P&gt;
  &lt;P&gt;I would expect that no restriction to this user attribute would be applied here. Does anyone have an idea why no results are returned? If values for the attribute are assigned to the role, results are returned.&lt;/P&gt;
  &lt;P&gt;Regards&lt;BR /&gt;Simon&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Created Role:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1803053-createdrole.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Where Restriction&lt;/STRONG&gt;:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1803054-whererestriction.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;User Context:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1803060-usercontext.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Check Scope:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1803055-checkscope.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Created SQL-Statement:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;SELECT a.VName AS "a_VName", a.VDivision_VId AS "a_VDivision_VId", a.VPlant_VId AS "a_VPlant_VId", a.VPlant_VName AS "a_VPlant_VName", a.VId AS "a_VId", b.VId AS "b_VId", b.VName AS "b_VName" FROM P20GService_EnrichedPlanningUnits a INNER JOIN P20GService_Divisions b ON ( b.VId = a.VDivision_VId ) WHERE ( ( ( a.VDivision_VId IN ( ? ) ) ) AND ( ? = ? OR ? = ? OR ? = ? ) ) ORDER BY a.VId ASC LIMIT ?&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;SQL-Values:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1803059-sqlvalues.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;CDS-Version:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1803058-cdsversion.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 08:24:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaq-p/12201820</guid>
      <dc:creator>former_member194549</dc:creator>
      <dc:date>2020-05-05T08:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: CAP Unrestricted User Attribute Access</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201821#M4565453</link>
      <description>&lt;P&gt;Hi Simon,&lt;/P&gt;&lt;P&gt;it looks like there is a problem with the where restriction. We will take a look and inform you about the fix.&lt;/P&gt;&lt;P&gt;Thanks for reporting the issue.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 09:46:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201821#M4565453</guid>
      <dc:creator>mariya_yordanova</dc:creator>
      <dc:date>2020-05-06T09:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: CAP Unrestricted User Attribute Access</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201822#M4565454</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;mariya.yordanova&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;are there any news on this topic?&lt;/P&gt;&lt;P&gt;Best Regards&lt;BR /&gt;Simon&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 07:50:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201822#M4565454</guid>
      <dc:creator>former_member194549</dc:creator>
      <dc:date>2020-06-03T07:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: CAP Unrestricted User Attribute Access</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201823#M4565455</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the current implementation the non existance of an attribute in the JWT shall be handled as "unrestricted" access. We will change this behaviour in the next weeks aund roll it out.&lt;/P&gt;&lt;P&gt;The new behaviour will then be that there will be a specifiv value $UNRESTRICTED in the JWT .&lt;/P&gt;&lt;P&gt; In the xs-security.json you will be able to switch between the old and the new behaviour but for CAP we will move to the new version as the CAP authorization check runtimes will move to the new behaviour.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Matthias&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 08:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-unrestricted-user-attribute-access/qaa-p/12201823#M4565455</guid>
      <dc:creator>matthias_buehl</dc:creator>
      <dc:date>2020-06-04T08:06:31Z</dc:date>
    </item>
  </channel>
</rss>

